'[펌] FlashVars 사용법'에 해당되는 글 1건

  1. 2013.04.03 [펌] FlashVars 사용법
반응형

출처 : http://hmjkor.tistory.com/323

 

flex 3.x

html
<object id="paramTest" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="120">
<param name="movie" value="Example.swf" />
<param name="flashVars" value="
type=typevar&name=namevar" />
<object type="application/x-shockwave-flash"
data="Example.swf" width="300" height="120"
flashVars="type=typevar&name=namevar">
</object>



flex
creationComplete="init()"

private function init():void{
var type:String = Application.application.parameters.type as String;
var name : String = Application.application.parameters.name as String;
}



flex 4.x

html

var flashvars = {};

flashvars.type = "타입변수";
flashvars.name = "이름변수";


flex
creationComplete="init()"

private function init():void{
var type:String =
parameters.type as String;
var name : String = parameters.name as String;
}



flex 4.5

html

var flashvars = {};

flashvars.type = "타입변수";
flashvars.name = "이름변수";


flex
creationComplete="init()"

private function init():void{
var type:String =
FlexGlobals.topLevelApplication.parameters.type as String;
var name : String = FlexGlobals.topLevelApplication.parameters.name as String;
}
Posted by 1010