rollOver rollOut and movement animation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • opticrambler
    New Member
    • Nov 2007
    • 1

    rollOver rollOut and movement animation

    hi this proberly quite an easy proberlm but cant find any help so ill try this forum.
    i have a simple button wihch fades in and out of colour with rollOver and rollOut.
    im trying to make button move with on(release) but when ever it moves it comes back due to rollOut taking control.

    on(rollOver){
    gotoAndPlay("go 2")
    }
    on(rollOut){
    gotoAndPlay("go 3")
    }
    on (release) {
    gotoAndPlay("go 1");
    }

    so what i think is if "go1" playing it needs to stop "go3" from playing
    any help would be awsome
  • rsdev
    New Member
    • Jul 2007
    • 149

    #2
    Originally posted by opticrambler
    hi this proberly quite an easy proberlm but cant find any help so ill try this forum.
    i have a simple button wihch fades in and out of colour with rollOver and rollOut.
    im trying to make button move with on(release) but when ever it moves it comes back due to rollOut taking control.

    on(rollOver){
    gotoAndPlay("go 2")
    }
    on(rollOut){
    gotoAndPlay("go 3")
    }
    on (release) {
    gotoAndPlay("go 1");
    }

    so what i think is if "go1" playing it needs to stop "go3" from playing
    any help would be awsome
    It was difficult to understand your question.

    I think you're saying that when you release and then rollout you don't want to go3?!

    So;

    Code:
    this.selected = false;
    on(rollOver){
    if(!this.selected)
    gotoAndPlay("go2")
    }
    on(rollOut){
    if(!this.selected)
    gotoAndPlay("go3")
    }
    on (release) {
    this.selected = true;
    gotoAndPlay("go1");
    }

    Comment

    Working...