|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
由于ASP还是一种Script语言所没除了大量使用组件外,没有办法提高其工作效率。它必须面对即时编绎的时间考验,同时我们还不知其背后的组件会是一个什么样的状况;ControllingFlashwithASP
ArecentprojecthasrequiredafewthingsthatIhaventdoneforawhile.OneisdealingwithFlash-
whichIhaventdonesinceshortlyafterthereleaseofFlash3.0.Theotheristoactuallyfiguresome
wayofgettingdynamiccontentinwithoutusingGenerator.Onesolutionwevecomeupwithinvolves
jumpingoutofaflashmovieintoanASPpage,thenbackagain.Ofcourseourdesignerswerealittle
miffed,sincetheyvebuilttheflashmoviewithallsortsofdifferenttransitionsfromplacetoplace,
andthissolutionwouldmeanstartingfromtheopeningsceneofthemovieevrytime.Italsostankfroma
usabilitystandpoint.
Notso,saidI
Toaccomplishtheeffectofjumpingbackinataspecificframe,wesimplyloadsomevariablesintothe
flashmovieandusethemtojumptotherightframe.Coolhuh?
Initiallywehadalittletrouble,sincedesignersdontneedtoknowanythingaboutASP,soconveying
informationbackandforthwasalittletricky,butwegotthere.Howitworksislikethis
IntheflashMovie,thefirstframehasapieceofactionscriptwhichsimplyreads
GoToAndPlay(scene);
Stop();
ThesyntaxisslightlydifferentinFlash4.0-thisisFlash5.0,butyougetmydrift
Now,whenjumpingbackfromtheASPpagetotheFlashpage,wetagaquerystringparameterontothelinks
flash.asp?scene=awards
flash.asp?scene=services
flash.asp?scene=contact
Andsoon.Thescriptflash.asplookssomethinglikethis...
<%@Language="JScript"%><%
Response.Buffer=true;Response.Expires=-1441;
vars=newString(Request.Querystring("scene"));
strScene=(s!=undefined&&s!=)?s:default;
%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>FlashControl</title>
</head>
<body>
<objectclassid="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">
<paramname="movie"value="http://edu.cnzz.cn/NewsInfo/movie.swf?scene=<%=strScene%>">
<paramname="quality"value="high">
<embedsrc="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>
</html>
So,ifwehavenothinginthequerystring,itloadsthescenedefault-elseitloadswhateverASPtells
itto.coolhuh?
ThistrickwillworkfromFlash4.0upwards-flash5.0isparticularlynifty,andicouldgettolike
it...
减少客户内IT专业人才缺乏带来的影响。ASP的客户员工利用浏览器进入相关的应用软件,简单易用,无需专业技术支持。 |
|