views:

25

answers:

1

Hi All I am trying to import an swf file into Flash builder. My swf file is correct, and displays the correct data. However, when I import into Flash builder and launch my project, I get a blank HTML. Not sure why? I am carrying out the following steps in the sequence listed below 1. Create an FLA component in Flash Professional. 2. Go to Publish settings, click on export to SWC. 3. Exported SWC displays correct data. 4. Create new action script project in Flash Builder. 5. Add the SWC folder as path of the referenced library section. 6. Added the following code in action script code

var mystickyman:MovieClip = new stickman as MovieClip; addChild(mystickyman);

Here stickman is the linkage if of swc given in Flash Professional.

I am using SWC for the first time , and am sure am missing out on some steps.

Any inputs will help.

Thanks Aparna

A: 

Go to your Actionscript project, look for the Referenced Libraries folder. You should see your swc there. Check the default package, if you can see the name of your Class, i.e. stickman, then you can do this:

 var mystickman:stickman = new stickman();
 addChild( mystickman );

If not, then you would need to go back to your fla and make sure that you've correctly set the Export for Actionscript checkbox in the Properties panel of your stickman MovieClip.

PatrickS