1,ActionScript 3.0已经完全OO,所有AS代码都必须写在类里
2,AS的package和Java一样是与物理目录对应的,com.hideto.MessageManager类必须保存在com/hideto/MessageManager.as
3,属性声明
private var count:uint;
4,implicit getters and setters
package {
public class Counter {
private var _count:uint;
public function Counter() {
_count = 0;
}
public function get count():uint {
return _count;
}
public function set count(value:uint):void {
if(value < 100) {
_count = value;
} else {
throw Error();
}
}
}
}
这样可以直接使用counter.count,get和set让count方法变成一个public属性
5,静态方法与静态属性
public static test():void {}
private static var _example:String;
6,继承
public class Subclass extends Superclass
7,常量
public static const EXAMPLE:String = "example";
8,事件分发
要想使用addEventListener()和removeEventListener(),类必须继承EventDispatcher(Sprite就继承自EventDispatcher)
分享到:
相关推荐
ascb包,直接解压放在src目录下。其中具体用法,还是得找些文档
通过ASCB包,可以在FLEX环境中对字符、数字、日期等进行各种快捷的函数处理。如字符转为日期等。
This manual describes the Goebel NIC, a test resource for exercising ASCB-D interface bus on Honeywell EPIC programs. This is a new generation of test equipment designed specifically for simulation.
但是大多数的图形用Graphics API还是很难画出的,AS3CBLibrary (http://www.rightactionscript.com/ascb) 提供了一个 ascb.drawing.Pen 类。Pen 类是Graphics 类的代理(包装)类。你可以构造一个新的Pen 实例然后...
但是大多数的图形用Graphics API还是很难画出的,AS3CBLibrary (http://www.rightactionscript.com/ascb) 提供了一个 ascb.drawing.Pen 类。Pen 类是Graphics 类的代理(包装)类。你可以构造一个新的Pen 实例然后...
安科瑞ASCB1系列智能微型断路器样本,
安科瑞ASCB1系列智能微型断路器产品使用,安装说明书
AS3CBLibrary资源包,ascb包,各种as类
flash actionscript3 as3游戏开发教程合集(2本经典合一)+AS3CBLibrary_ascb包.zip
一款带有代码的flash小游戏,直接下载,马上可以打开,不用解压缩.
本文档告诉读者怎样将ASP封装成DLL,需要使用word2007打开文档。
ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode ; Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &...
if AscB(upfile_5xSoft_Stream.Read(1))<>AscB(MidB(Str,j,1)) then InString=0 Exit For end if next if InString<>0 then Exit Function end if next End Function Private Sub Class_Terminate form....
ASCB 鞍山银行 ARCU 安徽省农村信用社 BJBANK 北京银行 BJRCB 北京农商行 BSB 包商银行 BOHAIB 渤海银行 BDCBANK 保定银行 BOCFCB 中银富登村镇银行
if AscB(upfile_5xSoft_Stream.Read(1))<>AscB(MidB(Str,j,1)) then InString=0 Exit For end if next if InString<>0 then Exit Function end if next End Function Private Sub Class_Terminate form....
[removed] Function bytes2BSTR(vIn) strReturn = “” For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode)...
@LANGUAGE=”JScript” CODEPAGE=”936″%> [removed] Function bytes2BSTR(vIn) strReturn = “” For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then ...
Function bytes2BSTR(vIn)strReturn = “”For i = 1 To LenB(vIn)ThisCharCode = AscB(MidB(vIn,i,1))If ThisCharCode < &H80 ThenstrReturn = strReturn & Chr(ThisCharCode)ElseNextCharCode = AscB(MidB(vIn,...
使用前先执行SocketReg.exe对组件进行注册,然后就可以在网页脚本中使用套接字了,这个组件是99年国外一公司开发的,本意是用来实现http ,ftp,smtp pop3协议,所以内容传输多以ansi编码,而不是二进制数据流。...