A recent project has required a few things that I haven ' t doing for a while. One is dealing with Flash-
which I haven ' t done since shortly on the release of Flash 3.0. The other are to actually figure some
Way of getting dynamic content in without using generator. One solution we ' ve come up with involves
Jumping out of a flash movie to an ASP page, then back again. Of course our designers were a little
Miffed, since they ' ve built the Flash movie with all sorts of different transitions
And this solution would mean starting from the opening scene of the movie. It also stank from a
Usability standpoint.
Not so, said I
To accomplish the effect of jumping back in a specific frame, we simply load some variables into the
Flash movie and use them to jump to the right frame. Cool huh?
Initially we had a little trouble, since designers don ' t need to know anything about ASP, so conveying
Information back and forth is a little tricky, but we got there. How it works are like this
In the Flash Movie, the I frame has a piece of ActionScript which simply reads
gotoAndPlay (Scene);
Stop ();
The syntax is slightly different in Flash 4.0-this are Flash 5.0, but you have my drift
Now, when jumping back from the ASP page to the Flash page, we tag a querystring parameter onto the links
Flash.asp?scene=awards
Flash.asp?scene=services
Flash.asp?scene=contact
And so on. The script flash.asp looks something like this ...
<% @Language = "JScript"%><%
Response.Buffer = true; Response.Expires =-1441;
var s = new String (Request.QueryString ("scene"));
Strscene = (s!= ' undefined ' &&s!= ')? s: ' Default ';
%><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Dtd/xhtml1-transitional.dtd" >
<title>flash control</title>
<body>
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
Codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"
Width= "750" height= "395" >
<param name= "movie" value= "http://edu.cnzz.cn/NewsInfo/movie.swf?scene=<%= strscene%>" >
<param name= "Quality" value= "High" >
<embed src= "http://edu.cnzz.cn/NewsInfo/movie.swf?scene=<%= strscene%>" quality= "High"
Pluginspage= "http://www.macromedia.com/shockwave/download/index.cgi?"
P1_prod_version=shockwaveflash "
Type= "Application/x-shockwave-flash" width= "750" height= "395" >
</embed>
</object>
</body>
So, if we have the QueryString, it loads the scene ' default '-else it loads whatever ASP tells
it to. Cool huh?
This trick would work from Flash 4.0 Upwards-flash 5.0 are particularly nifty, and I could get-like
It ...
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.