AS2/CS4: ExternalInterface passing Variable
hi there,
maybe it is a simple question, but it took me allready 3 hours to try several ways and none work. so i am looking around for help, read many threats and tried many ways ...
i send variables to flash inside the html document:
Code:
... value="name.swf?myname=<?php echo $myname; ?>&myhobby=<?php echo $myhobby; ?>" />
inside flash i can print the variables as dynamic text, its working fine. but now i want to use one of this variables to be sent inside a "ExternalInterface.call" after pressing a button.
Here is my code, but i failed:
Code:
import flash.external.*
ExternalInterface.call('getdata','content.php?myname='+myname+'&detail='+myhobby+'' ,'content');
stop();
(getdata loads content.php inside a div with id="content" - Script works fine in all ways, even with flash. so the code above works now without variable variables)
i played around with '+...+' linke this:
Code:
import flash.external.*
ExternalInterface.call('getdata','content.php?myname="+myname+"&detail="+myhobby+"' ,'content');
stop();
i tried many ways, but nothing works. i realy wonder how i can pass my variables ...
is there anyone who could tell me how to set the variables in the right way? in another forum they said its not possible ... ??