hey there
i’m trying to move two MC’s left and right incremently with the following AS, it really seems like it should work…
[AS]
// onEnterFrame capture the _x position of theBackGround and cloudMC
this.onEnterFrame= function (){
var currentBgPosX = this.theBackGround._x;
var currentCloudPosX = this.cloudMC._x;
// then increment them and set new position variables
var LHBgPosX = currentBgPosX - 66;
var RHBgPosX = currentBgPosX + 66;
var LHCloudPosX = currentCloudPosX - 33;
var RHCloudPosX = currentCloudPosX + 33;
}
// enter new position variables into functions
function bgSlideLeft(){
theBackGround.slideTo(LHBgPosX , 0, 1.5,“linear”);
}
function bgSlideRight(){
theBackGround.slideTo(RHBgPosX, 0, 1.5,“linear”);
}
function cloudSlideLeft(){
cloudMC.slideTo(LHCloudPosX, 0, 1.5,“linear”);
}
function cloudSlideRight(){
cloudMC.slideTo(RHCloudPosX, 0, 1.5,“linear”);
}[/AS]
Thanks
Cam