Adobe TechNote:tn_16417(Using FlashVars to pass variables to a SWF)
来源:互联网 发布:linux挂载分区命令 编辑:程序博客网 时间:2024/06/06 21:22
翻译Adobe TechNote:tn_16417
通过FlashVars为SWF传参数
简介
Macromedia Flash Player的FlashVars属性提供了一个把参数导入一个首次初始化的Flash视频top level的有效途径。该特性要求Flash Player 6或其后来版本的支持。如需获得如何给Flash Player 6之前版本传参数,请参考下文的Additional Information.
FLASHVARS
放置于OBJECT(ACTIVEX)和EMBED(为Netscape和MacintoshInternet浏览器)标签内,属性FlashVars可以用于为Flash视频导入根目录级变量(root level variables)。所有被导入的变量都是在Flash视频第一帧播放之前生成(create)。(导入变量)字符串的格式为:一组由&分隔开的name=variable的组合。特殊或/和不可打印字符用%紧跟2个16进制数字(注:个人理解,非A,B,C,D,E,F)换码(escape)表示。单一一个空格可以用+表示。更多的关于URL的表示问题,请参考URL Encoding: Reading special characters from a text file(TechNote tn_14143)。
所有的浏览器都支持最长64KB (65535 bytes)的字符串表示的URL。为了支持所有的浏览器,FlashVars必须同时放置于OBJECT和EMBED之内。
对给字符串编码和页面包含它采用的是相同的(方式)。Internet Explorer负责提供在Windows系统上UTF-16兼容的字符串;同样,Netscape会为Flash播放器提供UTF-8编码的字符串。
附加信息
当然,不用FlashVars,也可以通过HTML标签的形式,在查询字符串里,将它(ariables)附加到SWF的URL之后为该Flash播放器(SWF)传递此变量。 可以参考Different approaches to setting variables in a Flash movie (TechNote tn_14253)的简单例子。该例子也提出了在你立即该变量是的一个问题,因为在大量的数据从服务器上请求到来之前,SWF必须要下载、播放(play)。
通过FlashVars为SWF传参数
简介
Macromedia Flash Player的FlashVars属性提供了一个把参数导入一个首次初始化的Flash视频top level的有效途径。该特性要求Flash Player 6或其后来版本的支持。如需获得如何给Flash Player 6之前版本传参数,请参考下文的Additional Information.
FLASHVARS
放置于OBJECT(ACTIVEX)和EMBED(为Netscape和MacintoshInternet浏览器)标签内,属性FlashVars可以用于为Flash视频导入根目录级变量(root level variables)。所有被导入的变量都是在Flash视频第一帧播放之前生成(create)。(导入变量)字符串的格式为:一组由&分隔开的name=variable的组合。特殊或/和不可打印字符用%紧跟2个16进制数字(注:个人理解,非A,B,C,D,E,F)换码(escape)表示。单一一个空格可以用+表示。更多的关于URL的表示问题,请参考URL Encoding: Reading special characters from a text file(TechNote tn_14143)。
所有的浏览器都支持最长64KB (65535 bytes)的字符串表示的URL。为了支持所有的浏览器,FlashVars必须同时放置于OBJECT和EMBED之内。
<!--Object标签举例-->
<OBJECT>
<PARAM NAME=FlashVars VALUE="foo=Hello%20World¶graph=first+line%0Dsecond+line">
</OBJECT>
<!--Embed标签举例-->
<EMBED src="display.swf" FlashVars="foo=Hello%20World¶graph=first+line%0Dsecond+line" ... (other parameters)>
</EMBED>
<OBJECT>
<PARAM NAME=FlashVars VALUE="foo=Hello%20World¶graph=first+line%0Dsecond+line">
</OBJECT>
<!--Embed标签举例-->
<EMBED src="display.swf" FlashVars="foo=Hello%20World¶graph=first+line%0Dsecond+line" ... (other parameters)>
</EMBED>
对给字符串编码和页面包含它采用的是相同的(方式)。Internet Explorer负责提供在Windows系统上UTF-16兼容的字符串;同样,Netscape会为Flash播放器提供UTF-8编码的字符串。
附加信息
当然,不用FlashVars,也可以通过HTML标签的形式,在查询字符串里,将它(ariables)附加到SWF的URL之后为该Flash播放器(SWF)传递此变量。 可以参考Different approaches to setting variables in a Flash movie (TechNote tn_14253)的简单例子。该例子也提出了在你立即该变量是的一个问题,因为在大量的数据从服务器上请求到来之前,SWF必须要下载、播放(play)。
- Adobe TechNote:tn_16417(Using FlashVars to pass variables to a SWF)
- using html:link to pass a param
- Using a delegate to pass data between two forms.
- How to pass data to a Flex application using SWFObject 2.0
- Pass parameters to server using hidden field
- Bind a const reference to temp variables
- Using the Adobe AIR 2 NativeProcess API to create a screen recorder
- Words and Text: Using String Variables to Organize Words
- Platform Builder: Using Environment Variables to Control Macro Definition
- How to pass an argument to a PowerShell script?
- Use xargs to pass command to kill a process
- Sending variables into a SWF file
- Introduction to CGI Variables
- Linux Shell - Trying to split a string into two variables
- How do I pass a list of files to grep
- Day50:Fail to interview Migu,pass a travel towards XiaMen
- Using "prototype" to append a new method to a Class
- How to pass a hash to a subrouti…
- 求逆矩阵的并行算法
- shell中的条件测试
- GotW #88: A Candidate For the "Most Important const"
- 总结不同层面的内存概念
- DXUT进阶
- Adobe TechNote:tn_16417(Using FlashVars to pass variables to a SWF)
- BugFree在Windows Server 2003+IIS 6+MySQL的配置
- sql 面试中的问题
- 应用springMVC快速开发PDF/EXCEL报表方案及实现
- Debug与Release
- ListBox自绘模式的实现
- my blog open today
- 电脑自动重启原因小结-
- 读书计划