Hi everyone,
I have a file that I cannot tweak a small fix for the life of me, and I know it is something relatively simple. I’ve looked at it so long, that I can no longer think! Hate those days…
Anyways, it’s in regards to a simple scrollbar moving left to right. My button seems to be sticking to my mouse on release, although I put a stopDrag on it. I think I did some of this code backward, but it still works somehow; although I can’t explain it.
In addition can someone explain what the numbers in parenthesis/minus sign are representing in the following code (in red)? I think I’m looking at this wrong, which is why I am working backward. I need a refresher here as it’s been a while since I did one of these.
[COLOR=blue][COLOR=dimgray]// have the button interact with the scrollbar button (this is on the ScrollMC)[/COLOR]
onClipEvent(enterFrame){
_root.vPosition = _root.SliderMC.ButtonSliderMC._x * [COLOR=red](800 / 390) - 200[/COLOR];
_root.ScrollMC.ScrollStripMC._x = _root.vPosition * -1;
}[/COLOR]
[COLOR=#0000ff][/COLOR]
[COLOR=blue][COLOR=dimgray]// drag the button on press (this is on a button inside ButtonSliderMC)[/COLOR]
on(press){
this.startDrag(true,195,0,0,0)
}[/COLOR]
[COLOR=blue][COLOR=dimgray]// stop dragging the button on release (this is on a button inside ButtonSliderMC)[/COLOR]
on(release){
this.stopDrag();
}[/COLOR]
I’m in somewhat of a deadline for today, so if anyone could help asap or forward a simple tutorial in AS 2.0, I would so greatly appreciate it! Thank you, and have a great day!