-
您的位置:首页 → 技术开发 → ASP技巧 → 用ASP控制Flash
用ASP控制Flash
时间:2004/11/7 4:10:00来源:本站整理作者:蓝点我要评论(0)
-
Controlling Flash with ASP
A recent project has required a few things that I haven't done for a while. One is dealing with Flash -
which I haven't done since shortly after the release of Flash 3.0. The other is 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 into 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 from place to place,
and this solution would mean starting from the opening scene of the movie evry time. It also stank from a
usability standpoint.
Not so, said I
To accomplish the effect of jumping back in at 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 was a little tricky, but we got there. How it works is like this
In the flash Movie, the first frame has a piece of actionscript which simply reads
GoToAndPlay(scene);
Stop();
The syntax is slightly different in Flash 4.0 - this is Flash 5.0, but you get 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';
%>
Flash Control
So, if we have nothing in the querystring, it loads the scene 'default' - else it loads whatever ASP tells
it to. cool huh?
This trick will work from Flash 4.0 upwards - flash 5.0 is particularly nifty, and i could get to like
it...
相关阅读
Mac访问Windows共享文件夹Windows 7正版系统验证方法windows 8.1系统版本号查看方法Windows 8.1系统电话激活时无法输入微软返回代码解决方法Windows 8如何调整屏幕分辨率windows8.1磁盘占用100%解决方法Mac双系统如何删除Boot Camp安装的Windows分区Apple教你如何在Mac 上运行 Windows
-
热门文章
没有查询到任何记录。
最新文章
VB.NET 2005编写定时关
Jquery get/post下乱码解决方法 前台gbk gb如何使用数据绑定控件显示数据ASP脚本循环语句ASP怎么提速
人气排行
轻松解决"Server Application Error"和iis"一起学习DataGridView调整列宽用ASP随机生成文件名的函数Jquery get/post下乱码解决方法 前台gbk gbODBC Drivers错误80004005的解决办法返回UPDATE SQL语句所影响的行数的方法用Javascript隐藏超级链接的真实地址两个不同数据库表的分页显示解决方案
查看所有0条评论>>