all groups > flash actionscript > december 2004 >
You're in the

flash actionscript

group:

How to pass a url parameter to Flash?


Re: How to pass a url parameter to Flash? Travis Newbury
12/29/2004 7:14:50 PM
flash actionscript:
[quoted text, click to view]

Do you want to know how to add parameters to a url you will use in a
flash application? Or do you want the flash page to call the shop.pl,
and parse the SID from it?

--
Re: How to pass a url parameter to Flash? Travis Newbury
12/29/2004 8:14:57 PM
[quoted text, click to view]

In the object tag put the ffollowing:

<param name="movie" value="yourmoviename.swf?SID=PUT_SID_HERE" />

--
How to pass a url parameter to Flash? bfint
12/29/2004 10:21:49 PM
Newbie needs help, please.
I need to pass a parameter (SID=xxxxxxxxxxxxx) to urls in links in the Flash
page.
On html pages, the parameter is added to the url by Hassan Consulting's cgi
shopping cart program.
For example, the html code contains a link to:
http://www.xyz.com/cgi-local/shop.pl/page=head.html/SID=PUT_SID_HERE.
The url goes tp the destination page via shop.pl which creates the SID. Links
in the destination page's html are converted to:
http://www.xyz.com/cgi-local/shop.pl/page=head.html/SID=1104358515.32307

Any help is greatly appreciated.
Re: How to pass a url parameter to Flash? abeall
12/30/2004 12:04:36 AM
'to urls in links in the Flash '
What do you mean? When do you need to pass the param?

Re: How to pass a url parameter to Flash? bfint
12/30/2004 12:13:27 AM
I need to take the SID and add it to links in the Flash movie.

In the html, the cgi finds any links that include "SID=PUT_SID_HERE" and adds
the SID number in place of the put sid here text and it adds the SID to the url
displayed in the address bar. From that point on, the SID carries over to all
urls - until you leave the site.

I need to add that SID number to the links in the Flash movie.

Thanks for pointing me to the FlashVars. Maybe there's something there that
will help.
Re: How to pass a url parameter to Flash? abeall
12/30/2004 12:20:19 AM
I suppose I don't understand what SID=PUT_SID_HERE is. Is it a GETstring?

Re: How to pass a url parameter to Flash? bfint
12/30/2004 2:29:40 AM
No, it's not a GET string in that sense.

The Hassan cart doesn't use cookies to keep the session, it passes the SID (I
guess it's Shopper ID) from page to page via the cgi. This tracks the session
and keeps the cart active. if you leave the cart area, you drop the SID and
lose the contents of the cart. You can 'back' your way to a page that has the
SID and retain the cart - it's all in the url.

I need to load the SID=xxxxxxxxxxxxx data into the url of the outgoing links,
so I need to capture the SID value in the url and replace SID=PUT_SID_HERE with
the numerical value. I don't know Action Script, but I imagine it's something
to the effect of

1) check url for value SID=xxxxxxxxxxxxx
2) replace PUT_SID_HERE with xxxxxxxxxxxxxx in all urls in the Flash movie

Does that make sense?

Thanks for spending your time on this. I didn't buy the cart for the company,
but I have to work with it.


Re: How to pass a url parameter to Flash? rusty0412
12/30/2004 2:35:43 AM
dude, I did this like 3 days ago jejej! easy, use flash vars...
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_16417 and in
the button you put on(release) { if(sid != null &amp;&amp; sid != undefined)
getURL('index.php?sid=' + sid); else getURL('index.php'); } maybe
you need to use _parent.sid... you figure it out :)
Re: How to pass a url parameter to Flash? bfint
12/30/2004 3:20:40 AM
Thanks, Rusty - not sure if the php thing applies, but I'm game to try.

I'll be back to let you and abeall know what shook loose in the end.

Re: How to pass a url parameter to Flash? Travis
12/30/2004 3:24:17 AM
[quoted text, click to view]
outgoing links...

Put the SID=PUT_SID_HERE in the Object tag as explained in my earlier
post. Then in your movie, on all your links put something like this:

getURL("www.somehtmlpage.com?SID=" + _root.SID);

The Object tag will pass (and create the SID variable ) in the Movie.
Your movie adds that variable passed to it to the URLs.
Re: How to pass a url parameter to Flash? Travis Newbury
1/2/2005 6:30:14 PM
[quoted text, click to view]

I have no idea what you are talking about nor will anyone else reading
this post. How about a quote?
--
Re: How to pass a url parameter to Flash? bfint
1/2/2005 8:47:50 PM
Sorry - I guess I need to learn a lot more about this. I can't follow the
syntax and the ? isn't available in the url. The parameter is within / / and
additional parameters follow.

Thanks for your help.
AddThis Social Bookmark Button