Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

PHP and ActionScripting

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

PHP and ActionScripting

Postby blake_ensenita » Wed Jun 25, 2003 12:52 pm

Does anybody know the right way to take variables from a text box(s) in Flash, send the variables to a php file, validate them with the database, and write them back into Flash?

I'm currently using loadVariablesNum(), but that doesn't seem to work. Please, no simple answers(ie. "Use loadVariablesNum()") . I have tried many different variations and this still doesn't seem to work.

Thanks

Blake_E
User avatar
blake_ensenita
New php-forum User
New php-forum User
 
Posts: 8
Joined: Tue Jun 24, 2003 11:15 am
Location: Vernon, BC, Canada

Postby Redcircle » Wed Jun 25, 2003 5:27 pm

You problem arises from the fact that flash does not wait for variables to be loaded. There is a delay from when you load the vars and when they are actually loaded into flash. For example if you load a var in one frame it may take a few frames for the loaded variable to actually be loaded into flash. By the time the variable is loaded it has already passed the frame that checks for the variable.

The solution is to have flash wait for a variable _root.done to equal "1" before advancing to the next frame. And you would set _root.done at the very end of your php call.

PHP
Code: Select all
echo '&done=1';


in the flash frame you need to create a container MC an put
Flash
Code: Select all
onClipEvent(enterFrame)
{
   if(_root.done == "1")
  {
      _root.done ="";
     gotoAndPlay(2);
  }

}
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 7 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron