I am often given AI files (Adobe Illustrator) for the purpose of extracting assets for my flash projects. Over the past few months, I’ve been receiving a lot of files having been giving me this same issue.
As you may have noticed, you can’t iterate over the properties of an Actionscript 3 class as if they were normal properties of a generic object, unless the class is dynamic of course.
here’s what I mean:
Adding a dropshadow effect to a Display Object in Actionscript 3 is really easy. In Actionscript 3, Display Objects such as MovieClips have a property called filters.
To apply a drop shadow to your MovieClip, you must first import the DropShadowFilter. Then create a DropShadowFilter instance. Lastly, assign your new filter to the MovieClip’s filters property:
I spent a few hours going nuts with this one today, so save yourself some time by reading this post. Suppose that you have some content that you want to scale when the flash player is re-sized. Suppose also that you have added this line in order to accomplish it:
Removing spaces from a string is really easy in Actionscript 3. One method is to simply convert the string to an array using the String.split() function using a space as the delimiter. Then you can use the Array.join function to put it all back together again without the spaces.