View Full Version : variables from php
ziggy1621
07-16-2007, 11:31 PM
ok here's the deal... I need to make a countdown script that sends users to their new profile and I need the flash countdown to end with a "Click here to go to your profile".
I'm using php for everything, so I want to pass the variable $directory to the flash script so that it becomes the getUrl landing page.
So if someone can tell me how to get flash to receive $directory="../myDirectory"; I would really appreciate it.
thanks in advance,
ziggy
_Aerospace_Eng_
07-16-2007, 11:50 PM
You can use the query string to pass the variable to php. Just use this for the url to your flash file
http://www.somesite.com/yourflash.swf?page=<?php echo $directory; ?>
Then in the flash
$url = this.page;
getURL($url,'_self');
ziggy1621
07-17-2007, 12:03 AM
You can use the query string to pass the variable to php. Just use this for the url to your flash file
thanks, the php code is throwing me off... this will be a countdown script in the middle of the page, so are you saying where I embed the flash file I put that code instead of a regular swf ?
I.E.
<param name="movie" value="http://www.somesite.com/yourflash.swf?page=<?php echo $directory; ?>" />
&
<embed src="http://www.somesite.com/yourflash.swf?page=<?php echo $directory; ?>" quality="high"...
_Aerospace_Eng_
07-17-2007, 12:34 AM
Yes thats what I'm saying though I recommend that you use SWFObject (http://blog.deconcept.com/swfobject/) instead.
ziggy1621
07-17-2007, 01:44 AM
Yes thats what I'm saying though I recommend that you use SWFObject (http://blog.deconcept.com/swfobject/) instead.
Sweet! Thanks, I'll give it a go in the a.m.
ziggy
ziggy1621
07-30-2007, 06:36 PM
BTW. this worked great, thanks
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.