2013年5月31日

摘要: Sprite居然没有removeAllChildren(),removeAllListeners()这样的方法,这让多少程序内存泄露。后来的starling明显人性化了removeChildren(beginIndex:int = 0, endIndex:int = -1, dispose:Boolean = false):voidRemoves a range of children from the container (endIndex included).removeEventListeners(type:String = null):voidRemoves all event lis 阅读全文
posted @ 2013-05-31 00:54 苍蝇也是鸟 阅读(228) 评论(0) 推荐(0)
摘要: 之前做项目的时候,需要同时拖拽两个以上的Sprite对象。相当郁闷的是拖拽第二个sprite,或者调用任何一个sprite的stopDrag方法,第一个sprite就失效了。作为Sprite对象的方法,这显然不合适,adobe官方API也没有说明。后来自己写了个DragManager,代码如下 1 package com.cong.managers 2 { 3 import flash.display.Stage; 4 import flash.display.DisplayObjectContainer; 5 import flash.utils.Dicti... 阅读全文
posted @ 2013-05-31 00:14 苍蝇也是鸟 阅读(331) 评论(0) 推荐(0)

导航