I have been googling for 5 days. I have some good knowledge of php and i am fairly new to flash. I have done some really cool things with PHP/MySQL relatively easy.
my code goes as:
<?php $Flash=flash.swf; echo "<table cellpadding='0' cellspacing='0' width='500' style='border: 0px outset; margin-left: 1px;' align='center'><tr><td>". '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="400" height="400" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="'.$Flash.'" /> <param name="quality" value="high" /> <param name="bgcolor" value="#000000" /> <embed src="'.$Flash.'" quality="high" bgcolor="#000000" width="400" height="400" name="thegame" align="middle" allowScriptAccess="sameDo main" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> </td></tr></table>';
if i use
<?php echo " &FromPHP=Hello World& "; ?>
where to add
loadVariablesNum("phpfile.php", 0, "POST");
in my current code??
i know that gettimer is a function in flash which provides timer value for flash file execution, i want the same value in php but with the code above
i have gone through lot many websites but all show same info as open flash file add loadvar or loadvarnum etc
is it needed if i don't want to open the src of the flash file
i have some readymade flash games and just want the time
these file takes to completely execute, in php
the utterly simple php:
<?php //The value of $x would be printed to the screen but the SWF would not read the data $x = "abc"; print $x; //The value of $x would be printed to the screen and because of the prefix 'myVar=', the SWF will //interpret this as being the intended value for the variable myVar in the SWF print "myVar=$x"; ?>
The second comment in the code never worked out for me Flash does not see it 'myVar='.
I have tried other tutorials out there and end up in the same place...
i have flash code and php code in the same file, so what to add in the flash execution??? and in php
I have seen the code I am trying to use in several scripts
<? print "myVar=$x"; ?>except EVERY time I have seen it, it looks like this
<? print "&myVar=$x&"; ?>or atleast 1 of the added ampersands.
Would this extremely basic simple script vary for different versions of Flash/ActionScript?
Should I be using the loadVariables or should it be loadVariablesNum? I've tried both...
If I copy and paste this simple code you would think it WOULD work! It does not!!!
I understand the "&" is what Flash uses to seperate elements from the external text.
If I can figure out how to pass vars between Flash and PHP I am on to great things
No kidding, I have tried every combination between everything mentioned above. I have looked everywhere I know of on the web. I have not been able to find anything to get me started that is as simple as this code ( SHOULD BE )!
Please help, thanks in advance,
P.S. Some good (Flash/PHP) resources would be greatly appreciated. Lot's of great PHP resources out there but not too much using the combination,
This post has been edited by pioSko: 15 February 2006 - 06:25 AM