I have an oblect and I wanna move it continuously ( loop ) along the X axis. :*(
10x
onClipEvent (load) {
end = Stage.width + (this._width / 2)
begin = - (this._width / 2)
speed = 10
}
onClipEvent (enterFrame) {
if (this._x < end) {
this._x += speed
} else {
this._x = begin
}
}
be aware that stage width includes all of the visible flash area so in testing, if testing maximized, you’ll get different results from those given from an embedded or correctly sized movie (I always hardcode such values). That and the _width/2 thing only works if your registration point is centered.
interesting points there sen … never thought about it :cyclops:
Don’t Work.
I attach a fla file.
Make tke sky loop if you can :beam:
10x
onClipEvent (load) {
end = -1498
begin = 0
speed = -30
}
onClipEvent (enterFrame) {
if (this._x > end) {
this._x += speed
} else {
this._x = begin
}
}
Thanx a lot.
no problem :beam: