2012年12月19日

Flash Player 10提供的一个新的绘图 API

摘要: Flash Player 10提供的一个新的绘图 API,使用它可获得更好的代码执行的性能。此新的API不提供呈现性能的改进,但是可以大大减少必须编写的代码的行数。代码行越少,ActionScript的执行性能越好。包括以下方法:• drawPath()例如:import flash.display.Shape;var aa:Shape = new Shape(); aa.graphics.beginFill(0x34ff89); var aaVec:Vector.<int> = Vector.<int>([1,2,2,2,2]); var bbVec:Vector.& 阅读全文

posted @ 2012-12-19 14:24 笔墨丹青 阅读(254) 评论(0) 推荐(0)

多个事件用swith循环写方法体

摘要: mc.addEventListener(MouseEvent.MOUSE_OVER, changeBg);mc.addEventListener(MouseEvent.MOUSE_OUT, changeBg);function changeBg(e:MouseEvent):void{switch (e.type)//type我当前所触发的事件类型{case MouseEvent.MOUSE_OVER :mc.gotoAndStop(2);break;case MouseEvent.MOUSE_OUT :mc.gotoAndStop(1);break;}} 阅读全文

posted @ 2012-12-19 13:54 笔墨丹青 阅读(187) 评论(0) 推荐(0)

导航