I'm experiencing a strange problem with the Swiff class.
I was loading an Actionscript 3 swf into a div using mootools with
the following code:
var swf = new Swiff('webcam.swf', {
id: 'webcam',
width: 720,
height: 370,
container: $('swf-content'),
events: {
onLoad: function(){
alert('flash loaded!');
}
}
});
Up until a few days ago the onLoad event was giving me an alert as it
should then it suddenly stopped working. I've also tried replacing it
with:
callBacks: {
load: function(){
alert('flash loaded!');
}
}
but this does not produce an alert either. Documentation on the Swiff
class is sparse.
I've looked around and I found the following Actionscript which I
added with no results:
import flash.external.*;
ExternalInterface.call('onLoad');
I also tried:
ExternalInterface.call('load');
with no luck.
Has anyone else encountered issues with onLoad firing properly for
Swiff? I'm brand new to using Swiff and maybe I'm not understanding
how this works or something. I find it really strange that it WAS
working and then stopped.
I've got it working again by using Request and requesting a php file
that has the flash object in it and then setting the HTML of 'swf-
content'. I don't think that's an ideal solution since older versions
of IE will require the object to be activated before it can be used
(ie. ActiveXObject).
I'd really appreciate any insight, thanks!