1
即时通讯创建一个鱼缸..所以我想要做的是我的鱼应该是无限滚动..我使用动作脚本3..This是我使用的代码..但它不是工作..如何在动作脚本中创建一个无限的滚动动画script3
var scrollSpeed:uint = 5;
//This adds two instances of the movie clip onto the stage.
//This positions the second movieclip next to the first one.
f1.x = 0;
f2.x = f1.width;
//Adds an event listener to the stage.
stage.addEventListener(Event.ENTER_FRAME, moveScroll);
//This function moves both the images to left. If the first and second
//images goes pass the left stage boundary then it gets moved to
//the other side of the stage.
function moveScroll(e:Event):void{
f1.x -= scrollSpeed;
f2.x -= scrollSpeed;
if(f1.x < +f1.width){
f1.x = f1.width;
}else if(f2.x < +f2.width){
f2.x = f2.width;
}
}
f1和f2是我的鱼实例名称
我有点困惑,你是否希望移动鱼到屏幕的另一边后,他们离开一边? – Glitcher