21 Replies Latest reply on May 15, 2009 7:19 AM by Stephen Hardy

    Newbie - Growing and Shrinking Buttons in Flash CS4 (AS3)

    Stephen Hardy

      Hi there,


      I have been using Flash for a number of years now, lets just say, my understanding of ActionScript has always been remedial at best. However, I was always able to edit and change bits of code I found on the net to work for my sites to give them a nice look and feel, whilst simply dropping images in from Photoshop.


      However, since the change to AS3 I have been unable to do one of my favourite things, which is quite adaptable, which is to grow/move a button on rollover, and on mouse roll out, the button/movie clips reverses. This is quite simple, but I wont it to sense where the rollout ocurrs and 'shrink' the movie from that point. Please see below for website examples (Not Mine):









      In AS2 the folowing code was used:


      on(rollOver) {
      this.tab1grow = true;
      if(this.tab1shrink==true) {
        this.tab1shrink = false;
      else this.gotoAndPlay(2)

      on(rollOut) {
      this.tab1shrink = true;
      if(this.tab1grow==true) {
        this.tab1grow = false;


      I'm hoping I explained this correctly, as it seems I need to know the answer half the time in order to do a search with any useful results.


      Can anyone help?