Groups | Blog | Home
all groups > flash actionscript > october 2005 >

flash actionscript : accessing VARS from an external file



blst
10/7/2005 7:47:48 PM
i am trying to do what seems to me used to work, but i haven't used flash for
awhile and maybe i am wrong.

i am simply trying to load in a variable from a PHP file that looks like
var1=this+is+the+var1 then either use the var1 in an array (which doesn't seem
to work) or to set another var with it. i.e. var2=var1 or var2=[var1];

i can set a dynamic text field to var1 and see it displayed, but when i set
another to show var2, it's blank.

any idea what i am doing wrong?.

thanks.
Motion Maker
10/7/2005 9:19:31 PM
In PHP simply use echo or print and be sure you have no whitespace before or
after the php tags.

For Flash you may want to use the AS LoadVars object. You create an object,
add the onLoad method and then call the load or sendAndLoad method.

This simple example using PHP might help:
http://www.hosfordusa.com/ClickSystems/courses/flash/examples/LoadVars/LoadVarsEx01.php

--
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
[quoted text, click to view]
i am trying to do what seems to me used to work, but i haven't used flash
for
awhile and maybe i am wrong.

i am simply trying to load in a variable from a PHP file that looks like
var1=this+is+the+var1 then either use the var1 in an array (which doesn't
seem
to work) or to set another var with it. i.e. var2=var1 or var2=[var1];

i can set a dynamic text field to var1 and see it displayed, but when i set
another to show var2, it's blank.

any idea what i am doing wrong?.

thanks.

AddThis Social Bookmark Button