Getting data from function loaded after current function

Posted by Hwang on Stack Overflow See other posts from Stack Overflow or by Hwang
Published on 2010-03-18T05:06:46Z Indexed on 2010/03/18 5:11 UTC
Read the original article Hit count: 311

Filed under:

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

© Stack Overflow or respective owner

Related posts about actionscript-3