TRUMP 2020.
Manipulating Variables Within a Flash-based Reference
Collapse
X
-
Try this. It's PHP based:
PHP Code:<?php
// See if the user has a playername
if(isset($_POST['playername']) && !empty($_POST['playername'])) {
// Load the flash movie with playername
?>
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" height="180" width="470">
<param name="movie" value="http://www.mlgpro.com/bnet/mlgstats.swf?playerName=<?php echo $_POST['playername']; ?>">
<param name="quality" value="high">
<embed src="http://www.mlgpro.com/bnet/mlgstats.swf?playerName=<?php echo $_POST['playername']; ?>" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" height="180" width="470">
</object>
<?php
// If no playername is assigned, show a prompt box for them to type a name
} else {
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<input type="text" name="playername" />
<input type="submit" name="submit" value="Play!" />
</form>
<?php
}
?>
David-----
Do you fear the obsolescence of the metanarrative apparatus of legitimation? -
Sweet, it worked! Thanks a bunch.
That method is cool, using PHP and all.
One last question... Any idea on how to possibly keep the textbox and "Play!" button intact, even when the flash object is loaded, so one doesn't have to press the back button to get a new stat?Comment
-
Just get rid of the else block like this:
PHP Code:<?php
// See if the user has a playername
if(isset($_POST['playername']) && !empty($_POST['playername'])) {
// Load the flash movie with playername
?>
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" height="180" width="470">
<param name="movie" value="http://www.mlgpro.com/bnet/mlgstats.swf?playerName=<?php echo $_POST['playername']; ?>">
<param name="quality" value="high">
<embed src="http://www.mlgpro.com/bnet/mlgstats.swf?playerName=<?php echo $_POST['playername']; ?>" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" height="180" width="470">
</object>
<?php
// If no playername is assigned, show a prompt box for them to type a name
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<input type="text" name="playername" />
<input type="submit" name="submit" value="Play!" />
</form>"Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - BuddhaComment
-
Excellent, thank you both.
If you're interested in exactly what flash-object it is, it's for the new popular video game "Halo 2", check it out: http://zforcenetwork.com/stats.php (for example, type in nbot or stealth06, just some names to try).
I'll be sprucing the page up a little later.Comment
Comment