Re: SENDING PHP VARS to FLASH
| From: | Hans H. Anderson | Date: | Mon, 07 Aug 2000 15:15:11 +0000 |
| Subject: | Re: SENDING PHP VARS to FLASH | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10495@lists.php.net to get a copy of this message | ||
Ralph,
Those links that Randall and others sent are useful (I didn't know about
Flash support in PHP, now I'm upgrading to PHP4 for sure!).
Anyway, to pass a session variable to Flash, do this:
In the object and embed tags, add this sort of code to the src attribute,
which gives the location of the movie:
src="/path/to/movie.swf?session_id=<?php print $session_id; ?>"
Now, in your movie, 'session_id' will be in your *main* timeline. If you
have a button or a movie clip that is on it's own timeline, that variable
won't appear in it, but it will appear in the main timeline.
If you have a movie clip with a button in it, and that movie clip instance
is called 'mc_form', in the first frame of your movie.swf you'd put an
action
Set Variable: "/fred:session_id" = session_id
In other words, the vars are not 'global'. This is moot if your button to
send the user back to your pages is on the main timeline.
Note also that if you send vars this way, in a query_string, you don't
need to worry about Load Vars unless you want more.
I have a couple of cool (in my opinion) movies that demonstrate PHP/MySQL
and Flash together:
http://www.goofiness.com/boohoo/flash/
http://www.goofiness.com/personality/
They aren't tutorials, but they contain a lot of the ActionScripting along
with PHP.
Hans
On Mon, 7 Aug 2000, Randall Goguen wrote:
>
>
> http://www.php.net/manual/ref.swf.php
> http://www.thickbook.com/extra/php_flashyquote.phtml
>
> ranman@nbnet.nb.ca
> #PHP IRC EfNet
> #LinuxSupport IRC EfNet
> http://www.LinuxGuruz.org
>
>
> On Mon, 7 Aug 2000, Ralph Guzman wrote:
>
> > Does anybody know of any tutorials or examples that I can study regarding
> > passing variables from a PHP script to a Flash movie.
> >
> > I need to pass a session key to Flash movie. The reason being that at the
> > end of the Flash movie, the user is presented with two links that refer back
> > to our pages. These pages expect this session key.
> >
> > Any help is greatly appreciated.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>
Hans Anderson ~ me@hansanderson.com
PO Box 426, Missoula, MT 59806 | PHP, Search Engines, SQL
(800)397-9116 / (406)549-6524 | Databases, Flash Multimedia,
http://www.hansanderson.com | Killer Audio Production,
http://www.goofiness.com | Minty Fresh Breath.