Community

Passing in Values to Flash

Posted Sep 7, '08 at 3:05pm

IqAndreas

IqAndreas

164 posts

Gold - Squire

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!"

Posted Sep 7, '08 at 8:57pm

Captain_J_Sheridan

Captain_J_Sheridan

143 posts

Gold - Serf

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

 

Posted Sep 8, '08 at 1:25pm

LonLonRanch

LonLonRanch

151 posts

Gold - Squire

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.

 

Posted Sep 8, '08 at 1:31pm

Captain_J_Sheridan

Captain_J_Sheridan

143 posts

Gold - Serf

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

 

Posted Sep 12, '08 at 10:04pm

dank

dank

777 posts

Iron - Lord

Moderator

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.

 
Reply to Passing in Values to Flash

You must be logged in to post a reply!