Mega Code Archive

 
Categories / Flex / Development
 

Load External SWF

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:s="library://ns.adobe.com/flex/spark">     <mx:Script>                      import mx.controls.Alert;             protected function sampleOpenHandler(event:Event):void {                 Alert.show('open');             }             protected function sampleProgressHandler(event:ProgressEvent):void {                 Alert.show(event.bytesLoaded+' of '+event.bytesTotal+' bytes loaded');             }             protected function sampleCompleteHandler(event:Event):void {                 Alert.show('complete');             }            </mx:Script>     <mx:SWFLoader id="sampleSWFLoader" source="logo.jpg"                   open="sampleOpenHandler(event)"                   progress="sampleProgressHandler(event)"                   complete="sampleCompleteHandler(event)"/> </mx:Application>