Jump to content

PHP with flash?


Pi_Mastuh

Recommended Posts

I'm making a flash game where the user sends their score and it inserts it into the database but for some reason it's not connecting properly. The actionscript for the send score button instance is:

[code]on(press) {
getURL("maze1.php", "score");
}[/code]

Maze 1 is:

[code]<?
  if ($msg == 1) {
  print"<BR><BR><P align=center><font face='Arial, Helvetica, sans-serif' size=2>You have earned $mds Points.</font></P>
  <P align=center><font face='Arial, Helvetica, sans-serif' size=2><a href=games.php>Play Again</a></font></P>";
   
  }
 
  if ($error == 2) {
  print"<BR><BR><P align=center><font face='Arial, Helvetica, sans-serif' size=2>Sorry, your score does not count as you have already submitted it more then the 7 times. You can play as many times as you want but you can only submit your score 7 times.</font></P>
  <P align=center><font face='Arial, Helvetica, sans-serif' size=2><a href=games.php>Play Again</a></font></P>";
   
  }
 
  ?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/20570-php-with-flash/
Share on other sites

Well, I assume that Flash has variables?  $blah denotes a PHP variable.  Flash isn't PHP, so using the $ wouldn't work.  Again, I don't know actionscript but there has to be a way to send the score with a link like blah.php?score=variable.

Getting the variable once you've sent it is easy.  So you probably need to find someone who can do Flash
Link to comment
https://forums.phpfreaks.com/topic/20570-php-with-flash/#findComment-92808
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.