flashmxfreak
05-08-2006, 10:19 AM
If I load txt a want to create text field and the assign the loaded vars to my txt field.
I can create the text field with absolute path _root.createTextField , but I would like to create this with relative path, how can I make it?
Now it works so:
//*********** LOAD VARIABLES ****************
myVars = new LoadVars ();
myVars.onLoad = function (success)
{
if (success)
{
trace ("variables from txt file loaded FRAME 3!");
// create text for menu ABSOLUTE PATH
_root.createTextField ("menu1_txt", getNextHighestDepth (), 17, 15, 90, 18);
//
menu1_txt.text = this.var_menu1;
menu1_txt.border = true;
menu1_txt.selectable = false;
menu1_txt.setTextFormat (myTF_fmt);
menu2_txt.text = this.var_menu2;
menu3_txt.text = this.var_menu3;
menu4_txt.text = this.var_menu4;
menu5_txt.text = this.var_menu5;
menu6_txt.text = this.var_menu6;
menu7_txt.text = this.var_menu7;
menu8_txt.text = this.var_menu8;
menu9_txt.text = this.var_menu9;
}
I can create the text field with absolute path _root.createTextField , but I would like to create this with relative path, how can I make it?
Now it works so:
//*********** LOAD VARIABLES ****************
myVars = new LoadVars ();
myVars.onLoad = function (success)
{
if (success)
{
trace ("variables from txt file loaded FRAME 3!");
// create text for menu ABSOLUTE PATH
_root.createTextField ("menu1_txt", getNextHighestDepth (), 17, 15, 90, 18);
//
menu1_txt.text = this.var_menu1;
menu1_txt.border = true;
menu1_txt.selectable = false;
menu1_txt.setTextFormat (myTF_fmt);
menu2_txt.text = this.var_menu2;
menu3_txt.text = this.var_menu3;
menu4_txt.text = this.var_menu4;
menu5_txt.text = this.var_menu5;
menu6_txt.text = this.var_menu6;
menu7_txt.text = this.var_menu7;
menu8_txt.text = this.var_menu8;
menu9_txt.text = this.var_menu9;
}