Code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private var mc:MovieClip;
private function init():void
{
mc = swf.content as MovieClip;
}
private function prev(evt:MouseEvent):void
{
if (mc.currentFrame>1)
{
mc.gotoAndStop(mc.currentFrame-1);
}
}
private function next(evt:MouseEvent):void
{
mc = swf.content as MovieClip;
if (mc.currentFrame<mc.framesLoaded)
{
mc.gotoAndStop(mc.currentFrame+1);
}
}
]]>
</mx:Script>
<mx:SWFLoader id="swf" source="assets\test.swf" complete="init()">
</mx:SWFLoader>
<mx:Canvas id="cav" backgroundColor="#FFB5B5" backgroundAlpha="0.1">
</mx:Canvas>
<mx:Button x="603" y="10" label="上一页" fontSize="12" click="prev(event)"/>
<mx:Button x="603" y="40" label="下一页" fontSize="12" click="next(event)"/>
<mx:Label x="603" y="72" fontSize="12" id="lblCount"/>
<mx:Button x="603" y="100" label="Button"/>
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private var mc:MovieClip;
private function init():void
{
mc = swf.content as MovieClip;
}
private function prev(evt:MouseEvent):void
{
if (mc.currentFrame>1)
{
mc.gotoAndStop(mc.currentFrame-1);
}
}
private function next(evt:MouseEvent):void
{
mc = swf.content as MovieClip;
if (mc.currentFrame<mc.framesLoaded)
{
mc.gotoAndStop(mc.currentFrame+1);
}
}
]]>
</mx:Script>
<mx:SWFLoader id="swf" source="assets\test.swf" complete="init()">
</mx:SWFLoader>
<mx:Canvas id="cav" backgroundColor="#FFB5B5" backgroundAlpha="0.1">
</mx:Canvas>
<mx:Button x="603" y="10" label="上一页" fontSize="12" click="prev(event)"/>
<mx:Button x="603" y="40" label="下一页" fontSize="12" click="next(event)"/>
<mx:Label x="603" y="72" fontSize="12" id="lblCount"/>
<mx:Button x="603" y="100" label="Button"/>
</mx:Application>