在我的 Background.as 中,我有以下代码可以使背景滚动:
package{
//Defining the class
import flash.display.MovieClip;
import flash.events.Event;
public class Background extends MovieClip{
function Background()
{
//Executes the enterFrame function
addEventListener("enterFrame", enterFrame);
}
function enterFrame(e:Event)
{
this.x -= 1;
}
}
}
背景是一个带有 AS Linkage 的 Moveclip 设置为Background
。我想知道如何将背景重置回它在我的函数中的起始位置Main.as