Compile swc-flash for use in flex, with a class written in flex

Ok

It sounds complicated, but it is not. Here it is: I want to use some assets (buttons, etc.) that I create in Flash in a flex actionscript project. Since all my assets are below 10K, I do not plan to download swf, wait for the download and interface creation. I want to use swc and just an instance of the clips that I need. In addition, I want my Button class to have additional properties, and this is the problem.

If in the Linkage properties in the Flash IDE I add a link to a custom button class and trace the ButtonClip child, I get the correct trace. If then I create a button in the Main class in Flex using the generated swc file and track the same ButtonClick child, I get null.

Why? Is there any way around this? I reviewed the use of the Flex Component Kit, but since I am working on a simple actionscript project and I am not using the Flex framework, I see no reason to use the component kit at this point.

Thank!

+2
source share
2 answers

I think I get it.

My MovieClip button linked to a class in the same src folder as the rest of the actionscript code in the ActionScript Flex project. (The as3 class path was set to "../" from the assets folder in which the .fla file is located, one level to src)

Flash , , .swc. , . Flex , src, , swc . flex .as, , Flash IDE ( , ), Flex , , Button , .

, fla, Flex .

, , , .

, Button , Flash Button. Flex , Button , . .swc, Flex , .

! , !

, , , 100%. , , . - - , .

+3

All Articles