on (rollOver) { _root.hvr3.gotoAndPlay("fadein"); } on (rollOut) { _root.hvr3.gotoAndPlay("fadeout"); } on (release) { getURL("/shop/"); getURL("my_html_page.html", "_blank"); } loadMovieNum("/flash/navigation.swf", 7); unloadMovie(7); // Flash Actionscript Used for Registration All that is required in Flash at this point is to have one text Field Named RegName - Then either on a button or Frame command this Code. on (release) { Status = "Beginning registration Process... Please Hold"; loadVariablesNum ("Register.php?RegName=&"+RegName, 0); } I have an extra text field named Status, but this is optional. Notice on the LoadVariablesNum command I specifically pass the variable RegName to the PHP script. This is not essential, adding "Post" will do the same thing. It's just sometimes easier to us this to keep track of what's passed to a script. After a user has entered their Name and hit the register button, the LoadVariablesNum Command will call the PHP script, pass whatever was entered in the RegName Field to it and execute the statements. // Flash Actionscript used for Login on (release) { gotoAndPlay(2); Status = "Beginning Login Process.. Please Hold"; loadVariablesNum ("Login.php?Name="+Name, "0"); } This is the actionscript on the Login Button. Initially the movie stops at the first frame of the root of the movie. After you hit the Login button it goes to frame 2 and continues to Loop until it finds that there is a value for CheckLog. The Check part looks like this: if (CheckLog ne "") { gotoAndPlay (4); } else { gotoAndPlay(2); } That's it. After a user has successfully logged in we can Load the variables for the first Time. At first they won't have any values. So they come to rest at the default location. // Flash Actionscript used to Load the Variables into the Movie In the 4th frame of the movie the following actionscript is attached to a frame: // Loads the Variables loadVariablesNum ("Load.php?Name="+Name, 0); gotoAndPlay (6); What this does is load the variables from the database and stick them into the movie. The variables that get loaded are the x and y coordinates for each of the 3 objects in the movie. After it makes the call to the script it goes onto Play Frame 6 of the movie. We let the script play for a couple frames then check to see if the variables have been loaded. If they have been loaded we continue with the movie. If not we wait until they are. We do not need to check if they've all been loaded, we just check to see if the variable Comment has been loaded from the database. Here's the script for the second check, which brings us to the final stage of the tutorial. if (Comment ne "") { setProperty ("Object1", _x, xO1); setProperty ("Object1", _y, yO1); setProperty ("Object2", _x, xO2); setProperty ("Object2", _y, yO2); setProperty ("Object3", _x, xO3); setProperty ("Object3", _y, yO3); gotoAndPlay (19); } else { gotoAndPlay (6); } Notice that unless Comment has a value it will loop back to frame number 6. If Comment is equal to a value then it will set the x and y positions of the movie clips then continue and Play Frame number 19. Note: _x and _y will retrieve the current x and y positions of a specified object in Flash.