开发者

How to use HTML param in Actionscript 2

开发者 https://www.devze.com 2023-01-29 15:08 出处:网络
The main thing in this i have written a code for swf and also the html and i need to pass the 2 parameters from html to swf i am passing cli开发者_开发百科cktag param and other parameter. i know how t

The main thing in this i have written a code for swf and also the html and i need to pass the 2 parameters from html to swf i am passing cli开发者_开发百科cktag param and other parameter. i know how to access the clicktag param in action script but i am getting confused to use the another parameter passed with that. i am accessing clicktag as _root.clickTAG so i can easily access it but when i wanted to use another param in the same way nothing is happening . can you anyone please help me regarding this. Thanks in Advance


You need to pass in two variables using FlashVars. At it's simplest you can just use

<PARAM NAME=FlashVars VALUE="clickTAG=http://www.domain.com&secondParam=12345">

(though it is worth looking at swfObject to embed the swf). Then in Flash (AS2) you can access the vars directly, eg

on (release) {
getURL(clickTAG + "&mySecondVarIs" + secondParam, "_blank");
}


inside a movie clip we have to address to root like _root.clickTAG otherwise it does not work.

0

精彩评论

暂无评论...
验证码 换一张
取 消