Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

querystings in flash 5?

Status
Not open for further replies.

iridescence

Programmer
Jul 17, 2001
5
GB
can i use a querystring, to dynamicaly create a link in a flash movie?

i.e.

say my url is:


could i request the querystring in flash and make a back button goin to that value on the querystring? i.e. the link would goto default.asp.

(this isn't what i want to do, but its much easier than explaining what i do want to do! so pls dont say use history.back(-1) or anything like that.)

many thx! :eek:)
 
i don't want to use loadVariables as i need flash to get whats on the querystring at that time, and not request another page. i'm starting to think its not possible. :-(
 
Hmmm - dynamic Flash - are you sure this is not a Generator problem? Well I guess waht you want is to be abe to pass
data from JavaScript to the Movie right? Well this is definately a reasonable thing to expect to be able to do I think.

Short of a proper solution - you could dynamically write the
text file which is read during the data loading - using ASP.

But I will think about this, it is something I need to be able to do at some point too.

Bj -->
 
Here is a quote from the Flash Docs in the section about loadVariables:

Action; reads data from an external file, such as a text file or text generated by a CGI script, Active Server Pages (ASP), or Personal Home Page (PHP), and sets the values for variables in a movie or movie clip. This action can also be used to update variables in the active movie with new values.


This leads me to the conclusion that this is the only way to do this. However there are other solutions to your problem - whereby you could have the 'link' call a JavaScript function instead [FSCommand or getURL] which then performs this task - personally I think this is much quicker than having to get every page to write it's location to a text file - that seems very heavy.

Bj

 
i thought about using a session variable with the location in, but it'd need session cookies to work.
text file is a good idea, as long as its not a busy site i guess.

thx loads 4 the help!!! :)
 
Session still does not solve your problem. The actual thing is getting the information into the Flash movie - but seriously, the JavaScript idea will work.

All you do then is deliver control to JavaScript to change pages.

bj
 
The trick to doing this is to place the ASP variables in the embed source. So your code would look something like this:

<%
last_page = Request.Querystring(&quot;last_page&quot;)
%>

Then your <embed> tag should look like this:
<PARAM NAME=movie VALUE=&quot;loader.swf?last_page=<%=last_page%>&quot;>

That's kind of rough but I think you can get the idea from that. The end result is that the Flash movie loads with the variables in place.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top