根据 URL 操作我的 Flash?
我有一张英国的 Flash 地图,它分为各个县,用户单击一个县,然后定向到一个新的网址,例如。 www.mydomain.co.uk/region/london
。闪存地图保留在该新页面上,以防他们希望选择新区域。
我想知道的是:是否可以操纵 Flash,以便如果网址是 www.mydomain.co.uk/region/london
那么伦敦在 Flash 地图上保持突出显示。我想我将不得不使用一些 AS,只要它是 AS3 就可以。
I have a flash map of the UK which is divided up into the counties, a user clicks on a county and is then directed to a new url, eg. www.mydomain.co.uk/region/london
. The flash map remains on that new page in case they wish to select a new region.
What I want to know: is it possible to manipulate the flash so that if the url is www.mydomain.co.uk/region/london
then london remains highlighted on the flash map. I presume I will have to use some AS which is fine as long as it is AS3.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定您对编写自己的 AS3 脚本有多熟悉。
在这种情况下,我将使用的方法是获取浏览器的 URL,并从中解析位置。
请参阅相关问题:我的 Flash 应用程序如何确定自己的 URL?
或者,您可以让各个县页面通过 HTML 将变量传递给嵌入/对象标记中的 Flash 影片。
I'm not sure how familiar you are with writing your own AS3 scripts.
The method I would use in this case is to fetch the URL of your browser, and to parse the location out of it.
See related question: How can my Flash app determine its own URL?
Alternatively you can have the individual county pages pass a variable to the Flash movie in the embed/object tag via the HTML.
单独使用 as3 来完成此操作的一个简单方法是从舞台的 loaderInfo 对象获取 URL,如下所示:
更好但更困难的方法是使用 swfAddress 来设置深层链接、历史记录和其他此类浏览器常态。 http://www.asual.com/swfaddress/
A simple way to do it using as3 alone would be to get the URL from the stage's loaderInfo object like so:
A better but more difficult way to go about it would be to use swfAddress to set up deep linking, history, and other such browser normalities. http://www.asual.com/swfaddress/