<?xml version="1.0"
encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#874040, #874040]">
<mx:Script>
<![CDATA[
private function init():void{
swfObj.content.addEventListener("SWF_EVENT",ballHandler);
}
private function ballHandler(ev:Event):void{
txt.text = "Flash content embedded
at compile time | " + ev.target.ballCnt + " gumballs left";
}
]]>
</mx:Script>
<mx:Panel title="SWFLoader Control" layout="vertical" width="80%" height="240" color="0xffffff" borderAlpha="0.15"
paddingTop="5" paddingRight="10" paddingLeft="10" horizontalAlign="center"
verticalScrollPolicy="off">
<mx:Text id="txt" color="0x323232" fontWeight="bold" text="Flash content embedded at
compile time | 10 gumballs left" />
<mx:SWFLoader id="swfObj" source="@Embed('swf_sample.swf')" />
</mx:Panel>
</mx:Application>
No comments:
Post a Comment