开发者

Flex 4 stopping an embbeded SWF

I have this Flex 4.1 script:

<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"/>

I only see the SWF repeating itself, pressing t开发者_StackOverflow社区he button has no effect, no errors either.

What am I doing wrong?


Check out unloadAndStop().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜