View Full Version : Help! Please! Jesse? Anyone?

07-10-2001, 08:23 AM
Hey everyone,

I'm having a problem passing variables into a flash movie using an http request.

Here's the situation. My company makes casino games that involve real money. If a players internet connection goes down during a game, we have to be able to jump back into the game at the same point where the connection broke. Our databases keep track of all this information, so thats no problem, they'll just provide the information to the game to set it back up. The problem i'm having is getting flash to interpret this data properly.

The request i'm using as a test is something like this...

game.swf?var1=value1&var2=value2 etc.

Flash is interpreting some of these properly. For example, I can specify a value that will tell flash to go to the proper frame label or set the value of a dynamic text field on the stage.

What doesnt work is telling a dynamic text field inside an MC what to display or telling an MC to go to a particular frame. Even using parseInt(varName) to ensure it's not trying to go to a label instead of a frame number doesn't help.

Does anyone have any idea why flash can get and use variables properly in some cases but not others? I've bee ntrying everything imaginable for hours on end and can't get it all to work.

TIA for any help/advice



07-10-2001, 12:53 PM
I've not had much call to use the html GET method but I think you'll find it works fine... in my sample here I've done:
then my flash file has (on the first frame):
myVar = Number(myVar);
myVar += 20;
works a treat. returns 22. if it were interpretting it as a string it would return 220... check your code.

07-10-2001, 04:56 PM
Thanks for taking a moment to try that out Jesse. doing what you've done hasn't caused me any problems either. I have a couple text fields on the root level that get the variable fine. WHere it seems to fall down on me is when I put a text field inside a movieclip and try and say,

movieclip.dynamictext = varFromFile

Doing this just makes my text field blank. Yet I can put another text field on the main level and try to populate it with the same variable and it works fine.

Thanks very much for taking a stab at it this.


07-11-2001, 03:33 AM
stop ();
_root.myMC.myVar = Number(myVar);
works fine for me, embed the font in the dynamic field. the value is probably there but Flash can't display it wihtout the embedded font.