code on 2008-12-23 import net.hires.debug.Stats; keiso forked:6favorite:4lines:41license : All rights reserved modified : 2008-12-26 19:12:48 Embed Tweet package{ import flash.display.MovieClip; import caurina.transitions.*; // import net.hires.debug.Stats; [SWF(width="465", height="465",backgroundColor="#efefef",frameRate="60")] public class Xyz extends MovieClip{ public var mc:MovieClip; public var mcArray:Array=new Array(); public var num:uint = 100; public function Xyz(){ for(var i:uint = 0;i< num;i++){ mc = new MovieClip(); mc.graphics.beginFill(Math.random() * 0xFFFFFF); mc.graphics.drawRect(0,0,18,32); this.addChild(mc); mcArray.push(mc); } for(var j:uint = 0;j< num;j++){ var targetMc:MovieClip = mcArray[j]; targetMc.x = Math.random()*stage.stageWidth; targetMc.y = Math.random()*stage.stageHeight; targetMc.rotation = Math.random()*360; } // addChild( new Stats() ); update(); } public function update():void { for(var i:uint = 0;i< num;i++){ var targetMc:MovieClip = mcArray[i]; if(!Tweener.isTweening(targetMc)){ Tweener.addTween(targetMc, { x:Math.random()*stage.stageWidth, y:Math.random()*stage.stageHeight, time:Math.random() *5+1, rotation:Math.random()*360, delay:Math.random()*2+1, onComplete:update, transition:"easeOutBounce"}); } } } } } Code Fullscreen Preview Fullscreen pippo Angelo : pozadie anim turipat : animation chimanaco : animationMovieClip MovieClip animation rotation Tweener.isTweening MovieClip addChild Math.random Tweener.addTween time push uint Array sort new page view favorite forked pv218 forked from: code on 2008-12-2.. kumaaa forked:0 favorite:1lines:43 (diff:3) pv0 forked from: code on 2008-12-2.. pippo forked:0 favorite:0lines:41 (diff:1) pv412 forked from: code on 2008-12-2.. pippo forked:0 favorite:0lines:42 (diff:39) pv388 forked from: code on 2008-12-2.. ham forked:0 favorite:0lines:41 (diff:3) pv769 forked from: code on 2008-12-2.. keiso forked:2 favorite:0lines:41 (diff:5) pv852 forked from: code on 2008-12-2.. yd_niku forked:1 favorite:1lines:46 (diff:27)