Pay for Hesitation: Passing parameters to ActionScript from HTML query strings

Pages

2011年4月18日 星期一

Passing parameters to ActionScript from HTML query strings

URL String: http://me.com/index.html?name=redbug&bday=0314

Method 1: root.loaderInfo.parameters
1. get query strings in url by javascript
  • window.location.href
  • window.location.search
2. passing parameter to SWF in HTML
3. receive parameter in ActionScript




Method 2: ExternalInterface.call('javascript function name')
receiving parameters in ActionScript




Reference:
Flex程序如何获取html容器传递的URL参数值
ActionScript JavaScript Communication
ActionScript 3.0 Cookbook - Chapter 22 Building Integrated Application

沒有留言: