I have limited access to flash object. It is not compiled with external interface and just fires event by specified id.
So my workaround is just to create dummy html element and fire event for it, but I don't like it. On Oct 20, 4:16 pm, Fábio M. Costa <[email protected]> wrote: > You dont add events like this. > > See the "callBacks" option here:http://mootools.net/docs/core/Utilities/Swiff > > -- > Fábio Miranda Costa > front...@portalpadroes > Globo.com > *github:* fabiomcosta > *twitter:* @fabiomiranda > *ramal:* 6410 > > On Wed, Oct 20, 2010 at 12:04 PM, karolis <[email protected]> wrote: > > (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?'+<http://www.example.com/js2/flash/playerV2.swf?%27+> > > > > $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.
