March 25th, 2003, 10:53 PM
vertical panel-slider not working
here's the setup:
"panel" -- MC doing the sliding.
"script" -- MC controlling the sliding
"btn1" - "btn3" -- buttons that set where "panel" needs to be
each button has this code (targetY is different for each button):
and the MC, script, has this code:
on( release )
targetY = 1000;
script.gotoAndPlay( "move" );
frame1 - labeled "stop"
frame2 -- labeled "move"
baseRate = 5;
difference = _root.targetY - _root.panel._y;
rate = difference / baseRate;
_root.panel._y += rate;
i'm copying the code from Drag Slide Fade: Actionscript for Designers, however, it's a horizontal slider. so all the targetY's and _y's in my script are targetX's and _x's in the book. i would think it should work for vertical sliding as well. am i missing something?
gotoAndPlay( "move" );
March 26th, 2003, 10:48 AM
March 26th, 2003, 10:57 AM
nevermind, i figured it out. the MC i thought was named "script" was named "script" in the library. the instance was unnamed.
*smacks head with hand