please review: controlling mc speed with user input
I've got the forward and rewind of the movieclip working but the thing is i want the user to be able to change the speed in which they are going.... So i used a input field but i'm not sure as to how to incooperate that into my script. Can someone please help me to review my code? I'm very sorry for the slightly big file size but please do help coz i'm doing my final school project. thanx in advance :)
please review fla. file
anyway, if you don't want to downlaod the file... here's my script
input is the input text field
myMC1 is the movieclip that i'm controlling
i put the script in frame 1
speed = input;
speed = 2;
myMC1.onEnterFrame=function () {
mousePos = _root._ymouse;
cfrm = _root.myMC1._currentframe;
if (mousePos<150) {
_root.myMC1.gotoAndStop(cfrm+speed);
} else if (mousePos>150) {
_root.myMC1.gotoAndStop(cfrm-speed);
}
updateAfterEvent;
}