Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic button question... 1

Status
Not open for further replies.

iranor

Programmer
Jun 17, 2004
174
CA
I only started with flash. I got a small script to do search.

The flash sends data to a php script , then php send back data. One of this data is named "&user_name=".

I have a button on the search screen. It point to the following link : "playerinfo.php?playername="

Now , I want that when someone click the button , it get redirected to the link by adding the "&user_name=" result at the end of the link after "?playername="

I use getURL("playerinfo.php?playername="):

Example : php says: "&user_name=neomaster"

The button now should change to point to
"playerinfo.php?playername=neomaster
 
How are you getting the variables back into Flash after the PHP returns the data? LoadVars?

Wow JT that almost looked like you knew what you were doing!
 
I use loadVariablesNum("search.php", 0, "POST");
 
You should use LoadVars.sendAndLoad on your submit button.

But if what you have is returning the variables you can refer to them by using _root.user_name. So one way to do your button would be:

Code:
on(release){
   getURL("playerInfo.php?playerName="+_root.user_name);
}

The better way is to use the LoadVars.sendAndLoad. Then you can monitor the progress of the transaction with the php page.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Thanks , it's exactly what I was looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top