ForumsProgramming ForumPassing in Values to Flash

4 2785
IQAndreas
offline
IQAndreas
299 posts
Peasant

Another beginner question...

Is there any way to pass in values to Flash?

For example, say I own a site where the user has to log in to play games. When the page containing the game loads, it passes in a value into the game telling it who is logged in.

Then when the game runs, it can for example, load the current user's progress, or display "Welcome, IqAndreas!"

  • 4 Replies
Captain_J_Sheridan
offline
Captain_J_Sheridan
313 posts
Nomad

Guess you would need to code together with Java, take a look at Flash Help for the fscommand function, it might be what you're looking for

LonLonRanch
offline
LonLonRanch
172 posts
Nomad

Actually all you need to do is use Flash variables, or FlashVars - That will allow you to take a variable from your database and plug it into the Flash file.

Captain_J_Sheridan
offline
Captain_J_Sheridan
313 posts
Nomad

Yeah, I made the other way around, from Flash to page

dank
offline
dank
986 posts
Peasant

You can call a php script and use GET to post the variables and then retrieve them on the next page by calling another php script that retrieves the previous variables.

Showing 1-4 of 4