Re: talking between flash and php



usenet@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
> On Tue, 4 Oct 2005 13:05:20 +1300, "windandwaves"
> <winandwaves@xxxxxxxxxxxx> wrote:
>> I have a flash file that I want to execute a short action script and
>> then load a PHP file in the its own window, while posting some of
>> the variables to this new script:
>>
>> e.g.
>> A
>> B
>> C
>> //below is where I get stuck
>> post variables:
>> x = 1;
>> y = 2;
>> open new url = 'test.php' with post variables
>> //end
>>
>> in test.php I then want to be able to show those variables as
>> follows:
>>
>> <?php
>> echo $_POST["x"];
>> echo $_POST["y"];
>>>
>>
>> I have the ABC, but I need the correct syntax for the last few lines
>> in flash.
>
> If you're sending the values with no regard for server response, you
> can append the values to the URL in Flash using GET syntax:
> www.site.com/page.php?x=1&y=2
>
> If you need bidirectional communication, look into the Flash LoadVars
> and LoadVariables objects.
> http://www.actionscripts.org/tutorials/beginner/loadVariables_and_loadVars/


This is what I came up with in Flash:

stop();
var ses:string;

//create the local Shared Object
myLocalSO = sharedobject.getLocal("hookie" );

if(_root.destroy) {
myLocalSO.data.name = "destroyed";
}
else {
//if cookie already exists then get ses from cookie
if (myLocalSO.data.name.length == 32) {
ses = myLocalSO.data.name;
getURL("index.php", "_self", "GET");
}
//if cookie does not exist then make it
else {
//get parameter from query string (INPUT)
//if(_root.PHPSESSID){
// ses = _root.PHPSESSID;
// getURL("episode.php", "_self", "GET");
//}
//if(ses.length <> 32) {
// ses = "testcookie" + getTimer()
//}
myLocalSO.data.name = _root.PHPSESSID;
}
ses = myLocalSO.data.name;
getURL("voter.php", "_self", "POST");
}


.



Relevant Pages

  • Re: Flash file in PPT 2007
    ... original flash file ... ... copy the slide into PPT 2007, the animation also runs fine – ...
    (microsoft.public.powerpoint)
  • Re: Fourier Series Tutorial
    ... see the defining user interactive program for the tutorial. ... It is predominantly a flash site. ... command and to propery load a flash file into IE requires a java ... tutorials. ...
    (comp.dsp)
  • Re: Flash file in PPT 2007
    ... I checked the properties in the old slide with the flash animation, ... is there any way to "unembed" the flash file and save it ... copy the slide into PPT 2007, the animation also runs fine – ...
    (microsoft.public.powerpoint)
  • Re: how to display flash file(swf) in ppc2005
    ... animations so there is no actionscript going on there. ... There is a flash plug-infor pocket pc. ... At first I use ie to display it, ... How can I display flash file in ppc, ...
    (microsoft.public.pocketpc.developer)
  • Re: how to display flash file(swf) in ppc2005
    ... So bear in mind how complex ... There is a flash plug-infor pocket pc. ... At first I use ie to display it, ... How can I display flash file in ppc, ...
    (microsoft.public.pocketpc.developer)