New to Actionscript, help with movie clips!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SR90
    New Member
    • May 2007
    • 2

    New to Actionscript, help with movie clips!

    I'm trying to do this automatic scroll box, with an "up" and "down" arrow. The scroll box will have boxes lined up on top of each other moving continuously throug the scroll area. I need help implementing the "up" and "down" arrows. What i want is when a user mouses over the "up" button the boxes will start scrolling upwards, and vice versa for "down". So far i have this:

    onClipEvent(loa d){

    lastbox = getProperty(_ro ot.Box12, _y) //position of last box
    }

    onClipEvent(ent erFrame){
    setProperty(_ro ot.Box12, _y , _y+2 ); //increments position by 2.

    if(_y >= lastbox){
    setProperty(_pa rent.Box12, _y, (getProperty (_parent.Box1, _y)- getProperty(_pa rent.Box1, _height)); // moves box12 back to the beginning of the list of boxes, ie. on top of box 1.

    }
    }

    So i have the boxes continuously scrolling nicely, but i have no idea how to implement the "up" and "down" arrows. Anyone know how? I assume you create a new button and do something like:

    //for UP
    on(rollOver){
    //execute up button code
    }
  • nomad
    Recognized Expert Contributor
    • Mar 2007
    • 664

    #2
    Originally posted by SR90
    I'm trying to do this automatic scroll box, with an "up" and "down" arrow. The scroll box will have boxes lined up on top of each other moving continuously throug the scroll area. I need help implementing the "up" and "down" arrows. What i want is when a user mouses over the "up" button the boxes will start scrolling upwards, and vice versa for "down". So far i have this:

    onClipEvent(loa d){

    lastbox = getProperty(_ro ot.Box12, _y) //position of last box
    }

    onClipEvent(ent erFrame){
    setProperty(_ro ot.Box12, _y , _y+2 ); //increments position by 2.

    if(_y >= lastbox){
    setProperty(_pa rent.Box12, _y, (getProperty (_parent.Box1, _y)- getProperty(_pa rent.Box1, _height)); // moves box12 back to the beginning of the list of boxes, ie. on top of box 1.

    }
    }

    So i have the boxes continuously scrolling nicely, but i have no idea how to implement the "up" and "down" arrows. Anyone know how? I assume you create a new button and do something like:

    //for UP
    on(rollOver){
    //execute up button code
    }
    You might be able to do it with tween and using actions layer with stop();
    if that doesn't work I there's always the Components panel and use textArea and set if or scrollable

    nomad

    Comment

    Working...