Classpublic class CacheAsBitmapPlugin
InheritanceCacheAsBitmapPlugin Inheritance TweenPlugin Inheritance Object

[AS3/AS2 only] Forces the cacheAsBitmap property of a DisplayObject to be a certain value (true or false) during the tween and then sets it back to whatever it was before the tween was rendered for the first time. This can improve performance in certain situations, like when the DisplayObject NOT tweening its rotation, scaleX, scaleY, or similar things with its transform.matrix. See Adobe's docs for details about when it is appropriate to set cacheAsBitmap to true. Also beware that whenever a DisplayObject's cacheAsBitmap is true, it will ONLY be rendered on whole pixel values which can lead to animation that looks "choppy" at slow speeds.

For example, if you want to set cacheAsBitmap to true while the tween is running, do:, 1, {x:100, cacheAsBitmap:true});


import com.greensock.TweenLite; 
import com.greensock.plugins.TweenPlugin; 
import com.greensock.plugins.CacheAsBitmapPlugin; 
TweenPlugin.activate([CacheAsBitmapPlugin]); //activation is permanent in the SWF, so this line only needs to be run once., 1, {x:100, cacheAsBitmap:true}); 

Copyright 2008-2013, GreenSock. All rights reserved. This work is subject to the terms in or for Club GreenSock members, the software agreement that was issued with the membership.

Public Methods
 MethodDefined By
[static] Activates one or more plugins so that TweenLite and TweenMax recognize the associated special properties.