http://code.google.com/p/mate-framework/
Flex Mate which you can find on the google code.
http://code.google.com/p/mate-framework/
Flex Mate which you can find on the google code.
Protocol buffers are a flexible, efficient, automated mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages. You can even update your data structure without breaking deployed programs that are compiled against the “old” format.
http://code.google.com/apis/protocolbuffers/docs/overview.html
Mate(发音“mah-the” 就像latte)在Flex社区中正在受到大量关注。Mate是由AsFusion创建的基于标签的Flex框架。尽管Mate在AsFusion内部已经使用了很长一段时间,但其Alpha版的发布却是刚刚不久的事情。
Mate这个Flex框架利用基于标签的MXML语言提供了一个定义Flex应用程序如何处理事件的映射。它解决了开发人员创建Flex应用是所碰到的大量常见问题,如从外部服务中检索数据、处理业务逻辑。
Last fall, the working group responsible for designing the next version of ECMAScript released an overview of proposed features for ECMAScript 4. ActionScript is based on ECMAScript, so the hypothetical ActionScript 4.0 will undoubtedly support some, if not all, of the proposed features.
In February and April (in Amsterdam and Toronto, respectively), I’ll be doing a lecture at FITC covering the ECMAScript 4 features that will theoretically be added to ActionScript 4.0.
Read my FITC lecture notes here:(这个很值得关注一下)
>> http://moock.org/lectures/newInECMAScript4/
Get information about FITC here:
>> http://www.fitc.ca/
In AS2 there were three mouse events that I used quite often. onDragOver was thrown when the mouse button is selected and the cursor was moved over a MovieClip. This was useful to detect if another object was being dragged over a given clip. onDragOut was the opposite, this event was thrown when the mouse button was selected and the cursor was dragged outside of a given clip. And lastly, onReleaseOutside was thrown when a clip was pressed and the user dragged off the clip before releasing the mouse button. Releasing the mouse outside is a common way for a user to bail out of selecting a button among other reasons.
If you look through the AS3 documentation you will notice there are no MouseEvent.DRAG_OVER, MouseEvent.DRAG_OUT, or MouseEvent.RELEASE_OUTSIDE events. This does not mean that this functionality is not available, it’s just not as obvious. The following code shows how to recreate this functionality in AS3.
var button:Sprite = new Sprite();
button.graphics.beginFill(0×000000, 1);
button.graphics.drawRect(50,50,200,100);
addChild(button);
button.buttonMode = true;
button.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress);
button.addEventListener(MouseEvent.MOUSE_UP, buttonRelease);
button.addEventListener(MouseEvent.MOUSE_OVER, buttonOver);
button.addEventListener(MouseEvent.MOUSE_OUT, buttonOut);
function buttonPress(e:MouseEvent):void {
//the button is pressed, set a MOUSE_UP event on the button’s parent stage
//to caputre the onReleaseOutside event.
button.parent.stage.addEventListener(MouseEvent.MOUSE_UP, buttonRelease);
}
function buttonRelease(e:MouseEvent):void {
//remove the parent stage event listener
button.parent.stage.removeEventListener(MouseEvent.MOUSE_UP, buttonRelease);
//if the events currentTarget doesn’t equal the button we
//know the mouse was released outside.
if (e.currentTarget != button) {
trace(’onReleasedOutside’);
} else {
//the events currentTarget property equals the button instance therefore
//the mouse was released over the button.
trace(’onRelease’);
}
}
function buttonOver(e:MouseEvent):void {
if (e.buttonDown) {
//if the mouse button is selected when the cursor is
//over our button trigger the onDragOver functionality
trace(’onDragOver’);
} else {
//if the mouse button isn’t selected trigger the standard
//onRollOver functionality
trace(’onRollOver’);
}
}
function buttonOut(e:MouseEvent):void {
if (e.buttonDown) {
//if the mouse button is selected when the cursor is
//moves off of our button trigger the onDragOut functionality
trace(’onDragOut’);
} else {
//if the mouse button isn’t selected trigger the standard
//onRollOut functionality
trace(’onRollOut’);
}
}
So let me explain what is going on here.
To recreate the onDragOver and onDragOut functionality we use the buttonDown property of the MouseEvent. The buttonDown property is a Boolean value that indicates if the users mouse button is selected when the event was triggered. If this property is true we know the user is dragging over or dragging out of the button. If the buttonDown property is false we can trigger our standard rollOver or rollOut functionality.
Recreating the onReleaseOutside functionality is a trickier multi-step process. First we must set up a MouseEvent.MOUSE_DOWN event listener on the button. Secondly we set up a MouseEvent.MOUSE_UP event listener on the same button. Third, in the MouseEvent.MOUSE_DOWN event handler we set up another MouseEvent.MOUSE_UP event listener on the button’s stage that triggers the same event handler as the MouseEvent.MOUSE_UP event handler (buttonRelease) that is set on the button. And lastly we check the currentTarget property of the event passed into the MouseEvent.MOUSE_DOWN event handler to see if it equals the button or the button’s parent stage. If the currentTarget equals the button we know the mouse button was released over the button and we can trigger the onRelease functionality. If the currentTarget property isn’t the button we can assume the user released the mouse button outside of the button. Each situation is different, button.parent.stage may not work in your application, you may have to traverse up the display list, possibly right down to the root child (the Stage) to succesfully detect the onReleaseOutside event. Below I have updated the buttonDown method to show a simple way of traversing up the display list as far as you can go and setting the MouseEvent.MOUSE_UP on the root child.
function buttonPress(e:MouseEvent):void {
//the button is pressed, set a MOUSE_UP event on the root child in the display list
//to caputre the onReleaseOutside event.
var rootChild:DisplayObject = button;
while (rootChild.parent != null) {
rootChild = rootChild.parent;
}
rootChild.stage.addEventListener(MouseEvent.MOUSE_UP, buttonRelease);
}
Enjoy!
Clicky is a pretty damn cool site. 它的功能比Google analytic还要丰富,利用该API可以直接查询到访问者物理地址——提供访问者位置的经纬度,欧美和部分国内地址该经纬度更可以精确到街道角落, fucking cool,最重要的是开放了API接口,爽快。我牺牲了大量业余时间,总算实现了该API接口的全部功能。
Source:
下载文件 (已下载 2 次)
Online API Doc: http://www.moorwind.com/clicky/asdoc-output/index.html
Test sample: http://www.moorwind.com/clicky/AirClick.html
Test sample Source: http://www.moorwind.com/clicky/srcview/index.html
Another sample: http://www.moorwind.com/clicky/AirClick_flex.swf
/*=====================================================================
* CopyRight(c)2008, Clicky.com. All rights reserved.
* Code licensed under the BSD License
* Author: Qizhi Zhang, Email: ezhung@gmail.com, Blog: http://www.moorwind.com/
*=====================================================================*/
Adobe将开源给Mozilla Tamarin project 一个新的虚拟机,名字叫做QVM,主要是能在移动平台上实现目前AVM2所实现的功能,支持AS3.而QVM将会部署在Flash Lite 4中。呵呵,很是期待啊,不过就目前国内的Flash Lite的发展来看,还是谨慎的乐观,虽然Flash Lite3已经发布,但是国内的Flash Lite开发大部分还是停留在1.1阶段,这和现在移动设备的Flash Lite的内置情况有关,还有就是受移动网络服务商的限制,现在国内市场的Flash Lite 很不景气,所以即使Flash Lite 4现在发布了,对于国内的开发者而言也只能是满足一下自己的欲望而已。如果真的想结结实实的开发,还是要有个好的市场环境来推动。
原文如下:
Great news!! coming from Adobe for contributing a new virtual machine to the open source Mozilla Tamarin project. This new VM - internally called QVM - known to the outside world as Tamarin-Tracing essentially brings the power of AVM2 (ActionScript 3.0/ECMAScript 4) to mobile devices. Continue reading »
gotoAndLearn()站点的第二版已经上线。这个站点是通过视频的方式来教大家flash相关的开发。很不错的说。
I have finally released version 2 of gotoAndLearn(). The site has changed considerably since the last version. The main page consists of a sortable list of all of the tutorials. You can play them in the browser or download the FLV files to watch them offline. There are still a lot things to be worked on but it is good enough to start using.
In addition to the launch of the site there are also 2 new tutorials up there. The first shows you how to use the Tweener AS3 library and the second deals with ActionScript 3 video basics. Enjoy them!
你可以给你的客户看看这里面的案例,来说服的你的客户选择Flex http://flex.org/showcase/