Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: PHP - returning vars to flash |
From: | carl captieux |
Date: | Fri, 6 Oct 2000 18:45:43 +0100 |
Thanks Ted.
That's done the trick
Kind regards,
Carl
TR Henigson wrote:
> Oh sorry. I forgot one very important feature. Each variable assignment
> must be separated by an ampersand. There shouldn't be a space as you have.
> The code should have been (note the ampersand tacked onto the variables
> string and scriptFinished):
>
> <?PHP
>
> $number=7;
> $string="hello carl";
>
> $output="number=".$number;
> $output.="&string=".urlencode($string);
> $output.="&scriptFinished=1";
> echo $output;
>
> ?>
>
> Ted
>
> > -----Original Message-----
> > From: carl captieux [carl [dot] captieuxi-dmedia [dot] com (mailto:carl [dot] captieuxi-dmedia [dot] com)]
> > Sent: Friday, October 06, 2000 5:44 AM
> > To: ted3bits [dot] com
> > Subject: Re: FLASH: PHP - returning vars to flash
> >
> >
> > Hi Ted,
> >
> > Thanks for your reply.
> >
> > I hope you don't mind me mailing you directly.
> >
> > I tried your code. I have defined the following variable fields in Flash:
> >
> > number
> > string
> > scriptFinished
> >
> > However, when I call 'loadVariablesNum ("get_vars.php3", 0,
> > "POST");' from
> > a button, the php returns the variables as a single string into the
> > variable number field as:
> >
> > 7string=hello carlscriptFinished=1
> >
> > here's the php code:
> >
> > <?PHP
> >
> > $number=7;
> > $string="hello carl";
> >
> > $output="number=".$number;
> > $output.="string=".urlencode($string);
> > $output.="scriptFinished=1";
> > echo $output;
> >
> > ?>
> >
> > I did try as you suggested to implement a check using if( not
> > scriptFinished) etc.. but it just seemed to hang.
> >
> > Please find attached fla and php file. If you wouldn't mind having at look
> > I would be grateful.
> >
> > Kind regards,
> >
> > Carl
> >
> >
> > TR Henigson wrote:
> >
> > > For example: let's return values for three variables with a PHP script.
> > >
> > > <?PHP
> > >
> > > $number=7;
> > > $string="A short string";
> > >
> > > $output="number=".$number;
> > > $output.="string=".urlencode($string);
> > > $output.="scriptFinished=1";
> > >
> > > echo $output;
> > >
> > > ?>
> > >
> > > In your Flash movie, set up three frames.
> > > Frame1: Set scriptFinished=0 and Load the vars from the PHP script
> > > Frame2: blank keyframe
> > > Frame3: If(not scriptFinished) then goto and play _currentframe-1
> > > .
> > > .
> > > .
> > > the rest of your movie
> > >
> > > It's important not to try and do anything with the variables returned
> > > by the PHP script until they've all been loaded. That's what the
> > > scriptFinished variable is for. This of course assumes you are calling
> > > the PHP script from a frame action. You could do it from a button, in
> > > which case you'd want to disable the button after it is pressed until
> > > the PHP script returns so it doesn't get called twice.
> > >
> > > Ted Henigson
> > >
> > > > -----Original Message-----
> > > > From: ownerchinwag [dot] com [ownerchinwag [dot] com]On">mailto:ownerchinwag [dot] com]On Behalf Of carl
> > > > captieux
> > > > Sent: Thursday, October 05, 2000 10:04 AM
> > > > To: flasherchinwag [dot] com
> > > > Subject: FLASH: PHP - returning vars to flash
> > > >
> > > >
> > > >
> > > >
> > > > Hi All,
> > > >
> > > > How do you return values to a Flash movie using PHP?
> > > >
> > > > for example using ' loadVariablesNum ("get_vars.php3", 0,
> > > > "POST");' to run a PHP
> > > > script and return a value to Flash.
> > > >
> > > > Thanks
> > > >
> > > > Carl
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > NudeGuru.com is proud to sponsor the Flasher list
> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > IT'S THE ART OF MONEY, HONEY!
> > > > Tips and Advice from some of the most popular Flash
> > > > artists + industry power-brokers on how to hold onto
> > > > your rights, negotiate contracts and get full value
> > > > for your work.http://www.nudeguru.com from Franke James
> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > To unsubscribe or change your list settings go to
> > > > http://www.chinwag.com/flasher or email helpchinwag [dot] com
> > > >
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > NudeGuru.com is proud to sponsor the Flasher list
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > IT'S THE ART OF MONEY, HONEY!
> > > Tips and Advice from some of the most popular Flash
> > > artists + industry power-brokers on how to hold onto
> > > your rights, negotiate contracts and get full value
> > > for your work.http://www.nudeguru.com from Franke James
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > To unsubscribe or change your list settings go to
> > > http://www.chinwag.com/flasher or email helpchinwag [dot] com
> >
> >
> >
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> NudeGuru.com is proud to sponsor the Flasher list
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> IT'S THE ART OF MONEY, HONEY!
> Tips and Advice from some of the most popular Flash
> artists + industry power-brokers on how to hold onto
> your rights, negotiate contracts and get full value
> for your work.http://www.nudeguru.com from Franke James
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpchinwag [dot] com
--
Carl Captieux
Head of Interactive Development
ID Media Ltd, London
t. 020 7749 5400 ext 420
m. 0771 863 2687
w. www.i-dmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
RE: FLASH: PHP - returning vars to flash, TR Henigson
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]