i have a swf button created in flash which is used in flex.
the button has got an arrow which is initially black, now i have to
change the color of that arrow dynamically. i know flex a little
bit but dont know flash.
i have the source - fla - file of the swf too, where there is
a button symbol - the arrow - in the library, but i dont know how
to access that symbol from flex and change its properties.
thanks in advance.
because you are embedding the swf as a whole, the datatype of
content is MovieClip. So with your code you are downcasting the
datatype to DisplayObjectContainer. The inheritance chain:
MovieClip -> Sprite -> DisplayObjectContainer ->
InteractiveObject -> DisplayObject -> EventDispatcher ->
Your code works because 'transform' is an inherited public
property of DisplayObject. But if you needed a method like
gotoAndPlay() the downcast to DisplayObjectContainer would prevent
this since gotoAndPlay() is a member of the MovieClip class.