I have problem accessing content from an Illustrator SWF(I create the swf using illustrator, I export I Save layers as symbols).
When I create my swf file using flash i can access shapes and symbols using this code.
I am trying to get and change the color of a symbols in my swf file
var flashMovie:Sprite = this.content as Sprite;
for (var i:int = 0; i < flashMovie.numChildren; i++)
{
flashMovie.getChildAt(i).name;
flashMovie.getChildAt(i).transform.colorTransform.color;
}
But when I create my swf file using Illustrator it return nothing.
How can can i access the content and change the color of an Illustrator SWF
Is it possible to export AVM2 (AS 3) swf’s using Illustrator? Correct me if i am wrong, but as far as I know Illustrator CS5 still exports AVM1 (AS 1 & 2) swf’s. Within a AS3 Project all loaded AS2 Movies are represented by the flash.display.AVM1Movie class. This class has no display-chain children, it is just a DisplayObject showing the rendered AVM1 Clip. From this it follows that you can’t access any symbols defined by Illustrator.
I am not quite sure if you can use the call() Method to invoke some Method within a AVM1Movie. Is it possible to add AS2 methods within Illustrator? Probably not…
You can either export every element as single swf, or choose some other export format such as svg.