AS2如何动态复制动画片段,直到它们填满舞台?(AS2 How to Dynamically Duplicate Movieclips Until They Fill the Stage?)
我想知道如何动态复制一个动画片段(运行Tweenlite动画),直到它填满舞台? 这个想法是让雪花在屏幕上生成动画并填满屏幕(白色),并且动画片段基于舞台区域以随机的x和y位置进入。
非常感谢!
I am wondering how I would go about dynamically duplicating a movieclip (that runs a Tweenlite animation), until it fills the stage? The idea is to have snowflakes animate in and fill the screen (white-out) and that the movieclips are coming in at random x and y positions based on a stage area.
Thanks so much!
最满意答案
var i = 0; attachMovie("a_snowFlake_mc","a",this.getNextHighestDepth()); //AS linkage reference onEnterFrame = function(){ duplicateMovieClip("a","ac"+i,this.getNextHighestDepth()); _root["ac"+i]._x = Math.random()*Stage.height; _root["ac"+i]._y = Math.random()*Stage.width; i++; } var i = 0; attachMovie("a_snowFlake_mc","a",this.getNextHighestDepth()); //AS linkage reference onEnterFrame = function(){ duplicateMovieClip("a","ac"+i,this.getNextHighestDepth()); _root["ac"+i]._x = Math.random()*Stage.height; _root["ac"+i]._y = Math.random()*Stage.width; i++; }更多推荐
发布评论