开发者

Flex 3: How do I get URL

开发者 https://www.devze.com 2023-02-15 02:05 出处:网络
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 wha

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

精彩评论

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