Pay for Hesitation: html

Pages

顯示具有 html 標籤的文章。 顯示所有文章
顯示具有 html 標籤的文章。 顯示所有文章

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