#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    44
    Rep Power
    12

    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. #2
  3. No Profile Picture
    flash junkie
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    CO, USA
    Posts
    172
    Rep Power
    12
    what's happening to it?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    44
    Rep Power
    12
    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!

IMN logo majestic logo threadwatch logo seochat tools logo