1 Reply Latest reply on Apr 13, 2008 7:01 AM by justria

    SWF control

    Uzztrizzo
      I have SWF-file 9.0 fnd I need to load it into my Flex application and control from Flex. I made a code like this but it doesn't work (undefined property). How can I control my SWF with commands like this or some kind of "gotoAndStop"?

        • 1. Re: SWF control
          justria Level 1
          You might wish to close the function test() first and then declare another function onCl:

          >>>
          public function test()
          {

          var loader:Loader = new Loader;
          addChild(loader);
          var request:URLRequest = new URLRequest("wheel.swf");
          loader.load(request);
          loader.addEventListener(MouseEvent.CLICK, onCl);

          } // *** CLOSE method here


          function onCl():void
          {
          this.gotoAndStop(1);
          }
          <<<

          Additionally, please examine, which property is undefined and post its namen here.