ActionScript 3.0 基础数据类型
String: 字符或者字符串 A single character or sequence of characters
Boolean: 布尔类型 只有真和假 true or false values
int: 带符号整型,ActionScript 3.0新增类型 Positive and negative whole numbers (new in the actionscript 3.0)
uint: 无符号整型,ActionScript 3.0新增类型 Positive whole numbers (new in the actionscript 3.0)
Number: 浮点数类型 Positive and negative whole and real (i.e., fractional) numbers
Note:
int and uint are actually low-level numeric types that are a subtypes of Integer (which does not exist in ActionScript), and the lowercase denotes this and also follows syntax shared by other languages like Java, C++, and C#.
Gnash vs Flash
Gnash?没听说过吧。不过在Linux的世界中,它可是已经大名鼎鼎了,它的作用就是在Linux的环境下实现Flash。原因非常的简单,Flash是Commercial Software,和Linux的Open Source 的概念有了一定的冲突。
Gnash 是GNU 下的一个Project,不过现在的功能还是比较弱些,只能完全兼容SWF 7.0 & Actionscript 2.0的所有功能。如果想使用Flex和Actionscript 3.0可能还需要在等待一段时间。
如果想做Windows下也尝试一下,当然也没问题,已经有编译集成的版本,可以在getgnash网站下载。跨平台可能是GNU的拿手好戏。
期待有一天我新写的Flex程序可以运行在Gnash上。
相关网址:
- Gnash官方网站: http://www.gnu.org/software/gnash
- Gnash package release : http://getgnash.org/packages/releases
Flash Switcher (Flash开发者必备插件)
从事Flash 开发的各位兄弟姐妹们,一定会碰到过Flash版本兼容的问题。由于用户使用了低版本的Flash,造成自己使用高版本的Flash无法正常运行,特别是Actionscript 版本还一起搅惑。为了测试客户所使用的那个版本是否正常运行还必须重复的安装多个版本的Flash。难道就没有一个简单的方法?
昨天上网时,无意中看到了Flash Switcher 这样一个Firefox的插件,以上问题都迎刃而解。只需简单的点击一下Status Bar上的Flash按钮,即可实现各种Flash版本的切换,所支持的版本从Flash 4.0 -> Flash 9.0。有兴趣的Flash Developer可以尝试安装一下,功能强大哦。
官方站点:http://www.sephiroth.it/weblog/archives/2006/10/flash_switcher_for_firefox.php
Flash Remoting and AMF
Flash Remoting 是一种基于HTTP request/response的数据通讯技术,而AMF正是Flash Remoting所使用的二进制消息协议(Binary messaging protocol)。由于采用了二进制方式,通讯的数据量减少,从而通讯的性能也有所提高。同时AMF也是Flash Player专用协议,如果需和其它语言进行互通,则必须使用一些SDK来进行此资料的解析。
以下是AMF和其他语言的接口实现:
- AMFPHP (PHP, http://www.amfphp.org)
- OpenAMF (Java, http://www.openamf.com)
- WebORB (.NET, Java, Ruby on Rails, http://www.themidnightcoders.com)
- Fluorine (.NET, http://fluorine.thesilentgroup.com)
- Adobe Flash Remoting MX (Java, .NET, http://www.adobe.com/products/flashremoting)
- ColdFusion (the Flash Remoting gateway is part of a standard ColdFusion installation, http://www.adobe.com/products/coldfusion.)
使用Flex获取Flash player的版本信息
如何使用Flex来获取Flash player的信息呢:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Label text="Flash Player Version: {flash.system.Capabilities.version},
Debug Player: {flash.system.Capabilities.isDebugger}"/>
</mx:Application>
以上例子选自”O’Reilly Press – Programming Flex2
运行结果:
[flash http://ray.imiddle.net/flash/check_player.swf w=300 h=200]
