PDA

View Full Version : getting url variables


liquidj
05-31-2005, 08:21 PM
I have a flash app embedded in a page that needs to access two variables that are in the url string.

http://www.whatever.com?id=123435&num=1234567

The flash movie is trying to capture these two variables and then pass them to the mc application so it can query a db to get the rest of the information. I thought and swf file embedded in a webpage can access the variables on the main timeline. How can I do this?

g

liquidj
05-31-2005, 09:05 PM
answering my own question

<?
$num = $_GET['num'];
$id = $_GET['id'];
$swf = "swf/ecard.swf?id=".$id."&num=".$num;
?>
object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="760" height="500" id="ecard" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="<? echo $swf?>" />
<param name="quality" value="high" />
<param name="bgcolor" value="#F4F2D7" />
<embed src="<? echo $swf?>" quality="high" bgcolor="#F4F2D7" width="760" height="500" name="ecard" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></embed>
</object>