Getting data from function loaded after current function
- by Hwang
I have 2 functions, 1 loaded before another.
Some value are determine by the other function data, but since one of it has to load before the other 1, how should I get the data that is loaded after current function?
private function wMessage():void {
Message.width=Name.width+20;
}
private function wName():void {
Name.x=(Message.x+Message.textWidth)-Name.textWidth;
Name.y=Message.y+Message.height;
}
I've taken out some other unnecessary codes, but as you can see Name position is set according by the position + width of Message, but I want Message's width to be not smaller than Name