|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can anyone tell me how to load a variable from PHP into a button. For example; I want to get a value from a PHP file and load it in the getURL values within a Flash Button.
Since I cannot seem to give a button a variable name I cannot loadVariablesNum and have it read it correctly. Thanks for your help. |
|
#2
|
||||
|
||||
|
you probably know this part:
/******************************** // inside a movie clip i placed this ... onClipEvent(data { // let say your var name is ... dynaLink // I passed it to a bunch of variable holders on _root // I hear inserting data into objects will make code much more modular dynaLink = _root.dynaURL; } onClipEvent(load) { loadVariables("processMe.php",this); } *********************************/ then, then on your button just do this /********************************* // if its a folder and not a file // eg: http://www.abc.com/flash/ on(press) { getURL("http://www.macromedia.com/"+_root.dynaURL+"/"); } // if its a file - the difference is the trailing slash // eg: http://www.abc.com/flash/gallery.html on(press) { getURL("http://www.macromedia.com/"+_root.dynaURL); } // the trailing slash has cause me some trouble last time, so i empahsise here, you probably know ... *********************************/ cheers~ |
|
#3
|
||||
|
||||
|
oops, the trailing slash thing could be quite an issue if u use my example above ...
![]() beter way is just to pass a proper value. eg: // use this on(press) { getURL("http://www.macromedia.com/"+_root.dynaURL); } then dynaURL value should already have the trailing slash if its needed ... this is the easiest way i can think of. ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Load Variables into Buttons |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|