【问题标题】:AS2 How to Dynamically Duplicate Movieclips Until They Fill the Stage?AS2 如何动态复制影片剪辑直到它们填满舞台?
【发布时间】:2014-11-13 23:00:02
【问题描述】:

我想知道如何动态复制一个动画剪辑(运行 Tweenlite 动画),直到它填满舞台?这个想法是让雪花动画并填充屏幕(白色),并且电影剪辑基于舞台区域在随机 x 和 y 位置进入。

非常感谢!

【问题讨论】:

    标签: dynamic duplicates actionscript-2 movieclip stage


    【解决方案1】:
    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++;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-13
      • 1970-01-01
      • 1970-01-01
      • 2011-05-27
      • 1970-01-01
      • 2011-01-19
      相关资源
      最近更新 更多