ActionScript 3 AS3 Flash Vars

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 AS3 Flash Vars相关的知识,希望对你有一定的参考价值。

// this is used to pass reference to the video size, to dynamically change the playback component size to the video dimensions

// in the actionscript
var thisVidWidthVar:String;
var thisVidHeightVar:String;
var thisVidSrc:String;
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;

// check to see if var exists, so it doesn't throw errors otherwise
if (paramObj.thisVidSrc){
	thisVidSrc = String(paramObj.thisVidSrc);
	thisVidWidthVar = String(paramObj.thisVidWidth);
	thisVidHeightVar = String(paramObj.thisVidHeight);
}

// object params
<param name="FlashVars" value="thisVidSrc=videosrc.flv&thisVidWidth=640&thisVidHeight=480"></param>
// flashVars on embed
<embed flashVars="thisVidSrc=videosrc.flv&thisVidWidth=640&thisVidHeight=480" src="vidPlayer/videoplayer.swf" quality="high" bgcolor="#000000" width="640" height="480" name="videoplayer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />

以上是关于ActionScript 3 AS3 Flash Vars的主要内容,如果未能解决你的问题,请参考以下文章

ActionScript 3 条件速记Flash AS3

ActionScript 3 cerrar aplicacion flash as3

ActionScript 3 AS3 flash.system.Capabilities属性

ActionScript 3 使用AS3从Flash触发Javascript

ActionScript 3 在Flash AS3中嵌入抗锯齿字体

ActionScript 3 简单的Flash AS3画廊/幻灯片