开发者

Flex 3: How do I get URL

I'm setting up a twitter button on my Flex 3 site. I've got it working, but the URL info it uses is static--- www.mysite.com, for example. I want to make it so that twitter button interacts with whatever "page" the user is looking at. But, I don't know how to grab the current URL. So, for example, if the user is looking at: http://www.my开发者_开发技巧site.com/#view=2 how do I get that information. Or if they're looking at http://www.mysite.com/#view=44, how do I get that the URL?

Thank you.

-Laxmidi


This should work.

var browserUrl:String = ExternalInterface.call('window.location.href.toString');


You'll want to use JavaScript to obtain the location object. Look into the AS3 class ExternalInterface.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜