I have a SWFLoader in mxml of my flex app.
<mx:SWFLoader id="swfPreview" width="100%" height="90%" y="20" visible="false"/>
Now on a button click, I execute the following code in action script.
swfPreview.addEventListener(Event.COMPLETE,loadComplete); swfPreview.scaleContent = true; swfPreview.load(url);
Where "url" is the url to a swf present on the internet (this domain can be same or different, I face problems in both cases)
Now, on loadComplete, I do the following:
private function loadComplete(event:Event):void { Alert.show("Load complete"); swfPreview.removeEventListener(Event.COMPLETE,loadComplete); swfPreview.visible = true; }
I get the alert popup (that is the loadComplete is called) but do not get any swf loaded, not able to view anything. What can be the problem, am I missing something or some security issue? I also tried the image control to load the swf. Moreover, the swf are pdf files converted to swf so can this be an issue of different frame rates between flash and flex ? Any help will be appreciated.
Thanks