-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tools.as
34 lines (24 loc) · 861 Bytes
/
Tools.as
1
package { import flash.display.DisplayObject; import flash.display.MovieClip; public class Tools { public static function duplicateMovieClip(target:DisplayObject):DisplayObject { var targetClass:Class; targetClass = Object(target).constructor; var duplicado:DisplayObject = new targetClass(); duplicado.transform = target.transform; duplicado.filters = target.filters; duplicado.cacheAsBitmap = target.cacheAsBitmap; duplicado.opaqueBackground = target.opaqueBackground; target.parent.addChildAt(duplicado,target.parent.getChildIndex(target)); return duplicado; } public static function saveGame(time:uint , scene:int){ //movieClip.gotoAndStop(2); trace("se guarda el juego en "+scene); } } }