A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: button animation on mouseover and mouse out?

  1. #1
    Senior Member vatu_leviathan's Avatar
    Join Date
    Sep 2001
    Location
    England
    Posts
    458

    button animation on mouseover and mouse out?

    hi, i have a simple animation on my button when the mouse rolls over it and i want it to play in reverse when the user takes the mouse away from the button.
    how can i do this, im sure it must be quite easy?

    thx muchly
    lev
    My story begins in nineteen-dickety-two.We had to say 'dickety' cause the kaiser had stolen our word for twenty.I chased the rascal to get it back but gave up after dickety-six miles.

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Butons can not sidplay animation on rollOut.

    You have to make a movieclip with your animations and then control what it should play with some actions ON the movieclip.

    onClipEvent(load){
    // Play normal animation
    this.onRollOver=function(){
    gotoAndPlay(2);
    }
    // Play the backward animation
    this.onRollOut=function(){
    gotoAndPlay(21);
    }
    }

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center