如何在 AS3 中包含 flashvar?
我是 AS3 的新手,我正在尝试将所有数据从 html 文件移动到 swf 中。 旧的 html 文件包含以下编码:
<EMBED src="https://www.pandora.com:443/radio/tuner_9_2_0_0_pandora.swf" WIDTH="640" HEIGHT="528" FlashVars="_tunervar_shost=www.pandora.com">
到目前为止,据我所知,我可以使用加载器来替代 src。所以在我的 swf 中,我有
var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("https://www.pandora.com:443/radio/tuner_9_2_0_0_pandora.swf");
myLoader.load(url);
但我无法弄清楚的是如何将 FlashVars 从 html 更改为 AS3。我做了一些研究,听起来,我必须使用一种叫做 root 的东西。我完全不知道如何使用它,我什至不确定这是否是编写脚本的正确方法。有人可以帮我解释一下吗?
我遇到的另一个问题是,由于某种原因,我正在加载的 swf 是模糊的。有什么办法可以解决这个问题吗?
I am brand new to AS3 and I am trying to move all of the data from an html file, into a swf.
The old html file contained this coding:
<EMBED src="https://www.pandora.com:443/radio/tuner_9_2_0_0_pandora.swf" WIDTH="640" HEIGHT="528" FlashVars="_tunervar_shost=www.pandora.com">
So far from what I have learned I can use the loader, to substitute for the src. So in my swf, I have
var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("https://www.pandora.com:443/radio/tuner_9_2_0_0_pandora.swf");
myLoader.load(url);
What I can't figure out though, is how to change the FlashVars from html into AS3. I have done a bit of research and from what it sounds like, I have to use something called root. I am completely lost on how to use this, and I am not even sure if this is the correct way to script it. Can someone help explain this to me?
One other problem I am having, is for some reason, the swf I am loading is blurry. Is there any way to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将它们附加到您正在加载的资源中:
Try appending them to the asset that you're loading: