Hey peeps, bare with me im not great at actionscript ok. The thumbs scroll fine but they scroll way too fast! which makes them difficult to click on. Heres the code im using and i hope ye can help. Thanks in advance.
_root.onEnterFrame = function(){
if(_root._ymouse<210){
myVar=false;}{
if(_root._ymouse>209)
myVar=true;
}
if(_root._xmouse<350 and myVar==true){
imgBar.prevFrame();
imgBar.prevFrame();
}
else{
imgBar.play();
}
if(_root._xmouse>550 and myVar==true){
imgBar.nextFrame();
}
else{
imgBar.play();
}
}
yup there is not much code but if it is on enterframe it would be crazy fast
[quote=fasilak;2337005]In your code… you have called prevFrame() two times
To further achieve ur functionality why dont you try using the setInterval instead of onEnterFrame.
For more details on setInterval visit:
http://www.oman3d.com/tutorials/flash/setinterval/
If somehow you want this code…
add a counter…
Check the code below:
var counter:Number = 0;
var wait_count:Number = 50;
_root.onEnterFrame = function() {
if (counter != wait_count) {
counter++;
return;
} else {
counter = 0;
}
if (_root._ymouse<210) {
myVar = false;
}
if (_root._ymouse>209) {
myVar = true;
}
if (_root._xmouse<350 and myVar == true) {
imgBar.prevFrame();
imgBar.prevFrame();
} else {
imgBar.play();
}
if (_root._xmouse>550 and myVar == true) {
imgBar.nextFrame();
} else {
imgBar.play();
}
};
Note: this is not the right way to do it… The best method i would prefer is the setInterval.[/quote]
Thanks very much fasilak for your help. I tried the code you wrote but when i use it theres no mouse control, the thumbs scroll and stop now and then. I guess il have to try and figure out the setInterval method.