Search tutorials
1)Create a menu that you want to scroll across the screen. This menu can be buttons, pictures, or whatever you want.
0 && ymousepos1<100) {//again, change 0 and 100 to fit your MC
this._x -= carSpeed-40;// the scroll speed going right, just increase or decrease to change speed
if (this._x<=(carStartx-car._width)) {
this._x = carStartx-carSpeed;
}
}
if (ymousepos1<0 || ymousepos1>100 || xmousepos1<0 || xmousepos1>732) {// if the mouse leaves the clip it starts playing again, change 0 and 732 to the size of your menu
this._x -= carSpeed;
if (this._x<=(carStartx-car._width)) {
this._x = carStartx-carSpeed;
}
}
xmousepos2 = _xmouse;
ymousepos2 = _ymouse;
}
[/CODE]
I've commented all of the scrip that should be changed to fit your menu. It is pretty easy to follow I think. But if you have any question just contact me. I hope it helped. This menu is 2kb in an .swf compared to 22kb in Jeremy's.
This menu needs to be at least as wide as your canvas
2)Put all of these buttons/pictures/whatever and put them into a movie clip. I had pictures of cars so I called this clip car.
3)Make the car MC into another MC. Your just doing this so you can duplicate it and save file space. We'll call this car2
4)Now add this script to car2 movie clip.
[CODE]onClipEvent (load) {
car.duplicateMovieClip("car2", 10);//makes a copy of your menu to tack to the end
car2._x = car._x+car._width;
carStartx = this._x;
carSpeed = 6;// this is the speed the menu scrolls no matter what, just change this to change speed
}
onClipEvent (enterFrame) {
xmousepos1 = _xmouse;
ymousepos1 = _ymouse;
if (xmousepos1>xmousepos2 && ymousepos1>0 && ymousepos1<100) {// the o and 100 should be changed to fit your MC size
this._x -= carSpeed+30;// increase or decrease 30 to adjust scroll speed to the left
if (this._x<=(carStartx-car._width)) {
this._x = carStartx-carSpeed;
}
}
if (xmousepos1» Level Basic |
Added: 2007-04-30 Rating: 3.29 Votes: 17 |
» Author |
Michael deals with website maintainence of a large dealership in CA. Also, a dork. |
» Download |
Download the files used in this tutorial. |
Download (32 kb) |
» Forums |
More help? Search our boards for quick answers! |