PDA

View Full Version : Loading Variables into flash and out..


Web Guy
11-27-2002, 04:26 PM
We are trying to load our Variables into a flash movie and then out once they click on something inside the flash movie. I am looking thru our Flash MX Advanced Action Scripting Book and I am a little confused. Any help on this subject would be great. We are trying to load variables thru a URL String..

My string looks like this.

http://www.journeyed.com/cgi-bin/sgsh0101.exe?SKW=adobeloop&FNM=20&UID=!+USID!&GEN0=!+GEN0!&GEN1=!+GEN1!&GEN2=!+GEN2!&GEN3=!+GEN3!&GEN4=!+GEN4!&GEN5=!+GEN5!&GEN6=!+GEN6!&GEN7=!+GEN7!&GEN8=!+GEN8!&GEN9=!+GEN9!

When our site loads it gives the customers a User ID Number for the shopping carts and some other variables are attatched to the GEN Variables as well. I need this to pull into flash with the User ID and such and then after being clicked on pass the info thru to the next HTML and and so on.

Thanks,
Jason Webb

Ian Jones
11-28-2002, 05:00 AM
Forgive me if I'm saying a stupid thing... but are you using xml to pass clean variables into Flash?

Web Guy
11-28-2002, 11:55 PM
No, we are looking to pass the URL string with variables into the flash movie and then back out. I have tried the loadvar and then using the post but have not had any luck keeping the USER ID and other variables after passing thru the flash movie.

Ian Jones
11-29-2002, 02:46 AM
So your saying they are getting in alright? just not remaining intact when they go out of Flash?

This would be a bit of a workaround but you could try using dynamic text, reading from a *.txt file on your server. This could act as a clean and temporary method. Mind you, its only possible with Flash MX, as far as I know... like externally loadable files such as movies and jpegs were just implemented for easier flash website updates.

I'm really not a programmer, so all I can do is throw some wild suggestions around... :)

Web Guy
11-29-2002, 03:46 AM
I would have thought that bringing in a URL STRING with variables would have been allot easier. And yes I am using MX at the moment. Basically when you hit our site it gives the users a USER ID SESSION and passes some other variables on some of our other sites like logos, tag lines and much more. I beleive the way you are suppose to do it is with loadvariable and then post once they click on the link inside the flash movie. Well I hope someone on this board could point me to some help or another board with more info on the e-commerce aspect of flash.

Thanks for the help though!

The site I am speaking of is www.journeyed.com and the main image on the home page is what I would like to start working on with flash and more interactivity on the site.

magpie
11-29-2002, 09:27 AM
When you use a URL, it is passed to the page/cgi on the server, which then sends back a page of information which is what is actually loaded into the Flash movie, not the URL itself.

The page that gets sent back can be encoded in a couple of ways, either XML or encoded as if it was a URL. But it's the contents of the page that get loaded by the Flash movie, not the URL used to generate the contents.

The page contents only need the variable values, without the path to the cgi (everything that would come after the ? in a URL):
var1=Value+One&var2=Value+Two

Web Guy
11-29-2002, 09:49 PM
Ok, Monday when I get back to work I will go about it that way. What you said makes allot of sense. Any other info or tutorials are greatly appreciated. :)

Ian Jones
11-30-2002, 01:38 AM
oh..was that it! arrrrrrrrgh. :D

CGTalk Moderation
01-13-2006, 11:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.