Greetings
I’ll start by saying that I’m new to this forum, flash, and scripting in general. But I like it. I’m just not good yet.
I’m making a little project that has a rotating globe with objects as buttons on it. I use the mouse position to determin whether it rotates to the left or right. The problem I’d like it to slow down and speed up in relationship to how close it is to the middle of the page.
I’ve seen this effect on a lot of scolling menus or galleries, but I’ll be buggered if I can find a tut or example of one anywhere.
Here is the code i’ve got so far:
howWide = 800/2;
noButton = 1;
menu.onEnterFrame = function() {
if (noButton == 1) {
if (_xmouse<howWide) {
menu._rotation += 5;
} else {
menu._rotation -= 5;
}
}
};
menu.butCH.onRollOver = function() {
noButton = 0;
menu.textMov1.gotoAndStop(2);
};
menu.butCH.onRollOut = function() {
noButton = 1;
menu.textMov1.gotoAndStop(1);
};
menu.butB.onRollOver = function() {
noButton = 0;
menu.textMov2.gotoAndStop(3);
};
menu.butB.onRollOut = function() {
noButton = 1;
menu.textMov2.gotoAndStop(1);
};
menu.butF.onRollOver = function() {
noButton = 0;
menu.textMov3.gotoAndStop(4);
};
menu.butF.onRollOut = function() {
noButton = 1;
menu.textMov3.gotoAndStop(1);
};
menu.butT.onRollOver = function() {
noButton = 0;
menu.textMov4.gotoAndStop(5);
};
menu.butT.onRollOut = function() {
noButton = 1;
menu.textMov4.gotoAndStop(1);
};
I’ve tried a couple of ways of getting it to speed and slow (added if statements, added vars, changed the operators) but I keep missing it.
Here is a link to what I’ve got so far:
Any help is appreciated. Thanks in advance.