Name that DisplayObject
I recently discovered something interesting with using FlexBuilder for Actionscript projects. I would embed a MovieClip symbol from a swf, but I would get compiler errors when using MovieClip methods on the symbol. Very frustrated, I tried everything I could think of, but no luck. Finally, I started tracing out the symbols type using the is keyword and found out FlexBuilder is converting the MovieClip into a Sprite. It would appear that if there is only one frame in the symbol it becomes a Sprite, otherwise it will remain a MovieClip. In short, make sure you check the symbols type before calling MovieClip methods on an embedded symbol.
One last strange thing I noticed is that inside of FlexBuilder embedded MovieClips are sealed unlike within the Flash IDE. The only fix I have found for this is to add the embedded clip as a child of a new MovieClip. I think that is kind of ugly, but it works.
- Norm
