My website has a ring of images arranged in a loop in 3d space (thanks to a kirupa.com tutorial) and the ring’s rotation is controlled by the _ymouse value. The problem is that anywhere you go on the page, the loop keeps spinning and is ridiculously distracting.
I’d like the spinning to stop dead in its tracks when the _xmouse value is greater than 100, but I can’t get it to do so. I can stop it, but it doesn’t stop at the moment where the _xmouse value exceeds 100; it goes tricks itself into thinking _ymouse position is 0, going back to the same place every time _xmouse >100. If you want to see where I am so far, the site is www.scottgardenhire.com.
I’m still new to all this so if you have any suggestions please be thorough or alter the code for me so I can learn through a little bit of reverse engineering.
Maybe I need a listener of some sort? I don’t know. Like I said, I’m new, completely self-taught through tutorials.
Here’s the section of code dealing with the _xmouse & _ymouse controls:
[FONT=“Courier New”]panCamera = function(){
spin += this._ymouse/4000;
if (_xmouse >= 100){
spin = ([COLOR="Red"]????????[/COLOR])
}
for (var i=0; i<objectsInScene.length; i++){
objectsInScene*.display();
}
};
theScene.onEnterFrame = panCamera;
[/FONT]