Link to home
Start Free TrialLog in
Avatar of precision
precision

asked on

php to swf - param name="FlashVars" value="id=123&rid=456"

Ok, I am not a flash expert so be understanding, thanks!  I have PHP file that will send data into flash, such as:

goingintoflash.php
<param name="FlashVars" value="id=123&wa=456&ww=789">

Inside the fla file I have image that is clickable or hotspot, not sure of flash lingo

on (release) {
      getURL("learnmore.php", "_self");
}

How do I get in flash, learnmore.php to be "learnmore.php?id=123&wa=456&ww=789  ???
I read somewhere that it goes in the root?  Where is that????
ASKER CERTIFIED SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of precision
precision

ASKER

Interesting...so my index.html will contain the flashVars and that will inject the data into flash and using this as you told me...

on (release) {
     getURL("learnmore.php?id="+_root.id+"&wa="+_root.wa+"&ww="+_root.ww, "_self");
}

and when user clicks on the url it will drag the data back out?

Nice if so...Let me know before I try
yes, you got it right,
Ok, just had the time to try, does not work, I know its me, not sure where to find the issue.  In the index.php file I have:

<param name="FlashVars" value="id=123&wa=456&ww=789">

Then in the swf I stuck:

on (release) {
     getURL("learnmore.php?id="+_root.id+"&wa="+_root.wa+"&ww="+_root.ww, "_self");
}

Not working though, does the code above have to be in certain scene or level? I am not a flash expert.

Thanks!
you have to put the above code on a button..

and on click of button above code will execute...

alternative, just put following code in FLA's first frame:
---------
getURL("learnmore.php?id="+_root.id+"&wa="+_root.wa+"&ww="+_root.ww, "_self");
---------

it will gets executed itself as swf loads in browser
Its on a button already, I just exchanged:

on (release) {
     getURL("learnmore.php", "_self");
}

FOR

on (release) {
     getURL("learnmore.php?id="+_root.id+"&wa="+_root.wa+"&ww="+_root.ww, "_self");
}

My learnmore.php has in body:

<?=$_GET['id']?><br>
<?=$_GET['wa']?><br>
<?=$_GET['ww']?><br>

learnmore.php comes up blank.
Just got it to work....Dummy me...I did not refesh one page...YOU THE MAN!