我正在尝试将带有在时间轴中定义的一些帧标签的 swf 文件嵌入到我的 Flex 应用程序中:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="1000" height="563" creationComplete="doSomething()">
<mx:Script>
<![CDATA[
private var movieClip:MovieClip;
private function doSomething():void {
movieClip = swfFile.content as MovieClip;
movieClip.gotoAndPlay('playIntro');
movieClip.addEventListener("swfFinished", doSomethingElse);
}
private function doSomethingElse():void {
//
}
]]>
</mx:Script>
<mx:SWFLoader id="swfFile" width="1000" height="563" source="@Embed(source='test.swf')" />
</mx:Application>
但是,我无法以这种方式控制 swf 时间线......是否可以嵌入 swf 文件并以我想要的方式控制它?
谢谢!