0

I can not run AS included into SWC library. I made two test-projects - one in Flash Pro - just as it was described in the answer here:

the link

  • with addition of some AS3 code that animate the blue circle. Second project - Flex ActionScript Mobile project type in Flash Builder.

I exported the Flash Pro project to SWC, with "AS Linkage" box and "Export In Frame 1" boxes checked. Then I add the SWC to Flex project in project properties. I add MovieClip to the Stage:

package {

import ExportSWC_test_fla.*;

import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.utils.getDefinitionByName;

public class BlueCircleRun extends Sprite
{
    public function BlueCircleRun()
    {
        super();

        stage.scaleMode = StageScaleMode.NO_SCALE;

        stage.align = StageAlign.TOP_LEFT;

        var symbol:BlueCircle = new BlueCircle();

        symbol.x = 150;

        symbol.y = 150;

        addChild(symbol);

    }
}

}

I can see the MovieClip on the stage - when I compile and run Flex project. The problem is - the script in the Movie does not run. How can I run it ? Can I import and run the whole Movie from SWC ? How can I do this ?

Community
  • 1
  • 1

1 Answers1

0

Something like this:

(symbol as MovieClip).play();
JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
  • @SergoKalandadze I use this exact code in my Mobile Game to start the animation of a MovieClip. I'm unclear why it wouldn't work for you. If you can expand, perhaps I can offer more assistance. – JeffryHouser Nov 23 '12 at 00:08
  • Thank You very much Flextras, the code above come from very short example - here is a code that is placed on MovieClip timeline, the code I am trying to play: – Sergo Kalandadze Nov 25 '12 at 13:27