如何在ActionScript 2中使用HTML参数 [英] How to use HTML param in Actionscript 2

查看:160
本文介绍了如何在ActionScript 2中使用HTML参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这个主要的事情我已经写了一个swf的代码,也是html,我需要通过2参数从html到瑞士法郎我通过clicktag参数和其他参数。我知道如何访问操作脚本中的clicktag参数,但我很困惑,使用另一个传递的参数。我正在访问clicktog作为_root.clickTAG,所以我可以很容易地访问它,但是当我想以同样的方式使用另一个参数没有任何事情发生。你能帮助我吗?
在此先感谢

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 clicktag 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

推荐答案

您需要使用 FlashVars 传递两个变量。最简单的方法就是使用

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">

(尽管swfObject嵌入swf是值得的)。然后在Flash(AS2)中,您可以直接访问变量,例如

(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");
}

这篇关于如何在ActionScript 2中使用HTML参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆