天生我才必有用

Flash & Facebook

Posted in Flex, Flash & AS    作者:Ray    2009年三月31日

随着Facebook的越来越流行,Adobe也不甘寂寞,何Facebook玩起了同盟,让Actionscript支持Facebook的开发API。可访问此网址获得更多相关信息。国外的很多网站都在使用都在使用Facebook Connect来实现自己网站和Facebook的之间的无缝连接。

不过感觉最困扰中国用户的还是两个问题:

  1. 过多的简化的山寨版的Facebook,很多根本不具有开发很多根本不具有开发API
  2. Facebook的网速真的不敢恭维,感觉在这方面Google比它强多了,看来要解决这个问题只能等facebook中国分公司的成立了。速度慢必然造成很多Javascript程序的加载失败,有时就不知道是自己程序错误还是网速的问题,同时调试简直就是一场噩梦。

Core Display Classes Illustration in Flash CS3

Posted in Flex, Flash & AS    作者:Ray    2008年四月8日

插图为Flash CS3 的核心Display 类的继承关系的图。

  • DisplayObject: At the top of the hierarchy, this class provides the basic properties for all visual items in the display list, such as x, y, width, and height. Everything in the display list is an instance of one of the classes that extends the DisplayObject class, either directly or indirectly.
  • InteractiveObject: This class adds various properties, methods, and events that allow users to interact with display objects using the mouse and keyboard. You’ll learn more about events and how to allow users to interact with display objects.
  • DisplayObjectContainer: This class gives display objects the ability to contain other display objects, which can be manipulated using methods like addChild() and removeChild(). Other display list classes allow a specific number of child display objects. A good example is SimpleButton, which allows you to specify a different display object for each of the button states, but only DisplayObjectContainer instances allow you to have an open-ended number of child display objects.
  • Sprite: This is a new type of object available with ActionScript 3.0, and there is no equivalent in the IDE. Basically, it is like a movie clip without a timeline, so it doesn’t contain any of the timeline controlling ActionScript necessary with MovieClip instances. You can still draw into it, add new display objects to it, and code for interactivity, but it is lighter weight in memory than a movie clip. It is the best bet if you are programmatically creating interactive graphics in your applications.
  • MovieClip: This class adds the concept of frames, frame labels, and scenes, with all the properties and methods you need to query and manipulate the playhead. Note that while you can create MovieClip objects programmatically, you cannot add frames, labels, or scenes with ActionScript code.

以上说明摘录至【Foundation ActionScript 3.0 with Flash CS3 and Flex】

标签: ,

ActionScript 3.0 基础数据类型

Posted in Flex, Flash & AS    作者:Ray    2008年四月8日

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#.

标签: