1 Reply Latest reply on May 2, 2007 11:17 AM by V__K__K

    Stopping/Pausing SWFLoader

      Is there a way to stop or pause a SWF loaded through an SWFLoader component?


        • 1. Re: Stopping/Pausing SWFLoader
          V__K__K Level 1
          Following sample code will embed "somesymbol" (movieclip symbol) of "somefile.swf" and this is declared as myClass. Loading this in "Image" component and using stopmc method I can able to pause & play the loaded movie clip. I hope the same will work for SWF Loader as well as embedding the whole swf file.


          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" width="800" height="600">
          [Embed(source="somefile.swf", symbol="somesymbol")]

          public var myClass:Class;

          public function stopmc():void {
          var mc:MovieClip = MovieClip(Q01.content)
          if (playstop.label == "Stop") {
          playstop.label = "Play";
          else {
          playstop.label = "Stop";

          <mx:Button id="playstop" label="Stop" click="stopmc();"/>
          <mx:Image id="Q01" source="{myClass}"/>


          Hope this helps.