(I don't know why, but inject is working anyway)

So, as far as I understand I should add the event like this:
var t = $(new Swiff('http://www.onesurvey.com/js2/flash/playerV2.swf?'
+ $random(0,10000), {
    width: 24,
    height: 24,
    id: id,
    params: {
        'quality': 'high',
        'wmode': 'transparent',
        'bgcolor': '#ffffff',
        'salign': 't'
    },
    vars: vars
})).inject(this.options.where)
Element.addEvent(t, 'soundComplete', function()
{this.fireEvent('complete')}.bind(this))

But it's not working in IE either.

Thanks for help.

On Oct 20, 12:57 pm, Christoph Pojer <[email protected]>
wrote:
> You can't extend these elements (object, embed) in IE. You can however
> use the generics, like Element.inject(swiffElement, where)
>
> On Oct 20, 12:14 pm, karolis <[email protected]> wrote:
>
> > Here is code example:
> > $(new Swiff('http://www.example.com/js2/flash/playerV2.swf?'+
> > $random(0,10000), {
> >         width: 24,
> >         height: 24,
> >         id: id,
> >         params: {
> >             'quality': 'high',
> >             'wmode': 'transparent',
> >             'bgcolor': '#ffffff',
> >             'salign': 't'
> >         },
> >         vars: vars}).inject(this.options.where)).addEvent('soundComplete', 
> > function(){
>
> >         this.fireEvent('complete');
>
> > }.bind(this))
>
> > In IE error is thrown that "Object doesn't support this property or
> > method" when I try to add event on element.
>
> > If you need standalone code example or more info, please let me know.
>
> > Thanks for reading this.

Reply via email to