I’ve searched around for an answer to this on the forums’ archives, but to no avail
All i need to do is put a boundry for the infinite menu to stop at for the left and right.
This is my code from the tut:
[AS]
onClipEvent (load)
{
xcenter=150;
speed=1/10;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
if (_x > 0) _x=-300;
if (_x < -300) _x=0;
}
[/AS]
And if there is already a thread about boundries for the infinite menu…can you just direct me there? Thanks so, so much!
Ok, ive decided to try something a little different.
Instead of the infinite menu, im going to be using buttons to move left and right.
So, on the left will be a button that moves the MC to the left, and vice versa for the button on the right.
On the left button, i have:
[AS]
on (rollOver) {
_root.myMC.onEnterFrame = function(){
var left = 146;
var speed = 8;
if (_root.myMC._x >= left) {
this._x -= speed;
}
}
}
on (rollOut) {
delete _root.myMC.onEnterFrame
}
[/AS]
This works at getting the MC to stop at 146 on the X axis. But, when i go to apply the code to my button on the right, it wont move to right.