|
-
Pass variables to my swf from a url link
Hello everyone,
I was wondering if there is a way to pass variables to my swf from a simple url link, like:
http://www.whatever.com/myswf.swf?bla=123&bla2=456
So on my swf i would get the values of bla and bla2.
Kind regards,
Leo.
-
Senior Member
You need a php page, where your movie is embedded. Here is an example of such page, where the login data are transferred to the movie.
PHP Code:
<?php /************************************************************ Payment.php *************************************************************/
// variables from the movie
$log = $_GET['login'];
echo "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'> <head> <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' /> <title>Mailing</title> <script language='javascript'>AC_FL_RunContent = 0;</script> <script src='AC_RunActiveContent.js' language='javascript'></script> </head> <body bgcolor='#ffffff'> <center> <script language='javascript'> if (AC_FL_RunContent == 0) { alert('This page requires AC_RunActiveContent.js.'); } else { AC_FL_RunContent( 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0', 'width', '900', 'height', '750', 'src', 'Payment', 'quality', 'high', 'pluginspage', 'http://www.macromedia.com/go/getflashplayer', 'align', 'middle', 'play', 'true', 'loop', 'true', 'scale', 'showall', 'wmode', 'window', 'devicefont', 'false', 'id', 'Payment', 'bgcolor', '#ffffff', 'name', 'Payment', 'menu', 'true', 'allowFullScreen', 'false', 'allowScriptAccess','sameDomain', 'movie', 'Payment?login=".$log."', 'salign', '' ); //end AC code } </script></a> </center> </body> </html>";
?>
Inside your movie you are asking for the loaderinfo:
root.loaderInfo.parameters.login
- The right of the People to create Flash movies shall not be infringed. -
-
Thanks a lot!
Gonna work on it right away!
-
Total Universe Mod
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|