-
Container Movie To Receive Variables
Hi guys, this is my first post and I'm pretty basic at Flash so maybe I've bitten off more than I can chew but please be gentle!
Basically, I need to make a container movie that loads in other SWF files. It should do this by getting a variable from the URL or QUERY STRING. So for example if I go to page.php?id=2345 then I need the container to look for and load 2345.swf into itself. Can anyone point me in the right direction or to some tutorials that could help me do this?
Thanks.
-
Search this forum for "FlashVars". The outline of what you need to do is 1) set up a php page (or other server side technology) to echo the GET variables into the flashvars parameter of your container swf. 2) read those flashvars via loaderInfo.parameters. 3) load up the appropriate contained swf.
If you don't have access to php, it's possible to pull the page url in through ExternalInterface and javascript, but that's a little more advanced in my opinion.
-
Thanks very much for this. The PHP part is easy for me, it's what I do, it's just that I don't work with Flash a lot so I had no idea how to retrieve the variable and use it within Flash. Thanks again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|