Hello, everyone. I have had great success in finding help here in the past, so I am hoping that you all can find it in yourselves to assist me once more.
You can see the .swf of what I have created here at http://web.omnidrive.com/APIServer/public/ZJGPV2IVBnIsEGypToSDo1dt/variclock.swf. The idea is that the user can change the speed of the simulation clock at any time using the slider. I noticed while building this, that this thing worked until I tried making it so that the user could change the speed at any time (this is a necessary part of the design). The relevant part of the code is as follows:
var time_intervalID:Number;
var stime_intervalID:Number;
var time_interval:Number;
var stime_interval:Number;
function clockUpdate() {
time_interval = 3600+(1000/60)-_root.slider_mc.slider_value;
stime_interval = 1000-_root.slider_mc.slider_value;
if (stime_interval < 0) {
stime_interval = 0;
}
clearInterval(time_intervalID);
clearInterval(stime_intervalID);
time_intervalID = setInterval(_root.timeUpdate,time_interval);
stime_intervalID = setInterval(_root.stimeUpdate,stime_interval);
runtime_intervalID = setInterval(_root.runtimeUpdate,0);
}
setInterval(clockUpdate,0);
I have also attached the .fla to this post.
I need help with three things. First of all, I need to get the clocks working correctly. Secondly, I would really like it if the user could type in a number and the slider would adjust accordingly (I played with this a lot trying to get it to work, but I never found a solution). Lastly, ANY criticism that you can give me as far as my programming in AS is concerned would be greatly appreciated as I am new to doing much of anything beyond playhead control.
Thanks!