|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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): Code:
on( release )
{
targetY = 1000;
script.gotoAndPlay( "move" );
}
and the MC, script, has this code: frame1 - labeled "stop" Code:
stop(); baseRate = 5; frame2 -- labeled "move" Code:
difference = _root.targetY - _root.panel._y; rate = difference / baseRate; _root.panel._y += rate; frame3 Code:
gotoAndPlay( "move" ); 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? |
|
#2
|
|||
|
|||
|
what's happening to it?
|
|
#3
|
|||
|
|||
|
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 DUH! |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > vertical panel-slider not working |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|