topical media & game development
explore-flex-loader.mx
explore-flex-loader.mx
[swf]
flex
<?xml version="1.0"?>
<!-- Simple example to demonstrate the SWFLoader control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import flash.events.MouseEvent;
// as observed, switching does not work
private function click1 ( event:MouseEvent ):void
{
load.source = "http://www.youtube.com/swf/l.swf?video_id=meuYKnPcBtQ";
}
private function click2 ( event:MouseEvent ):void
{
load.source = "http://www.youtube.com/swf/l.swf?video_id=8pLL5TKwdeM";
}
]]>
</mx:Script>
<mx:Panel title="SWFLoader Control Example" height="90%" width="90%"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
<mx:Label text="The Label control of the outer application."/>
<mx:HBox>
<mx:SWFLoader id="load" source="http://www.youtube.com/swf/l.swf?video_id=8pLL5TKwdeM" height="300" width="400"/>
</mx:HBox>
<mx:HBox>
<mx:Button label="dijken" click="click1(event);" />
<mx:Button label="roundup" click="click2(event);" />
</mx:HBox>
</mx:Panel>
</mx:Application>
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.