I have a class called Butterfly that extends MovieClip and exists as an asset in my Flash CS4 library.
The timeline of Butterfly consists of different wing flaps for different segments of its behavior. One of the animations is the wings opening up. Once the wings are open, dynamic text is shown on the wings of the butterfly.
//Butterfly.as
...
private var _textForWings:String = "Text For Wings";
I don’t seem to have access to that variable from frame 159 inside of the clip.
What is the right process for accessing variables defined in the class by the frames inside?
:-/ Currently I’m using a getter for the _textForWings variable and using
//getter inside Butterfly.as
public function get textForWings():String
{
return _textForWings;
}
//frame 159 inside Butterfly
(this.parent as Butterfly).textForWings;
In this instance this works, but this things that i specify in the class are not avaiable to me within the timeline where i need them issue is really causing some headaches.
Thanks guys,
Aaron