Flex 4停止嵌入式SWF

时间:2010-07-30 09:39:49

标签: flex actionscript-3

我有这个Flex 4.1脚本:

<fx:Script>
    <![CDATA[
        [Embed(source="res/swf/user.swf")]
        [Bindable]
        private var SWFClass:Class; 

        [Bindable]
        public var userClip:MovieClip = new SWFClass();

        protected function test_clickHandler(event:MouseEvent):void
        {
            trace("click");
            userClip.gotoAndPlay(1);
        }
    ]]>
</fx:Script>

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:SWFLoader id="userClip1" autoLoad="true"  trustContent="true" source="{userClip}"  />
<mx:Button id="test" click="test_clickHandler(event)" x="100" y="200"/>

我只看到SWF重复自己,按下按钮无效,也没有错误。

我做错了什么?

1 个答案:

答案 0 :(得分:0)

查看unloadAndStop()