锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
]]>
]]>
I reproduced this prototype on Alternativa3D engine. And here you can find it:
Generally this port is bit different from Emanuele’s version. I can’t find information about feature like SkyBox in Alternativa3D, so this feature coded manually. Another difference is camera behavior. Emanuele binds camera to object and during rotations player object stand still and only camera fly around by its orbit. In Alternativa3d version object rotates too, this allow us to face player object it to it’s current direction. Camera is not binded to the object directly it is binded to object container and we can manipulate with player object in container, add animations, rotations etc. But both variants are good I think.
Here is source code:
package { import alternativa.Alternativa3D; import alternativa.engine3d.containers.*; import alternativa.engine3d.controllers.*; import alternativa.engine3d.core.Camera3D; import alternativa.engine3d.core.Clipping; import alternativa.engine3d.core.Debug; import alternativa.engine3d.core.MipMapping; import alternativa.engine3d.core.MouseEvent3D; import alternativa.engine3d.core.Object3D; import alternativa.engine3d.core.Object3DContainer; import alternativa.engine3d.core.Sorting; import alternativa.engine3d.core.View; import alternativa.engine3d.materials.FillMaterial; import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.objects.Sprite3D; import alternativa.engine3d.primitives.Box; import alternativa.engine3d.primitives.Plane; import alternativa.engine3d.primitives.Sphere; import flash.display.BitmapData; import flash.display.BlendMode; import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageQuality; import flash.display.StageScaleMode; import flash.events.Event; import flash.events.KeyboardEvent; import flash.filters.GlowFilter; import flash.geom.ColorTransform; import flash.geom.Vector3D; import flash.sampler.NewObjectSample; import flash.system.Capabilities; import flash.ui.Keyboard; [SWF(backgroundColor="#000000", frameRate="100", width="640", height="480")] public class alternativa3dSokoban extends Sprite { private const CUBESIZE:Number=10; //embeding textures images [Embed(source="resource/crateTextureImg.jpg")] static private const crateTextureImg:Class; [Embed(source="resource/floorTextureImg.png")] static private const floorTextureImg:Class; [Embed(source="resource/crateTopTextureImg.jpg")] static private const crateTopTextureImg:Class; [Embed(source="resource/crateTopGoalTextureImg.jpg")] static private const crateTopGoalTextureImg:Class; [Embed(source="resource/wallTextureImg.png")] static private const wallTextureImg:Class; [Embed(source="resource/goalTextureImg.jpg")] static private const goalTextureImg:Class; [Embed(source="resource/playerTextureImg.jpg")] static private const playerTextureImg:Class; [Embed(source="resource/backBitmapImg.jpg")] static private const backTextureImg:Class; [Embed(source="resource/backBottomBitmapImg.jpg")] static private const backBottomTextureImg:Class; // sokobal demo level and player position private var levels:Array=[[1,1,1,1,0,0,0,0],[1,0,0,1,1,1,1,1],[1,0,2,0,0,3,0,1],[1,0,3,0,0,2,4,1],[1,1,1,0,0,1,1,1],[0,0,1,1,1,1,0,0]]; private var playerCol:uint; private var playerRow:uint; private var playerRotation:Number=0; private var playerAngle:Number=0; private var playerMovement:Number=0; private var dRow:int; private var dCol:int; // alternativa3d engine variables private var camera:Camera3D; private var controller:SimpleObjectController; private var container:ConflictContainer; private var frame:Sprite = new Sprite(); public var player:Sphere;// Sphere primitive representing the player public var cplayer:SimpleObjectController; //controller for player object public var conplayer:Object3DContainer; //container for player private var movingCrate:Box;// cube primitive representing the moving crate // textures private var crateTexture:TextureMaterial = new TextureMaterial(new crateTextureImg().bitmapData); private var floorTexture:TextureMaterial = new TextureMaterial(new floorTextureImg().bitmapData); private var crateTopTexture:TextureMaterial = new TextureMaterial(new crateTopTextureImg().bitmapData); private var crateTopGoalTexture:TextureMaterial = new TextureMaterial(new crateTopGoalTextureImg().bitmapData); private var wallTexture:TextureMaterial = new TextureMaterial(new wallTextureImg().bitmapData); private var goalTexture:TextureMaterial = new TextureMaterial(new goalTextureImg().bitmapData); private var playerTexture:TextureMaterial = new TextureMaterial(new playerTextureImg().bitmapData); // SkyBox textures private var backTexture:TextureMaterial = new TextureMaterial(new backTextureImg().bitmapData); private var backBottomTexture:TextureMaterial = new TextureMaterial(new backBottomTextureImg().bitmapData); public function alternativa3dSokoban() { stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; stage.quality = StageQuality.BEST; // Camera camera = new Camera3D(); camera.view = new View(640, 480); addChild(camera.view); // Camera controller controller = new SimpleObjectController(stage, camera, 200, 3); // Root object container = new ConflictContainer(); container.resolveByAABB = true; container.resolveByOOBB = true; //Player controller conplayer = new Object3DContainer(); cplayer = new SimpleObjectController(stage, player, 3); //i am not shure about SkyBox in Alternativa and will prepare it manually var backBottom:Plane = new Plane(200*CUBESIZE/2,200*CUBESIZE/2); backBottom.setMaterialToAllFaces(backBottomTexture); backBottom.x = 0; backBottom.y = -100*CUBESIZE/2; backBottom.z = 0; backBottom.rotationX = 90*Math.PI/180; container.addChild(backBottom); var backLeft:Plane = new Plane(200*CUBESIZE/2,200*CUBESIZE/2); backLeft.setMaterialToAllFaces(backTexture); backLeft.x = 0; backLeft.y = 0; backLeft.z = 100*CUBESIZE/2; container.addChild(backLeft); var backRight:Plane = new Plane(200*CUBESIZE/2,200*CUBESIZE/2); backRight.setMaterialToAllFaces(backTexture); backRight.x = 0; backRight.y = 0; backRight.z = -100*CUBESIZE/2; container.addChild(backRight); var backFront:Plane = new Plane(200*CUBESIZE/2,200*CUBESIZE/2); backFront.setMaterialToAllFaces(backTexture); backFront.x = -100*CUBESIZE/2; backFront.y = 0; backFront.z = 0; backFront.rotationY = 90*Math.PI/180; container.addChild(backFront); var backBack:Plane = new Plane(200*CUBESIZE/2,200*CUBESIZE/2); backBack.setMaterialToAllFaces(backTexture); backBack.x = 100*CUBESIZE/2; backBack.y = 0; backBack.z = 0; backBack.rotationY = 90*Math.PI/180; container.addChild(backBack); // end SkyBox var box:Box; /* [[1,1,1,1,0,0,0,0], [1,0,0,1,1,1,1,1], [1,0,2,0,0,3,0,1], [1,0,3,0,0,2,4,1], [1,1,1,0,0,1,1,1], [0,0,1,1,1,1,0,0]]; */ // level construction for (var i:uint=0; i<6; i++) { for (var j:uint=0; j<8; j++) { switch (levels[i][j]) { case 0 : box = new Box(CUBESIZE,CUBESIZE/2,CUBESIZE,1,1); box.setMaterialToAllFaces(floorTexture); box.x = CUBESIZE*j; box.y = 0; box.z = CUBESIZE*i; container.addChild(box); break; case 1 : box = new Box(CUBESIZE,CUBESIZE/2,CUBESIZE,1); box.setMaterialToAllFaces(floorTexture); box.x = CUBESIZE*j; box.y = 0; box.z = CUBESIZE*i; container.addChild(box); box = new Box(CUBESIZE,CUBESIZE,CUBESIZE,1); box.setMaterialToAllFaces(wallTexture); box.x = CUBESIZE*j; box.y = CUBESIZE*3/4; box.z = CUBESIZE*i; container.addChild(box); break; case 2 : box = new Box(CUBESIZE,CUBESIZE/2,CUBESIZE,1); box.setMaterialToAllFaces(goalTexture); box.x = CUBESIZE*j; box.y = 0; box.z = CUBESIZE*i; container.addChild(box); break; case 3 : box = new Box(CUBESIZE,CUBESIZE/2,CUBESIZE,1); box.setMaterialToAllFaces(floorTexture); box.x = CUBESIZE*j; box.y = 0; box.z = CUBESIZE*i; container.addChild(box); box = new Box(CUBESIZE,CUBESIZE,CUBESIZE,1); box.name = "crate_"+i+"_"+j; box.setMaterialToAllFaces(crateTexture); box.x = CUBESIZE*j; box.y = CUBESIZE*3/4; box.z = CUBESIZE*i; box.rotationX -= 90*Math.PI/180; // top of the crate box.faces[4].material=crateTopTexture; box.faces[5].material=crateTopTexture; container.addChild(box); break; case 4 : box = new Box(CUBESIZE,CUBESIZE/2,CUBESIZE,1); box.setMaterialToAllFaces(floorTexture); box.x = CUBESIZE*j; box.y = 0; box.z = CUBESIZE*i; container.addChild(box); player = new Sphere(CUBESIZE/2,16,16,false,playerTexture); conplayer.addChild(player); conplayer.visible = true; conplayer.x = CUBESIZE*j; conplayer.y = CUBESIZE*3/4; conplayer.z = CUBESIZE*i; conplayer.rotationX -= 90*Math.PI/180; container.addChild(conplayer); playerCol=j; playerRow=i; break; } } } // Adding camera container.addChild(camera); // View frame addChild(frame); onResize(); stage.addEventListener(Event.ENTER_FRAME, updateEvent); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDwn); stage.addEventListener(Event.RESIZE, onResize); } private function onKeyDwn(e:KeyboardEvent):void { if (playerRotation==0&&playerMovement==0) { switch (e.keyCode) { case Keyboard.LEFT : playerRotation=+9; playerAngle+=90; break; case Keyboard.RIGHT : playerRotation=-9; playerAngle-=90; break; case Keyboard.UP : movingCrate=null; playerAngle=Math.round(conplayer.rotationY*180/Math.PI)%360; if (playerAngle<0) { playerAngle+=360; } // we have to determine the difference between current row and column // and the new row and column according to player heading switch (playerAngle) { case 0 : dRow=0; dCol=-1; break; case 90 : //dRow=-1; dRow=1; dCol=0; break; case 180 : dRow=0; dCol=1; break; case 270 : //dRow=1; dRow=-1; dCol=0; break; } if (levels[playerRow+dRow][playerCol+dCol]==0||levels[playerRow+dRow][playerCol+dCol]==2) { // the player can move playerMovement=-CUBESIZE/10; } else { if (levels[playerRow+dRow][playerCol+dCol]==3||levels[playerRow+dRow][playerCol+dCol]==5) { if (levels[playerRow+2*dRow][playerCol+2*dCol]==0||levels[playerRow+2*dRow][playerCol+2*dCol]==2) { // the player can move and can push a crate movingCrate=container.getChildByName("crate_"+(playerRow+dRow)+"_"+(playerCol+dCol))as Box; playerMovement=-CUBESIZE/10; } } } break; } } } public function updateEvent(e:Event):void { if (playerRotation) { conplayer.rotationY+=playerRotation*Math.PI/180; if (Math.abs(Math.round(conplayer.rotationY*180/Math.PI))%90==0) { playerRotation=0; } } if (playerMovement) { switch (playerAngle) { case 0 : conplayer.x += playerMovement; player.rotationY -= 18*Math.PI/180; break; case 90 : conplayer.z += -playerMovement; player.rotationY -= 18*Math.PI/180; break; case 180 : conplayer.x += -playerMovement; player.rotationY -= 18*Math.PI/180; break; case 270 : conplayer.z += playerMovement; player.rotationY -= 18*Math.PI/180; break; } if (movingCrate) { switch (playerAngle) { case 0 : movingCrate.x += playerMovement; break; case 90 : movingCrate.z += -playerMovement; break; case 180 : movingCrate.x += -playerMovement; break; case 270 : movingCrate.z += playerMovement; break; } } // we need this to know if the player stopped on the destination tile if ((playerAngle%180==0&&(Math.round(conplayer.x*10)/10)%CUBESIZE==0)||(playerAngle%180!=0&&(Math.round(conplayer.z*10)/10)%CUBESIZE==0)) { playerMovement=0; levels[playerRow+dRow][playerCol+dCol]+=4; levels[playerRow][playerCol]-=4; if (movingCrate) { levels[playerRow+2*dRow][playerCol+2*dCol]+=3; if (levels[playerRow+2*dRow][playerCol+2*dCol]==5) { // changing materials on the fly movingCrate.setMaterialToAllFaces(crateTexture); // top of the crate on goal movingCrate.faces[4].material=crateTopGoalTexture; movingCrate.faces[5].material=crateTopGoalTexture; } else { //movingCrate.setMaterialToAllFaces(crateMaterial); movingCrate.setMaterialToAllFaces(crateTexture); // top of the crate movingCrate.faces[4].material=crateTopTexture; movingCrate.faces[5].material=crateTopTexture; } levels[playerRow+dRow][playerCol+dCol]-=3; movingCrate.name="crate_"+(playerRow+2*dRow)+"_"+(playerCol+2*dCol); } playerCol+=dCol; playerRow+=dRow; } } onEnterFrame(); } public function correct_camera_angles():void { //set camera position var r:Number = 10*CUBESIZE/3; var a:Number = -conplayer.rotationY; var cx:Number = conplayer.x+Math.cos(a)*r; var cz:Number = conplayer.z+Math.sin(a)*r; var cy:Number = conplayer.y+r; controller.setObjectPosXYZ(cx,cy,cz); //look at player box controller.lookAtXYZ(conplayer.x,conplayer.y,conplayer.z); //correct camera angles var cprotY:Number; cprotY=Math.round(conplayer.rotationY*180/Math.PI)%360; if (cprotY<0) { cprotY+=360; } if (cprotY>180) { camera.rotationX = camera.rotationX + (90*Math.PI/180)*Math.sin((cprotY%180)*Math.PI/180); } camera.rotationY = camera.rotationY+90*Math.PI/180-conplayer.rotationY; } public function onEnterFrame(e:Event = null):void { controller.update(); correct_camera_angles(); cplayer.update(); camera.render(); } public function onResize(e:Event = null):void { //here you can add border size for view var pd:Number = 0; camera.view.width = stage.stageWidth - pd*2; camera.view.height = stage.stageHeight - pd*2; camera.view.x = pd; camera.view.y = pd; frame.graphics.clear(); frame.graphics.beginFill(0x000000, 0); frame.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight); //frame.graphics.lineStyle(0, 0x7F7F7F); frame.graphics.drawRect(pd, pd, camera.view.width, camera.view.height); frame.graphics.endFill(); } } }
Here you can download sources.
This list is not complete, and your input is appreciated.
Concept/Language Construct | Java 5.0 | ActionScript 3.0 |
Class library packaging | .jar | .swc |
Inheritance | class Employee extends Person{…} | class Employee extends Person{…} |
Variable declaration and initialization | String firstName=”John”; Date shipDate=new Date(); int i; int a, b=10; double salary; | var firstName:String=”John”; var shipDate:Date=new Date(); var i:int; var a:int, b:int=10; var salary:Number; |
Undeclared variables | n/a | It’s an equivalent to the wild card type notation *. If you declare a variable but do not specify its type, the * type will apply. A default value: undefined var myVar:*; |
Variable scopes | block: declared within curly braces, member: declared on the class level no global variables | No block scope: the minimal scope is a function local: declared within a function member: declared on the class level If a variable is declared outside of any function or class definition, it has global scope. |
Strings | Immutable, store sequences of two-byte Unicode characters | Immutable, store sequences of two-byte Unicode characters |
Terminating statements with semicolons | A must | If you write one statement per line you can omit it. |
Strict equality operator | n/a | === for strict non-equality use !== |
Constant qualifier | The keyword final final int STATE=”NY”; | The keyword const const STATE:int =”NY”; |
Type checking | Static (checked at compile time) | Dynamic (checked at run-time) and static (it’s so called ‘strict mode’, which is default in Flex Builder) |
Type check operator | instanceof | is – checks data type, i.e. if (myVar is String){…} The is operator is a replacement of older instanceof |
The as operator | n/a | Similar to is operator, but returns not Boolean, but the result of expression: var orderId:String=”123”; var orderIdN:Number=orderId as Number; trace(orderIdN);//prints 123 |
Primitives | byte, int, long, float, double,short, boolean, char | all primitives in ActionScript areobjects. The following lines are equivalent; var age:int = 25; var age:int = new int(25); |
Complex types | n/a | Array, Date, Error, Function, RegExp, XML, and XMLList |
Array declaration and instantiation | int quarterResults[]; quarterResults = int quarterResults[]={25,33,56,84}; | var quarterResults:Array or var quarterResults:Array=[]; var quarterResults:Array= AS3 also has associative arrays that uses named elements instead of numeric indexes (similar to Hashtable). |
The top class in the inheritance tree | Object | Object |
Casting syntax: cast the class Object to Person: | Person p=(Person) myObject; | var p:Person= Person(myObject); or var p:Person= myObject as Person; |
upcasting | class Xyz extends Abc{} Abc myObj = new Xyz(); | class Xyz extends Abc{} var myObj:Abc=new Xyz(); |
Un-typed variable | n/a | var myObject:* var myObject: |
packages | package com.xyz; class myClass {…} | package com.xyz{ class myClass{…} } ActionScript packages can include not only classes, but separate functions as well |
Class access levels | public, private, protected if none is specified, classes have package access level | public, private, protected if none is specified, classes haveinternal access level (similar to package access level in Java) |
Custom access levels: namespaces | n/a | Similar to XML namespaces. namespace abc; abc function myCalc(){} or abc::myCalc(){} use namespace abc ; |
Console output | System.out.println(); | // in debug mode only trace(); |
imports | import com.abc.*; import com.abc.MyClass; | import com.abc.*; import com.abc.MyClass; packages must be imported even if the class names are fully qualified in the code. |
Unordered key-value pairs | Hashtable, Map Hashtable friends = new Hashtable(); friends.put(“good”, friends.put(“best”, friends.put(“bad”, String bestFriend= friends.get(“best”); // bestFriend is Bill | Associative Arrays Allows referencing its elements by names instead of indexes. var friends:Array=new Array(); friends["best"]=”Bill”; friends["bad"]=”Masha”; var bestFriend:String= friends[“best”] friends.best=”Alex”; Another syntax: var car:Object = {make:”Toyota”, model:”Camry”}; trace (car["make"], car.model); // Output: Toyota Camry |
Hoisting | n/a | Compiler moves all variable declarations to the top of the function, so you can use a variable name even before it’s been explicitly declared in the code. |
Instantiation objects from classes | Customer cmr = new Customer(); Class cls = Class.forName(“Customer”); Object myObj= cls.newInstance(); | var cmr:Customer = new Customer(); var cls:Class = flash.util.getClassByName(“Customer”); |
Private classes | private class myClass{…} | There is no private classes in AS3. |
Private constructors | Supported. Typical use: singleton classes. | Not available. Implementation of private constructors is postponed as they are not the part of the ECMAScript standard yet. To create a Singleton, use public static getInstance(), which sets a private flag instanceExists after the first instantiation. Check this flag in the public constructor, and if instanceExists==true, throw an error. |
Class and file names | A file can have multiple class declarations, but only one of them can be public, and the file must have the same name as this class. | A file can have multiple class declarations, but only one of them can be placed inside the package declaration, and the file must have the same name as this class. |
What can be placed in a package | Classes and interfaces | Classes, interfaces, variables, functions, namespaces, and executable statements. |
Dynamic classes (define an object that can be altered at runtime by adding or changing properties and methods). | n/a | dynamic class Person { var name:String; } //Dynamically add a variable // and a function var p:Person = new Person(); p.name=”Joe”; p.age=25; p.printMe = function () { trace (p.name, p.age); } p.printMe(); // Joe 25 |
function closures | n/a. Closure is a proposed addition to Java 7. | myButton.addEventListener(“click”, myMethod); A closure is an object that represents a snapshot of a function with its lexical context (variable’s values, objects in the scope). A function closure can be passed as an argument and executed without being a part of any object |
Abstract classes | supported | n/a |
Function overriding | supported | Supported. You must use the override qualifier |
Function overloading | supported | Not supported. |
Interfaces | class A implements B{…} interfaces can contain method declarations and final variables. | class A implements B{…} interfaces can contain only function declarations. |
Exception handling | Keywords: try, catch, throw, finally, throws Uncaught exceptions are propagated to the calling method. | Keywords: try, catch, throw, finally A method does not have to declare exceptions. Can throw not only Error objects, but also numbers: throw 25.3; Flash Player terminates the script in case of uncaught exception. |
Regular expressions | Supported | Supported |
Spring Actionscript, Dawn, SmartyPants, Swiz, Spicelib (used by Parsley) and SwiftSuspenders (used by Robotlegs) perform Dependency Injection.
Moreover they can all perform automatic DI by parsing class metadata. It would be grand if the common DI related metadata tags could be standardised. That way we really could write code that is decoupled from any particular framework.
Dawn, Swiz, Spicelib, SwiftSuspenders, SmartyPants: [Inject] (above property, setter or method)
Spring AS: [Autowire] (above property, setter or method)
[Inject] by 5
[Inject] is clear and simple and used by almost all of the libraries. It also directly correlates to @Inject from the JSR-330 Dependency Injection for Java specification. Let’s use it.
Dawn, SwiftSuspenders, SmartyPants: [Inject(name=“SomeName”)] (above property, setter or method)
Swiz: [Inject(source=“SomeName”)] (above property, setter or method)
Spicelib: [Inject(id=“SomeName”)] (above property, setter or method)
Spring AS: [Autowired(name=“SomeName”)] (above property, setter or method)
[Inject(name=“SomeName”)] by 3
Since you can define default attributes best practice could be to leave out the attribute: [Inject(“SomeName”)]
SwiftSuspenders: [Inject] (above class)
Spicelib: [InjectConstructor] (above class)
Swiz, Spring AS, Dawn: ?
?
I don’t see the need for an extra tag ([InjectConstructor]) when we could simply use [Inject].
Dawn, SwiftSuspenders, SmartyPants, Swiz: [PostConstruct] (above method)
Spicelib: [Init] (above method)
[PostConstruct] by 4
@PostConstruct is used in Java for the same purpose. Let’s use the most popular, established one.
SwiftSuspenders, SmartyPants, Dawn: none?
Swiz: [PreDestroy] (above method)
Spicelib: [Destroy] (above method)
@PreDestroy is used in Java for the same purpose. Let’s use the most familiar, established one.
SwiftSuspenders, SmartyPants, Swiz: none?
Dawn: [Provider] (above method)
Spicelib: [Factory] (above method)
SFS綆浠嬪揩閫?鍙潬:
SmartFoxServer 鏄熀浜庨珮鏁堝拰鍙崌綰х殑緇撴瀯錛屽彲浠ュ湪鍗旵PU鏈嶅姟鍣ㄦ満瀛愪笂澶勭悊鏁板崈鐨勫鎴風. 鏄湁鍚嶇殑騫蟲皯鐨勬湇鍔″櫒錛屾渶浣庢敮鎸丳2-350Mhz銆傚緢澶氬叕鍙稿拰娓告垙鏈烘瀯閮藉凡緇忎嬌鐢?SmartFoxServer 寮鍙戝嚭浜嗗緢澶氶珮璐ㄩ噺鐨勫湪綰垮鐜╁搴旂敤鍙婃父鎴忋傛瘮濡侰lub Penguin
楂樺埗浣滆兘鍔?
SmartFoxServer 甯︽湁涓濂楁敮鎸丄ctionscript 1.0, 2.0 鍜?Actionscript 3.0 鐨凙PIs 浠栦滑閮芥槸浠巉lash鏍稿績瀵硅薄鎵╁睍鍑烘潵鐨勬柊鍔熻兘錛屽彲浠ヨ寮鍙戣呯畝鍗曞揩閫熷湴寮鍙戝鐜╁搴旂敤.
鎵╁睍鎬?
SmartFoxServer 鍙互浣跨敤Actionscript, Javascript, Python and Java榪涜鏈嶅姟鍣ㄧ鐨勬墿灞? 鑷畾涔夋湇鍔″櫒绔墿灞曪紝鍙互鎵ц澶嶆潅鐨勫簲鐢紝娓告垙閫昏緫錛岄珮綰х敤鎴鳳紝鎴塊棿綆$悊錛屽強鏈嶅姟鍣ㄦ柊琛屼負錛岀瓑絳?鍙﹀銆?/p>
璺ㄥ鉤鍙版?
SmartFoxServer 鍙互榪愯鍦ㄤ換浣曠郴緇熶笂: 鍥犱負SmartFoxServer 鏄?00%鐨勭函 Java 寮鍙戠殑搴旂敤,瀹冨彲浠ヨ繍琛屽湪浠諱綍騫沖彴涓?濡傦細Windows (NT/2K/XP/2003), Linux, MacOS X (10.4 or higher), Solaris 絳夌瓑.
寮哄ぇ鐨勯檮鍔犺蔣浠?
SmartFoxServer 甯︽湁寮哄ぇ鐨勯檮鍔犺蔣浠舵潵鎵╁睍鍏跺姛鑳?
BlueBox:
璁╃帺瀹墮伩寮緗戠粶闄愬埗(闃茬伀澧? 浠g悊) 鏉ヨ繘琛屽鐜╁娓告垙錛岃屼笉鐗虹壊榪炴帴閫熷害. 鍥犱負 API 浼氳嚜鍔ㄥ湪”騫曞悗“閫夋嫨鏈濂界殑榪炴帴緋葷粺銆?/p>
RedBox:
鍏嶈垂寮婧愮殑闄勫姞杞歡錛屼嬌鍦⊿martFoxServer鐨勬鏋朵腑闆嗘垚浜嗛煶棰?瑙嗛嫻佺殑鑳藉姏錛坮ed5錛? 騫剁畝鍖栦簡 A/V搴旂敤鐨勫紑鍙戦毦搴︺?/p>
浠涔堟槸SFS瀹㈡埛绔殑API錛?/p>
Sfs宸茬粡涓轟綘鍋氬ソ浜嗗熀鏈殑瀹㈡埛绔綉緇滈氫俊閫氶亾錛岃繖涓氶亾鍙互鑱旈氭湇鍔$鐨勭浉鍏沖姛鑳芥ā鍧楁潵瀹炵幇鐩稿叧鍔熻兘銆傛瘮濡傜敤鎴風櫥褰?鎴塊棿鐧婚檰/鐢ㄦ埛淇℃伅騫挎挱/鏇存柊鐢ㄦ埛鎴塊棿淇℃伅絳夌瓑銆備綘鍙皟鐢ㄥ拰鎵╁睍閫氶亾涓殑鎸囧畾鏂規硶鍗沖彲銆?/p>
濡備綍瀹夎錛?/p>
浠巜ww.smartfoxserver.com 涓壘鍒版渶鏂扮増鏈殑smartfoxserverpro錛?.6.2錛夈傜劧鍚庡畨瑁呮壘鍒癛edBoxClient_AS3.SWC鍦╢lex3涓鍏ユ瀹㈡埛绔彃浠躲傚綋鐒朵篃鍙互灝唂lashapi涓殑AS3涓簮鏂囦歡鐩存帴鎷峰埌鑷繁鐨勯」鐩腑銆傝繖鏍峰氨鍙互璋冪敤SFS鐨勫鎴風鐨凙PI浜嗐?/p>
鍩烘湰姝ュ噾
鍙戣搗socket榪炴帴:榪欐槸絎竴姝? 灝卞儚鏄湪鏁叉湇鍔″櫒鐨勯棬銆傚鏋滄湇鍔″櫒寮鐫灝變細鐩稿簲浣狅紝騫舵縺媧諱竴涓繛鎺ャ?/p>
鐧誨叆: 鍦ㄨ繖涓闃舵錛屼綘瑕佸憡璇夋湇鍔″櫒浣犳槸璋佷綘鎯沖拰鍝釜搴旂敤浜や簰錛屽鏋滄搷浣滄垚鍔熺殑璇濓紝浣犲氨鍙互褰撳墠zone閲岀殑鎴塊棿鍒楄〃
鍔犲叆鎴塊棿: 涓鏃﹁繘鍏ヤ簡鎴塊棿錛屼綘灝卞彲浠ュ拰鍏朵粬鐢ㄦ埛鍜屽簲鐢ㄧ殑閫昏緫榪涜浜や簰銆?/p>
SmartFoxClient 璇︾粏浠嬬粛
瀹夎錛?/p>
鍦╢lex3涓鍏ラ」鐩瓻xamples/as3/smartfoxchat錛?/p>
smartfoxchat.mxml鏄叾瀹㈡埛绔殑涓繪枃浠躲?/p>
閲嶈甯擱噺淇℃伅錛?/p>
// Connection constants
private const serverIp:String = “211.157.41.204″
private const serverPort:int = 9339
private const serverZone:String = “simpleChat ”
浠ヤ笂閮芥槸榪炴帴鐨勯噸瑕佷俊鎭紝絎竴涓槸serverip鏄綘鐨勬湇鍔″櫒鐨処P鍦板潃錛涚浜屼釜瀛愭槸绔彛鍙鳳紝絎笁涓槸Zone鍚嶇О錛坺one鏄湇鍔$瀵逛簬鐩稿叧闆嗘垚鐨勫姛鑳芥ā鍧楃殑鍗曚綅浠gО錛夛紱
甯哥敤浜嬩歡錛?/p>
package …{
import flash.display.Sprite;
//Establish connection with the server
public function connect():void
{
sfs.connect(serverIp, serverPort)
}
浠ヤ笂鏄繛鎺ユ湇鍔$鐨勬柟娉曪紝鍙鐭ラ亾IP鍜岀鍙e彿鎴戜滑灝卞彲浠ュSFS鏈嶅姟鍣ㄨ繘琛岃仈鎺ヤ簡銆?/p>
sfs = new SmartFoxClient(true)
sfs.debug = false;
// Add event listeners
sfs.addEventListener(SFSEvent.onConnection, onConnection)
浠ヤ笂浠g爜鏄敓鎴愪竴涓鎴風SFS閫氶亾瀹炰緥銆傜劧鍚庣洃鍚仈榪烇紝涓鏃﹀鎴風涓庢湇鍔¤仈閫氬悗瀹㈡埛绔氨鍙互鏀跺埌onConnection鐨勮繖涓簨浠朵俊鎭?/p>
sfs.addEventListener(SFSEvent.onLogin, onLogin)
Sfs鐨勪簨浠剁洃鍚熀鏈笂鏄寜smartfoxchat.mxml鐨勯『搴忓湪璧扮殑錛宱nconnetion涔嬪悗灝變細浼氱洃鍚埌onlogin錛岃繖涓簨浠剁殑鐢ㄥ鍙湪浜庡け璐ョ櫥褰曞悗瀹㈡埛绔細鍦╠ebug閲岀湅鍒拌嚜瀹氫箟鐨勪竴孌甸敊璇俊鎭?/p>
sfs.addEventListener(SFSEvent.onRoomListUpdate, onRoomListUpdate)
鐧誨綍鎴愬姛鍚庣涓浠舵槸鏀跺埌涓涓埧闂村垪琛紝瀹㈡埛绔殑鐩稿叧list鎺т歡閫氬父浼氱粦瀹氳繖涓垪琛ㄤ俊鎭繖鏍峰氨鍙互鏄劇ず浜嗐傝娉ㄦ剰鐨勬槸榪欓噷鏈鍚庢湁涓涓猻fs.autoJoin()錛屽鏋滄墽琛屽皢浼氳嚜鍔ㄧ殑榪涜涓涓埧闂村鏋滀笉鎵ц鐧誨綍紼嬪簭灝嗗埌姝ょ粨鏉熴?/p>
sfs.addEventListener(SFSEvent.onJoinRoom, onJoinRoom)
褰撳鎴風鎵ц浜唖fs.joinRoom(roomId)錛屾湇鍔$灝嗕細媧懼彂onJoinRoom浜嬩歡瀹㈡埛绔紝瀹㈡埛绔啀鎵цonJoinRoom銆?/p>
甯哥敤瀹炰緥鏂規硶錛?/p>
浠g爜
sendObject (obj:Object, roomId:int = -1) : void銆銆銆銆銆銆 銆銆銆銆銆銆銆銆銆銆銆//鍦ㄥ綋鍓嶆埧闂村彂閫佷竴涓狝ctionscript瀵硅薄緇欏叾浠栫敤鎴楓?/p>
setUserVariables (varObj:Object, roomId:int = -1) : void 銆銆銆銆銆銆銆銆銆銆銆銆//璁劇疆涓涓垨澶氫釜鐢ㄦ埛鍙橀噺銆?/p>
sendPublicMessage (message:String, roomId:int = -1) : void 銆銆銆銆銆銆銆銆銆銆//鍙戦佷竴涓叕鏈夋秷鎭?/p>
sendPrivateMessage (message:String, recipientId:int, roomId:int = -1) : void 銆銆//鍙戦佷竴涓鏈夋秷鎭粰鐢ㄦ埛銆?/p>
joinRoom (newRoom:*, pword:String = “”, isSpectator:Boolean = false, dontLeave:Boolean = false, oldRoom:int = -1) : void //鍔犲叆涓涓埧闂淬?/p>
leaveRoom (roomId:int) : void //紱誨紑涓涓壒瀹氱殑鎴塊棿銆傦紙鏂紑涓涓壒瀹氭埧闂寸殑榪炴帴錛夈?/p>
C:\Program Files\SmartFoxServerPRO_1.6.2\Docs\index.htm
榪欐槸SFS鐨勬枃妗d富鐣岄潰錛岄噷闈㈡湁鍏ㄩ儴鐨勬墍鏈塖FS鐨勭浉鍏寵祫鏂欏強鎵鏈夌被鐨勫強鏂規硶灞炴х殑浠嬬粛銆?/p>
甯傞潰涓婂叾瀹炶繕鏈変笌SFS鍚岀被鐨勭浉鍏充駭鍝侊紝姣斿adobe鐨凢MS錛坒lash medio server)嫻佸獟浣撴湇鍔″櫒鍙互楂樻晥鐨勫鐞唂lash嫻佸獟浣撴湇鍔★紙涓撻棬閽堝瑙嗛煶棰戞祦涓嶆槸涓撻棬閽堝娓告垙錛夈侸ava鐨刴ina錛宩ava鐨勫彲鐢ㄤ簬澶氫漢瀹炴椂鐨勬湇鍔″櫒銆俿un game server(sgs)http://www.projectdarkstar.com/銆傝繕鏈塸ython涓殑twisted妗嗘灦涔熷彲浠ュ疄鐜拌緝綆鍗曠殑鏈嶅姟鍣ㄣ?/p>
浠ヤ笂璇寸殑鏈嶅姟鍣ㄩ兘鏄寚鍙互澶氫漢瀹炴椂澶ч儴鍒嗛兘鏀寔socket錛宖ms闄ゅ
1. Flex Builder 3/AIR beta2 on lab
榪欎袱鏍蜂笢瑗夸細鍦?span> max 鏈熼棿鏀懼嚭 beta 2 (M5) 搴旇綆楁槸鏃ч椈錛岃繕鏈変漢浜嬪厛涓嶇煡閬撴墠鏄瘮杈冨鎬?/span>beta2 鏈韓鐨勬柊鍔熻兘鍦?wiki 涓婃湁璇︾粏浠嬬粛錛屼絾閲嶇偣涓嶅涔庡湪 IDE 鏈韓鐨勫己鍖栥?span>AIR 鏁村悎銆?span>CSS 璁捐涓?span> Profiler絳夈?/span>姣旇緝閲嶈鐨勬槸澶ф鏈変笁鐐?/span>-鏂板敭浠峰嚭鏉ヤ簡錛屽皢鏉?span> FB 鍒嗕袱縐嶇増鏈?/span>
Standard: $299
Pro: $699Standard 姣旂幇鍦?span> $499 榪橀檷200鍏冿紝鎵浠ョ幇鍦ㄦ槸嫻佽鏂扮増鏈兘瑕侀檷涓ょ櫨鍚?/span>錛熶笉榪囨病鏈?span> charting component, 榪欎簺鐜╂剰(鍖呭惈鍍?span> AdvancedDataGrid 榪欑 visual data component絳?span>)閮界Щ鍒?span> Pro 鐗堛?/span>榪欐牱鍋氱殑鎰忎箟寰堟槑鏄撅紝涓昏灝辨槸瑕佸ぇ騫呴檷浣?span> flex 鐨勮繘鍏ラ棬鍧庯紝鍘熸湰瑕?span>$499 鎵嶈兘鏈夋嫢鏈?span> IDE錛岀幇鍦ㄥ彧瑕?span> $299 鍑犱箮鏄漢浜轟拱鐨勮搗錛屽彟涓鏂歸潰錛屽姣忓ぉ闈犲紑鍙?span> flex 涓虹敓鐨勪漢鏉ヨ錛屽皢濂芥枡鐨勪竴嬈″叏濉炲叆pro鐗堬紝鑰屼笖姣旂幇鍦?span> $799 浣庝簡 100鍏冿紝涔熺畻鏄柟渚胯澶氾紝鑷沖皯浠樹竴嬈¢挶灝卞彲浠ヤ拱鍒板叏閮ㄧ殑涓滆タ(鑰屼笉鐢ㄥ啀涓鏍鋒牱鍘諱粯璐圭劧鍚庢嫾璧鋒潵)錛岃繖涓競鍦虹瓥鐣ヤ笉閿欍?/span>-Linux 鐗堥棶甯?/span>
榪欎笘鐣屼笂浼間箮鏈夊緢澶氫漢涓鐩存兂鍦?span> linux 涓婂紑鍙?span> flex錛岃屼笖鍙敤 text editor + sdk 榪樹笉澶燂紝涓瀹氳鏈?span> IDE 鎵嶈繃鐦撅紝鐜板湪鍙О蹇冨鎰忎簡錛?span>beta鐗堝凡鍙湪 lab 涓婁笅杞姐?/span>-flex testing framework 鏀逛負鍏嶈垂
浠ュ線瑕佺敤 Mercury Quicktest Pro 鏉ュ仛 UI testing 鏃訛紝蹇呴渶瑕佸厛瑁?span> testing framework, 浣嗗畠闇瑕佷竴緇?span> FDS 鐨勫簭鍙鋒墠鑳戒嬌鐢紝鑰屽嚑涔庢病浜轟細鎰挎剰鑺?span> $6,000-$12,000鐨勪環閽卞幓涔拌繖鐜╂剰銆?/span>涓や釜鏈堝墠鎴戝湪鐜╂煇涓?span>fb3 beta 鐗堟湰鏃訛紝鎰忓鍦ㄥ畨瑁呯洰褰曚笅鍙戠幇灞呯劧鍐呭緩浜嗚繖涓?span> installer錛岃屼笖榪樼湡鐨勫彲浠ヨ涔熷彲浠ョ敤錛岄偅鏃舵垜浠ヤ負鏄彧鏄崟綰殑鎰忓涓嶅皬蹇冨寘浜嗚繘鍘?span>(鎴栨槸 adobe 蹇冩兂鍙嶆鍗栦笉鎺夊共鑴嗘涔愬ぇ鏀鵑?span>)錛岀幇鍦ㄦ墠鐭ラ亾鍘熸潵榪欎簺鏄晠鎰忕殑鍟?span>~
2. Thermo
綺楃暐綆浠嬬湅榪欓噷Max 鏈熼棿鍙︿竴涓噸澶存垙灝辨槸 Thermo 鍒濅寒鐩革紝緗戠粶涓婂凡緇忔湁涓浜涘獎鐗囧彲鐪嬨?/span>
鐩墠鐪嬫潵瀹冪殑鎿嶄綔鏂瑰紡寰堝儚 adobe 浜у搧鐨勫ぇ鍚堜綋錛屾垜瑙傚療鍒扮殑鍖呭惈-鍙洿鎺ヨ鍏?span> Photoshop PSD 妗o紝騫朵笖褰撶劧淇濈暀鎵鏈夌殑 layer 淇℃伅涓?span> meta info
-璇誨叆鐨?span> psd 妗d細浠?span> tracing image 鐨勬柟寮忔樉紺哄湪搴曞眰(榪欐槸璺?span> dreamweaver 涓?span> golive 鍊熸潵鐨勬蹇?span>)-鍙敤綾諱技 edit in place (榪欐槸 fireworks, image ready, golive 鏃朵唬灝辨湁鐨勪笢瑗?span>)灝嗙敾闈㈠厓绱犺漿鎹負 mxml 緇勪歡錛岃屼笖浼氫繚鐣?span> style info-杞崲鎴?span> mxml 鍚庝細浣跨敤鏂扮殑 tag 鏉ユ爣璇嗭紝渚嬪 mx:bitmapGraphic 涓?/span>
3. Flash Player 10 (codename Astro)
FP9 浠?span> as2 鍙戝睍鍒?span> as3 鍙鏄?span> flash 鍗佸勾鏉ユ渶鎯婁漢鐨勫ぇ璺冭繘錛屽嚑涔庡畬鍏ㄦ敼鍐欎簡 RIA 鐨勫巻鍙詫紝鍘熸湰浠ヤ負澶ф寰堥毦鍐嶇湅鍒板悓鏍?span> level 鐨勬敼鐗堬紝浣嗗緢鏄劇劧鎴戦敊浜嗐?/span>FP10 鏂板鐨勫嚑涓噸鐐瑰姛鑳藉ぇ鐣ュ寘鍚?/span>-綆鏄撶殑 hardware 3D support錛氱湅鏉ュ師鏈墦姝諱笉鎰挎剰涓?span> fp 鍔犲叆3d鍔熻兘鐨?span> engineering team 榪樻槸寰堥『搴旀皯鎯呭晩錛屽綋鐒剁洰鍓嶇湅鍒扮殑 3d 鍔熻兘榪橀潪甯告湁闄愶紝鏈変漢縐板畠涓?span> 2.5D錛屼篃鏈変漢縐頒負 card-game style 3D錛屼笉榪囧氨鎴戝 flash player team 鐨勪簡瑙o紝灝嗘潵鍐呭緩鐨?span> 3D 鍔熻兘榪戒笂 Papervision3D 搴旇鏄病闂鐨勩?/span>-advanced text layout: 榪欏寘鍚簡 multi-column 鐨勮蛋鏂囨柟寮忥紝涔熷寘鍚簡 right-to-left layout(RTL)錛岃繖涓や歡浜嬪湪榪囧幓鎴戜滑閮介亣榪囷紝鍘誨勾鍒朵綔鐨勪竴涓ぇ鍨?span>app鍦ㄥ鍥借璦鍖栨椂錛屽鎴峰眳鐒墮棶錛氥庡笇浼潵鏂囩増鐨勬帴鍙f枃瀛楀簲璇ユ槸浠庡彸鍒板乏鍟婏紝鍙互鏀逛竴涓嬪悧錛熴忓綋鏃跺績閲岀殑鍥炵瓟錛氥庡綋鐒跺彲浠ワ紝浣犲厛涔頒笅 flash player team 浜ょ粰鎴戞寚鎸ワ紝鎴戜繚璇佸崐騫村唴鐢熷嚭鏉ョ粰浣?span>…銆忕幇鍦ㄨ繖浠朵簨鍙畝鍗曞浜嗭紝鍙槸 UI Component 閮ㄤ喚瑕佹敼鍐欑殑涓滆タ榪樻槸寰堣垂鍔涘晩銆?/span>-custom filter/effect with “Hydra” image processing language:
榪欑畻鏄潪甯告湁瓚g殑鏂扮帺鎰忥紝Hydra 鏄竴縐嶇被浼?span> C 鐨勮璦錛?span>user 鍙敤瀹冪紪杈戣嚜宸茬嫭闂ㄧ殑 filter/effect錛屼箣鍓嶆湁 Vector/Bitmap API 澶у灝卞凡緇忕帺鍑轟竴鍫嗙柉鐙傜殑鎶婃垙錛岀幇鍦ㄦ湁浜嗘洿 low-level 鐨勫伐鍏鳳紝鍛靛懙鍛碉紝綺懼僵鍙湡錛屽彧鏄互鍚庢暀 flash 鐨勮甯堟槸涓嶆槸涔熻榪涗慨涓涓?span> C/C++ 浜?span>? Orz
4. Flash Lite 3 鎺ㄥ嚭
鍔熻兘浠嬬粛鐪?span>榪欓噷閲嶇偣鏈?/span>
-flash home: 榪欎釜綆楁槸鐪熸鐨勬柊鐜╂剰錛屼互寰 flash lite 閮芥槸浠?span> app 鐨勫瀷寮忓瓨鍦ㄤ簬鎵嬫満涓婏紝涔熷氨鏄鐢ㄦ椂鎵嶅惎鍔紝浣?span> flash home 鍒欐槸鐩存帴鐢?span> flash lite 鍙栦唬鎺夋墜鏈虹殑寮鏈虹敾闈紝涓寮鏈哄畬灝辨槸 flash lite 鍦ㄩ偅閲岋紝鑰屼笖瀹冩槸 instant on銆?/span>涔嬪墠鏇捐亰榪?span> LG phone 鏁翠釜 UI 閮界敤 flash lite 鍐欐垚錛岀幇鍦ㄥ垯鏄洿榪涗竴姝ユ敾鍗犱簡寮鏈虹敾闈紝鏈潵鐨勫彂灞曢潪甯告湁瓚e晩錛屽笇鏈涘畠鑳藉敖蹇拷涓?span> as3 鐨勮剼姝ワ紝鎶婁紶璇翠腑鐨?span> flex framework for mobile 鎼嚭鏉ワ紝灞婃椂鍙氨鐜╁埌涔愮炕澶╀簡銆?/span>-as2 support: 榪欎釜濂藉儚鍠婂緢涔呬簡錛岀幇鍦ㄧ湡鐨勬敮鎸?span> class 浜嗗悧錛?/span>
-flv support: 榪欎釜鍒版槸寰堥噸瑕佺殑鏂板姛鑳斤紝涓嶈繃宸茬粡涓嶆槸鏂伴椈錛屼粖騫村垵鏃跺氨宸插彂琛?/span>
-xml loading: 浠?span> flash lite 2.1 璧峰氨鍙互鏀寔 socket server錛屾墍浠ヨ鍦ㄦ墜鏈轟笂鐜?span> push/pull 鍙樼殑闈炲父綆鍗?/span>
5. VOIP in flash
FP 灝嗘敮鎸?span> voip 涓嶆槸鏂伴椈錛屼絾鐪熸鐪嬪埌瀹冭繍浣滆繕鏄悡涓璺熾?/span>Pacifica 鏄繖涓駭鍝佺殑浠e彿錛屽畠灝嗘彁渚涗笅鍒楀姛鑳?span>:Version 1:
* HQ voice chat
* text instant messaging
* presence
* NAT/Firewall traversal
* Ajax/HTML, Flash/FlexFuture Roadmap:
* video chat
* p2p
* AIR
* PSTN Access瑕佹敞鎰忕殑閲嶇偣鏄繖鍑犱釜瀛?span>: VoIP, SIP, SDP 涓?span> P2P銆?/span>
浣犺兘鎯寵薄涓鏃?span> flash player 鏈韓鍐呭緩 VoIP 涓?span> SIP 鏀寔鍚庯紝鍙兘鐨勫簲鐢ㄦ湁澶氬箍鍚楋紵綆鍗曟潵璇達紝涓婇潰listing 閲岄潰闅忎究涓欏癸紝閮藉彲浠ュ皢榪欎釜涓栫晫鍐嶇炕涓閬嶏紝宸笉澶氬氨鏄繖鏍風殑褰卞搷鍔涖?/span>
6. CoCoMo
榪欏彲涓嶆槸 Adobe 涓?Beach Boys 鐨勫紓涓氱粨鐩熴?/span>CoCoMo 鏄?span> Adobe Connect (涔熷氨鏄?span> Breeze) 鏂扮増鏈殑浠e彿錛屼笉鍑烘墍鏂欐灉鐒剁敤 flex 鍏ㄩ儴鏀瑰啓錛屼絾鏇存儕浜虹殑鏄畠寮濮嬬帺璧峰彟涓涓洿鏈夋綔鍔涚殑甯傚満錛?span>API platform !灝嗘潵 flex developer 鍙搷浣?span> Adobe Connect 鐨?span> API 鏉ュ埗浣滃悇縐?span> desktop sharing, audio/video chat & collaboration錛岀浉杈冧箣涓嬶紝涔嬪墠鐐掔殑鐏儹鐨?span> facebook platform 瀹炲湪鏄病浠涔堝晩(涓嶈繃褰撶劧榪欎袱鑰呭彲浠ユ槸瀹岀編鐨勪簰琛ワ紝涓嶄竴瀹氭槸闆跺悎娓告垙)銆?/span>
7. Share
涓涓?span>鍦ㄧ嚎鏂囦歡銆佸垎浜侀槄璇葷殑騫沖彴錛屾瘡涓?span>user 鏈?span> 1gb 絀洪棿銆?/span>鍚屾牱鐢?span> flex 鍐欐垚錛岀敤浜嗚澶氱啛鎮夌殑緇勪歡錛屼緥濡?span> page component (oh, the great Ely!) 涓?span> flash paper錛屼篃鎻愪緵 REST style API 鍙緵 mesh up錛屽皢鏉ユ墦綆楁暣鍚?span> Buzzword 鎻愪緵緙栬緫鍔熻兘銆?/span>浠庢湰璐ㄦ潵鐪嬶紝online-doc sharing 榪欑涓滆タ褰撶劧鏃╁氨鏈変漢鍋氳繃浜嗭紝緗戠粶涓婇殢渚塊兘鍙互鎵懼埌涓鐙楃エ錛屽悓鏍鋒槸璁╀漢涓婁紶鏂囦歡錛岀劧鍚庤漿妗f垚 swf 鍐嶇敤 flash player 鏉ョ湅錛岄偅 adobe 鍙堜綍鑻﹀憿錛?/span>灝辨垜鏉ョ湅錛?span>Share 鏄?span> adobe 鍦?span> web publishing 鏂歸潰鐨勬柊灝濊瘯錛屼富瑕佸埄鐢ㄧ殑浼樺娍褰撶劧灝辨槸鑷鐨?span> PDF 涓?span> flash player錛屼絾璺熷叾瀹冨崟綰彧鏄?web 2.0 startup 鍏徃涓嶅悓鐨勬槸錛?span>adobe 蹇冮噷鎯崇殑搴旇鏄畠瀹屾暣鐨?span> electronic publishing 騫沖彴錛屼粠鍐呭銆佸埗浣溿佺敓鎴愬埌娑堣垂錛屽笇鏈涜兘閫氶氬寘涓嬫潵錛屽緩绔嬪ぇ涓緇熺殑浣撶郴錛屾垜鐩鎬俊 Share 涓庝箣鍓嶄粙緇嶈繃鐨?span> ebook reader 閮藉彧鏄繖涓鍒掍笅鐨勯儴浠戒駭鐗╋紝鏈潵鍙戝睍榪樺緟瑙傚療銆?/span>
8. C/C++ to AS3 conversion
榪欎釜鐜╂剰闈炲父鏈夎叮錛岃繖浣嶇浜哄啓浜嗕竴涓?span> compiler錛屽彲浠ュ皢 C/C++ 鐨?span> code 鐩存帴杞瘧鎴?span> AS3錛岀劧鍚庡啀緙栬瘧鎴?span> swf 渚?span> flash/flex/air 浣跨敤錛岀幇鍦烘渶鍙︿漢闇囨捈鐨?span> demo 灝辨槸浠栫洿鎺ュ皢 Quake (涓涓?span> doom-like 鐨勫皠鍑繪父鎴?span>) 緙栬瘧鎴?span> flash 鐗堢劧鍚庣帺浜嗚搗鏉ワ紝浣犲彲浠ユ兂瑙佺幇鍦轟細鐤媯鍒頒粈涔堢▼搴?span>!! (鏇撮叿鐨勬槸榪欎綅宸ョ▼甯堣繕鏄竴鍓鉤娣$殑琛ㄦ儏錛岀湡姝f槸鎵尓鍚冭佽檸鐨勬瀬鑷磋〃鐜板晩)銆?/span>濂斤紝鐑儏瀹屾瘯錛屾帴鐫鍒嗘瀽甯堜笂韜?/span>鎴戜富瑕佹濊冪殑鏄笅鍒椾笁鐐癸細1. 涓轟綍闇瑕佽繖涓笢瑗匡紵涓婂浘涓洓涓钀藉啓鐫 (ruby, php, python, lua), 瀹冧唬琛ㄤ粈涔堬紵
2. 榪欎笢瑗胯儗鍚庣殑浼佸浘鏄粈涔堬紵
3. 璋佷細鑾風泭錛熷畠鍙互鐢ㄥ湪浠涔堝湴鏂癸紵鍙戝睍娼滃姏鏈夊澶э紵鍩烘湰涓婃垜宸茬粡鏈変簡涓濂楀ぇ鑷寸殑鎯蟲硶涓庣悊璁猴紝浣嗗緢鏈夊叴瓚f兂鍚惉鍚勪綅鐨勬兂娉曘?/span>
9. Adobe 涔頒笅 Buzzword
榪欎歡浜嬪叾瀹炲嚑涓湀鍓嶅氨鏈夐澹板嚭鏉ワ紝褰?adobe 絎竴鎵瑰伐紼嬪笀榪涢┗ buzzword 鍔炲叕瀹ゆ椂錛屾槑鐪間漢灝辯煡閬撴槸鎬庝箞鍥炰簨浜嗭紝鍙嶈屾瘮杈冨鎬殑涓轟綍 SlideRocket 涓鐩磋皥涓嶄笅鏉?span>(瓚佷漢瀹惰繕娌?span> IPO 鍓嶅鎾掔偣閽卞揩鐐規悶瀹氬皢鏉ユ瘮杈冨ソ鍔炰簨鍟?span>)錛?/span>浠庡競鍦鴻搴︽潵鐪嬶紝Buzzword(綾諱技 word 鐨勬枃瀛楃紪杈戝櫒) 涓?span> SlideRocket(綾諱技 powerpoint 鐨勭畝鍗曡蔣浠?span>) 搴旇鏄綋浠?span> RIA 涓氱晫鏈淇變唬琛ㄦт笌鏉浼ゅ姏鐨勪袱鏀?span>app錛屽畠浠嚑涔庢湁鎾煎姩 Office 甯傚満鐨勮兘鍔涳紝鍥犳 adobe 瀵瑰畠浠殑閲嶈涓庡叧鐖卞彲璇存槸鍏舵潵鏈夎嚜錛屼撼涓嶅鎬?/span>姣旇緝鍊煎緱瑙傚療鐨勫皢鏄紝榪熸棭 Adobe 鎵嬩笂浼氭湁 word, powerpoint 涓?span> excel 鍏煎鐨勮蔣浠?span>(褰撶劧鏄?span> built with Flex/AIR)錛屽眾鏃朵笘鐣屼笂鍙湁鍥涢棿涓繪祦鍟嗕笟鍏徃鏈夋垚鐔熺殑 office 浜у搧(OO.o 榪欑灝卞厛涓嶇畻榪涙潵錛屽憙錛屽ソ錛屽叾瀹炶繕鏈?span> IBM Lotus Symphony錛屼笉榪囩煡鍚嶅害涓嶉珮涔熷厛鏀句竴杈?span>)-Microsoft: Office 鐨勯湼涓誨湴浣嶆棤搴哥疆鐤戯紝runs on desktop only
-Apple: Mac 涓婄殑 Office 闇鎬富, runs on desktop only
-Google: Doc 緋誨垪浜у搧錛岀畻鏄洰鍓?span> web-based 閲屾渶鎴愮啛鐨勪竴瀹?/span>
-Adobe: 鍚屾牱涓?span> web-based, 浣嗗洜涓洪噰鐢?span> flash 鍒朵綔錛屽洜姝ゆ搷浣滄帴鍙d笌鍔熻兘灝嗘槑鏄捐秴瓚?span> google docs (涓庡叾瀹?span> ajax 緋誨垪鐨?span> office-apps)鑰屽叾涓彧鏈?span> google 涓?span> adobe 宸茬粡寰堢Н鏋佸湪 web-based 榪欏潡娣辮?span>(MS鐨?span> office live 鍒欒繕鏈垚鐔?span>)錛屼粠瓚嬪娍鏉ョ湅(on-line, access everywhere, collaboration, messaging)錛?span>web寮忕殑浜у搧鍓嶉旀槸姣旇緝鐪嬪ソ鐨勶紝鑰屼粠鎶鏈潰鏉ョ湅錛?span>flash寮忕殑 web app 寰寰鍙堟瘮 ajax 寮忕殑濂戒竴鐐?span>(鑷沖皯鍦?span> tool 綰ц繖涓鍩?span>)錛屾墍浠?span> adobe 鍙互璇存槸宸茬粡绔欏湪姣旇緝鏈夊埄鐨?span> position錛岃繖鏄緢鏈夎叮涔熷煎緱瑙傚療鐨勪簨(鑰屼笖瑕佺潄澶х溂鐫涘ソ濂界湅鐫)銆?/span>
10. Flash CS4 涓?/strong> Fireworks
CS4Flash 閮ㄤ喚鏈夎澶氫笉閿欑殑鏂板姛鑳斤紝渚嬪鍙湪 authoring time live preview video content錛?span>timeline 澶ф敼鑹?span>, tween 鏂瑰紡鏇磋嚜鐢憋紝浠ュ強紲炲鐨?span> IK 鏁堟灉錛屾垜鎯沖鑳芥帉鎻¤繖浜涙柊涓滆タ鐨勫濯掍綋璁捐甯堟潵璇達紝榪欏簲璇ユ槸闈炲父媯掔殑娑堟伅銆?/span>Fireworks 閮ㄤ喚鍒欐槸寮鴻皟涓?span> flex 鐨勬暣鍚堬紝渚嬪鍙湪 fireworks 閲屽埗浣滅粍浠朵笌style/skin 鐒跺悗鐩存帴杈撳嚭鏈?span> scale-9 鐨?span> swc 緇?span> flex 鐢紝鍩烘湰涓婇兘榪樻槸寰堢矖嫻呯殑鏁村悎灝濊瘯錛屾湭鏉?span>12涓湀榪樿澶氬姫鍔涖?/span>
鎬葷粨
緇艱浠ヤ笂 highlight 鍑烘潵鐨?span> 10鐐癸紝濡傛灉浣犱粩緇嗗幓鎺ㄦ暡姣忎竴鐐硅儗鍚庢墍浠h〃鐨勬剰涔夛紝騫舵濊冨畠浠湭鏉ュ彲鑳界殑褰卞搷鍔涗笌鍐插嚮鏁堝簲錛屾垨璁鎬綘浼氬儚鎴戜竴鏍瘋寰楀叏韜彂鐑績璺沖姞蹇?/span>鍩烘湰涓婅瀵熻繖嬈?span> Max 鎻湶鐨勬秷鎭紝鎰熻寰堝儚鍦ㄧ湅楂樻墜瀵瑰紙錛屽綋浣犵湅鍒板眬涓竴姝ユ鏃訛紝灝辯煡閬撹儨璐熷凡瀹氾紝鏈潵鎵鏈夌殑姝ユ暟鐨嗗凡紜畾錛岀粨鏋滃彧鏄椂闂撮棶棰橈紝鑰屾洿浠や漢鎯婅鐨勬槸錛屽線寰榪欒嚧鑳滅殑涓姝ユ槸濡傛鐨勪笉鏄庢樉涓庝笉緇忔剰錛岃交杞葷殑婊戣繃灝卞喅瀹氫簡鏈潵錛岃繖鎵嶆槸鐪熸璁╀漢鑷徆寮楀鐨勫湴鏂廣?/span>鎯沖埌榪欓噷錛屽彧鑳借榪欑湡鐨勬槸涓涓?span> exciting times錛屽緢楂樺叴鑳界疆韜叾涓佷翰鑷粡鍘嗚屼笉鏄湪鍗佸勾鍚庡洖澶存潵璧炲徆褰撳勾銆?/span>
Catalog Basic Part:
2 Download and install AsWing
3 Create,Compile,Run a Application that use AsWing components.
Advanced Part:
5 Checkout AsWing from SVN
|
1.1 Download Flex Builder2.0
In Basic Part, we selecte download “Flex Builder 2 (English|Windows|168.78 MB)”;
Double click the file you hava downloaded which name like “FLXB_2.0_Win_WWE.exe
select “Flex Builder and Flex SDK”
Select a folder to install Flex Builder.I change to “G:\Flex\Flex Builder 2”.
Flex Builder is installed Complete.
1.2 Stratup Flex Builder.
After Download and Install Flex Builder, we can select Start ->
All Programs -> Adobe -> Adobe Flex Builder 2 to open Flex
Builder.
The Flex Builder is starting, it’s version is 2.0.1.
The main window of Flex Builder.
2.1 Downlaod AsWingA3
At the beginning,we download packaged version of AsWing at Here.
Selecte “AsWing A3 0.8”(it will change when you visit this page).
Remember to choose AsWing A3 series which is base ActionScript 3.The
downloaded file name is “aswing_a3_0_8.zip”.
Change default Workspace to “G:\acode”, Flex Builder will restart automatic.
Choose a folder as workspace of Flex Builder.
Create a “Flex Library Project” with name ”AsWingA3”.
2.2 Import AsWing project.
Unpack the “aswing_a3_0_8.zip” to somewhere. Right-Click on project “AsWingA3″ select “Import”
Select import form “File System”
Select the location you unpacked,
Select into folder, it’s “AsWingA3″.
Some Properities setup
Right click on the AsWingA3 project, select “Properities” at the bottom.
Change to “Flex Build Path”, check the “src” folder and ,fill “src” in “Main sorce folder”
Select “Flex Library Complier” , Uncheck the “Enable warnings”,
2.3 Clean to Build
Check the projects yout want to clean and rebuild.Press “OK” button.
Building project will take you about one minute.
After build project, a new library file(AsWingA3.swc) is created.
3.1 Create a new ActionScript Project with project name “AsWingExamples”.
Fill AsWingExamples in “Project name” ,click Finish button.
Create a Source Code Forlder with name “src”,
Open Properities pane, select “ActionScript Build Path”->”Source path”,fill “src” in “Main sorce folder”
Change to “Library path”,click “Add Project” button,
select “AsWingA3” as a library.
Create a ActionScript Class with name “Test”, copy the code into it:
Source code of Test.as
import org.aswing.AsWingManager;
import org.aswing.JFrame;
import org.aswing.JLabel;
import org.aswing.event.AWEvent;
import org.aswing.geom.IntDimension;public class Test extends Sprite
{
public function Test(){
super();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.stageFocusRect = false;
AsWingManager.setRoot( this );createFrame();
}private function createFrame() : JFrame{
var frame : JFrame = new JFrame( this, "Test of AsWingA3" );
frame.getContentPane().append(new JLabel( "Hello world!" ));
frame.setSize(new IntDimension( 200, 120 ) );
frame.show();
return frame;
}
}
}
3.2 Run the application
At the end, press the green “Run” button at ToolBar, select “Test”,
wait a second, a html page is popup with our first ActionScript application.
ActionScript3.0 鏄疉dobe鍏徃涓哄熀浜巉lash player 騫沖彴寮鍙戠殑涓縐嶈剼鏈璦錛屽紑鍙戣呭彲浠ヤ嬌鐢ㄥ叾寮鍙戝嚭鍩轟簬flash player榪愯鐨勫濯掍綋搴旂敤紼嬪簭銆?br />
璇峰弬鑰冿紝銆夾sWing浠嬬粛鏂囨。銆嬨?/p>
璇寸櫧浜咥sWing灝辨槸涓濂楃敤AS3鍐欐垚鐨勭被搴擄紝鎵浠ュ彧瑕佹湁緙栬瘧AS3紼嬪簭鐨勭幆澧冿紝灝辮兘浣跨敤AsWing銆?/p>
浠庣紪璇戠幆澧冩潵璇村熀鏈氨鏄?縐嶏紝涓涓槸Flash CS3錛屽彟涓涓氨鏄?flex sdk銆傚紑鍙戝伐鍏峰氨寰堝浜嗭紝瀹樻柟鐨勬湁 FlashCS3錛孎lex Builder(鎺ㄨ崘鐢‵B3)錛屾垨鑰呬嬌鐢ㄥ紑婧愮殑FlashDevelop錛堟敮鎸佷嬌鐢╢lash鍜宖lex sdk緙栬瘧錛夛紝鐢氳嚦鎵嬪姩璋冪敤mxmlc緙栬瘧銆?/p>
鏈変簡寮鍙戠幆澧冿紝閭d箞鎴戜滑灝辮涓嬭澆AsWing寮鍙戝寘錛屽茍涓旈厤緗垜浠殑寮鍙戝伐鍏楓?/p>
鍙互鍒?http://code.google.com/p/aswing/downloads/list 涓嬭澆AsWing寮鍙戝寘銆?/p>
鎵懼埌 aswing_a3_1.2_fx.zip 鎴?aswing_a3_1.2_fl.zip 鍏朵腑 1.2 琛ㄧず鐗堟湰鍙鳳紝涓鑸笅杞芥渶鏂扮殑灝辮銆傚悗闈㈢殑 fx 鎴?fl 浠h〃閫傚悎鐨勭紪璇戠幆澧冦備竴鑸鏋滅敤flex sdk鐨勮瘽灝變笅杞絝x緇撳熬鐨勫寘銆傜敤flashCS3鐨勮瘽灝變笅杞絝l緇撳熬鐨勩?/p>
褰撶劧浣犱篃鍙互閫氳繃svn瀹㈡埛绔彇鍑烘渶鏂扮殑AsWing浠g爜錛屽叿浣撴柟娉曞氨涓嶅啀璧樿堪浜嗭紝svn鍦板潃瑙侊細http://www.aswing.org/?page_id=4 銆?/p>
涓嬮潰鍏蜂綋浠嬬粛涓嬪湪FlexBuilder3鍜孎lashCS3涓殑閰嶇疆鏂規硶銆傚叾浠栧伐鍏烽浄鍚屻傛湰浜轟嬌鐢╓indows鎿嶄綔緋葷粺錛屽叾浠栫郴緇熶笅鐨勬搷浣滄柟寮忓熀鏈竴鑷淬?/p>
P.S.褰撶劧FB3涔熷彲浠ヤ嬌鐢ㄧ洰褰曚綔涓虹紪璇戣礬寰勶紝灝辨槸鍦↙ibrary path 鏃佺殑 Source path涓坊鍔犱竴涓?AsWing鐨剆rc鐩綍銆?/p>
FB涓湪鍒氭墠寤虹殑ActionScript欏圭洰涓柊寤轟竴涓狝ctionScript class鏂囦歡錛岃緭鍏ヤ笅闈㈢殑浠g爜銆?/p>
package {
import flash.display.Sprite;
import org.aswing.AsWingManager;
import org.aswing.FlowLayout;
import org.aswing.JButton;
import org.aswing.JFrame;
import org.aswing.JOptionPane;
import org.aswing.event.AWEvent;
public class HelloAsWing extends Sprite {
private var myFrame:JFrame;
private var myButton:JButton;
public function HelloAsWing() {
AsWingManager.initAsStandard(this);
myButton = new JButton("Click Me");
myButton.addActionListener(__buttonClicked);
myFrame = new JFrame(this, "My Frame");
myFrame.getContentPane().setLayout(new FlowLayout());
myFrame.getContentPane().append(myButton);
myFrame.setSizeWH(300, 200);
myFrame.show();
}
private function __buttonClicked(e:AWEvent):void {
JOptionPane.showMessageDialog("Hello", "Hello, World!");
}
}
}
濡傛灉鏄嬌鐢‵lash CS3錛屽彲浠ュ厛鏂板緩涓涓狝ctionScript鏂囦歡錛岃緭鍏ヤ唬鐮佸悗錛屼繚瀛樹負HelloAsWing.as錛岀劧鍚庢柊寤轟竴涓狥lash (ActionScript3.0)鏂囦歡錛屽皢璇la鏂囦歡淇濆瓨鍦ㄤ笌HelloAsWing.as鐨勫悓涓綰х洰褰曚腑錛岀劧鍚庡皢fla鐨勬枃妗g被璁劇疆涓? HelloAsWing銆?/p>
榪愯鍚庡彲浠ョ湅鍒扮被浼艱繖鏍風殑鐣岄潰錛屼綘鍙互璇曠潃瀵硅紿楀彛榪涜鍚勭鎿嶄綔錛?code>
鐐瑰嚮 Click Me 鎸夐挳鍚庯紝浼氬脊鍑轟竴涓彁紺虹獥鍙o紝濡備笅鍥撅細
榪欏氨鏄嬌鐢ˋsWing鍒涘緩UI緇勪歡鐨勪竴涓潪甯哥畝鍗曠殑瀹炰緥紼嬪簭錛屼笅闈㈡垜浠畝鍗曞垎鏋愪竴涓嬭紼嬪簭鐨勪唬鐮併?code>
浣跨敤AsWing錛屼富紼嬪簭涓嶉渶瑕佸熀浜庝換浣曞簲鐢ㄧ▼搴忔鏋訛紝AsWing鐨刄I緇勪歡閮戒粠flash鍘熺敓鐨凷prite鎵╁睍鑰屾潵錛屾墍浠ュ嚑涔庢瘡涓涓狝sWing緇勪歡閮借兘琚崟鐙斁鍒癉isplayObjectContainer涓茍鑳芥甯鎬嬌鐢ㄣ?br /> 鎴戜滑鐨勪富紼嬪簭浠呴渶緇ф壙Sprite鍗沖彲錛屼笅闈㈠垎鏋愪竴涓嬫瀯閫犲嚱鏁頒腑鐨勪唬鐮併?/p>
AsWingManager.initAsStandard(this);
寤鴻鍦ㄤ嬌鐢ˋsWing紼嬪簭涔嬪墠鍏堣皟鐢ㄨ繖涓柟娉曪紝璇ユ柟娉曞皝瑁呬簡涓浜涘父鐢ㄥ姛鑳斤紝璋冪敤浜?code>AsWingManager鐨剆etRoot鏂規硶錛岀敤浜庤緗綰矨sWing緇勪歡鐨勫鍣紝榪欓噷鐨則his灝變唬琛ㄤ簡褰撳墠AsWing緇勪歡鐨剅oot銆傚彟澶栬繕浼氳緗竴浜涚郴緇熷弬鏁幫紝濡?align錛宻caleMode絳夈?/p>
myButton = new JButton("Click Me");
myButton.addActionListener(__buttonClicked);
JButton 鏄疉sWing涓熀鏈殑鎸夐挳緇勪歡錛岃繖閲屾柊寤轟簡涓涓狫Button瀹炰緥錛屽茍璁劇疆鎸夐挳鐨凩abel錛岀浜屽彞浠g爜緇欐寜閽坊鍔犱竴涓簨浠剁洃鍚紝褰撶偣鍑繪寜閽悗灝變細瑙﹀彂錛岃繖閲岀殑addActionListener
鏄疉sWing璁捐鎴愮畝鍖栦簡浜嬩歡鐩戝惉鐨勫啓娉曪紝褰撶劧涔熷彲浠ュ啓鎴愯繖鏍?myButton.addEventListener(AWEvent.ACT,
__buttonClicked);銆?br />
AwEvent
鏄疉sWing涓渶鍩烘湰鐨勪簨浠剁被錛孉CT浜嬩歡綾誨瀷琛ㄧず涓浜涘熀鏈粍浠剁殑瑙﹀彂浜嬩歡綾誨瀷錛屽JButton鐨勯紶鏍囩偣鍑諱簨浠訛紝JTextField鐨勫洖杞︿簨浠剁瓑銆傝繖閲屾寜閽偣鍑誨悗灝變細鎵ц __buttonClicked
浜嬩歡澶勭悊鍑芥暟錛屽嚱鏁頒腑浠g爜紼嶅悗璁ㄨ銆?/p>
myFrame = new JFrame(this, "My Frame");
myFrame.getContentPane().setLayout(new FlowLayout());
myFrame.getContentPane().append(myButton);
JFrame鏄父鐢ㄧ殑紿楀彛緇勪歡錛屾湁綾諱技鎿嶄綔緋葷粺紿楀彛鐨勫熀鏈壒鎬э紝濡傛渶灝?澶у寲錛屽叧闂紝緙╂斁錛屾嫋鍔ㄨ兘鍔熻兘銆侸Frame鐨勭涓涓弬鏁版寚紺鴻紿楀彛鎵鍦ㄧ殑瀹瑰櫒錛岀浜屼釜鍙傛暟璁劇疆紿楀彛澶撮儴鐨刲abel錛堝嵆title錛夈?br />
getContentPane()
鏂規硶鑾峰彇JFrame瀹圭撼鍏朵粬緇勪歡鐨勫鍣紝鍚慗Frame涓坊鍔犵粍浠惰寰椾笉瑕佺洿鎺ヨ皟鐢?code>JFrame鐨?code>append鏂規硶錛孞Frame 鐪熸瀹圭撼鍏朵粬緇勪歡鐨勪笉鏄湰韜紝鑰屾槸鍏跺唴閮ㄧ殑涓涓鍣紝鐢?code>getContentPane()鏂規硶鑾峰彇銆?br />
姣忎釜瀹瑰櫒鎺掑垪緇勪歡鐨勬柟寮忛兘鐢盠ayout鎺у埗錛宻etLayout灝辨槸璁劇疆瀹瑰櫒鐨勫竷灞鏂瑰紡錛屽叧浜庡竷灞璇峰弬鑰冦夾sWing甯冨眬綆$悊鍏ラ棬銆嬨?br />
鐒跺悗灝辨槸璋冪敤瀹瑰櫒鐨刟ppend鏂規硶灝嗗垰鎵嶇殑鎸夐挳鍔犲叆鍒癑Frame鐨勫鍣ㄤ腑銆?/p>
myFrame.setSizeWH(300, 200);
myFrame.show();
榪欎袱鍙ヤ唬鐮佸氨姣旇緝綆鍗曚簡錛岃緗甁Frame鐨勫昂瀵革紝騫惰JFrame鏄劇ず鍑烘潵銆傚彲鑳戒綘鍙戠幇娌℃湁浣跨敤addChild鏂規硶錛屾病鍏崇郴錛孞Frame緇ф壙 JPopup錛屾墍鏈夊熀浜嶫Popup鐨勭粍浠訛紝AsWing閮戒細鑷姩鏇夸綘娣誨姞鍒癉isplayList涓紝璋冪敤show() 鏂規硶灝卞彲浠ヨ緗負鍙銆?/p>
涓嬮潰鐪嬩笅寰堢畝鍗曠殑浜嬩歡澶勭悊鍑芥暟
private function __buttonClicked(e:AWEvent):void {
JOptionPane.showMessageDialog("Hello", "Hello, World!");
}
JOptionPane
鏄竴涓被浼糀lert鐨勭粍浠訛紝showMessageDialog()
鏂規硶鍗蟲樉紺轟竴涓秷鎭錛岀涓涓弬鏁頒負娑堟伅妗嗙殑title錛岀浜屼釜鍙傛暟璁劇疆娑堟伅鍐呭鐨勫瓧絎︺?/p>
濡備粖鍩轟簬flashplayer鐨凴IA鎶鏈潪甯告祦琛岋紝瑕佸紑鍙戣繖鏍風殑搴旂敤紼嬪簭灝卞厤涓嶄簡浼氱敤鍒頒笌鐢ㄦ埛浜や簰鐨刄I緇勪歡錛孉sWing姝f槸榪欐牱涓濂楀己澶х殑 緇勪歡 搴擄紝鎻愪緵浜嗗父鐢ㄧ殑鍩烘湰緇勪歡錛屽紑鍙戣呬篃鍙兘寰堝鏄撴墿灞曞嚭鑷繁鐗瑰埗鐨勭粍浠躲侫sWing鐨勭伒媧諱嬌寰楀紑鍙戣呬笉浼氳鐗瑰畾鐨勬潯浠剁害鏉燂紝浣犲彲浠ュ湪鏁翠釜欏圭洰涓畬鍏ㄤ嬌鐢? AsWing浣滀負GUI浜ゆ崲緇勪歡錛屼篃鍙互浠呮妸AsWing鐨勬煇涓涓粍浠剁敤鍦ㄤ綘鐨勯」鐩腑錛屽府鍔╀綘蹇熺殑寰楀埌鎵闇鐨刄I鐣岄潰銆?br /> AsWing鐨勫紑鍙戣呰繕鍦ㄤ笉鏂殑鏀硅繘AsWing錛屼嬌鍏舵洿寮哄ぇ錛屾槗鐢ㄣ?br /> 鏈枃浠呬粙緇嶄簡鏈鍩烘湰鐨凙sWing浣跨敤錛屽叾鏇村寮哄ぇ鐨勬ц兘姝g瓑鐫浣犳潵鍙戞帢錛岃鍙傝冨叾浠朅sWing鐩稿叧鏁欑▼銆?/p>