标签:
这一节主要是针对上一节的补充,关于地图的优化策略上一节中已经涉及了一些,这一节具体说下。
public function set thumbnail(bmd:BitmapData) : void { if (thumbnailData == bmd) return; thumbnailData = bmd; g.clear(); g.beginBitmapFill(thumbnailData, scaleMatrix); g.drawRect(0, 0, viewPort.maxRect.width, viewPort.maxRect.height); }
还有两个问题:
private function gcByException():void { try { new LocalConnection().connect("foo"); new LocalConnection().connect("foo"); } catch (e:Error) { } return; }
2.震屏的实现(TweenMax实现):
public static function shake(target:DisplayObject, distance:int = 10, delay:Number = 0.5): void { var targetX:* = target.x; var targetY:* = target.y; var shakeDis:* = distance; TweenMax.killTweensOf(target); TweenMax.to(target, delay, {bezierThrough:[{x:targetX, y:targetY + distance}, {x:targetX, y:targetY - distance}, {x:targetX, y:targetY + distance/4}, {x:targetX, y:targetY - distance/4},{x:targetX, y:targetY}]}); return; }
标签:
原文地址:http://www.cnblogs.com/Siegel/p/5977678.html