A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How to make a movie clip get bigger and smaller on rollover?

  1. #1
    banned by dp
    Join Date
    Jun 2002
    Posts
    245
    I know I've done this before, but could you help me?

    I'm trying to roll over a movie clip (button), and have it dynamically increase it's scale, with friction.

    What is the code for this?

    Also, on roll out, I want it to reverse and go back to it's original position.

    Thanks so much.

  2. #2
    in root
    function scale(who, scale){
    eval(who)._xscale+=scale
    eval(who)._yscale+=scale
    }

    in the buttons
    on(mouseOver){
    _root.scale(this._name, 20) //120%
    }
    on(rollOut){
    root.scale(this._name, -20) //returns to 100%
    }

    This is very basic, could be much better, but take it at starting point

    Good luck
    Jorge

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