A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: button sticking

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    996

    button sticking

    Can anyone tell me why this is happening?
    I have two buttons which are a movieClip inside the MC is a white background, which scales up in height from 0% to to 100% when the user rolls over a invisible button outside the MC then when the user rolls out it scales back down again. This is done with a teen. It is triggered with an invisible button over the mc and the code is.

    Code:
    on (rollOver) {
    	if (!home_btn.anim) {
    		home_btn.gotoAndPlay("in");
    	}
    }
    on (rollOut) {
    	home_btn.gotoAndPlay("out");
    }

    But sometimes it gets stuck when you roll out if you play around with it too much it will happen. Can someone please take a look.
    Thanks.
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Posts
    996
    Anyone please this is so frustrating.
    Thanks,

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Don't use an invisible button, but a hitTest on the movie clip...

    I've posted many examples of this...

    Try this one...

    Use the code on the right button movie clip.

    If you can't get it working, either attach your .fla (Mx only format and zipped up) or e-mail it to me. I'll set it up for you.
    Last edited by oldnewbie; 12-02-2004 at 12:55 PM.

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Posts
    996
    That's so cool I never though of it that way very smart thinking. Thank you so much.

  5. #5
    Senior Member
    Join Date
    Apr 2001
    Posts
    996
    Ah I have a question I wanted it to look like this
    http://www.pgiinteractive.com/flash_launch.html
    If you click on lets say air and let it load you will see a menuThis is what i'm after when one is scaling up the other is scaling back down at a slower rate.

    With the way you have it it scales back down at the same tween length as it scaled up at because it is going backwards.

  6. #6
    Senior Member
    Join Date
    Apr 2001
    Posts
    996
    I haven even tried it where I just have a little background behind the button and scale it up with script and scale down with script(see code below) but I still can't get the effect that this site is getting
    http://www.pgiinteractive.com/flash_launch.html
    If you click on the button AIR
    and wait for it to load it will load a menu system that when you rollover it scales up and roll off scales down but if you do it fast through all the buttons it gives a nice tracer effect.
    How are they doing this. Your help would be greatly appreciated.

    Code:
    function scaleUp() {
    	this._yscale += (100-this._yscale)/3;
    	if (this._yscale>=100) {
    		delete this.onEnterFrame;
    	}
    }
    
    function scaleDown() {
    	this._yscale += (0-this._yscale)/8;
    	if (Math.abs(0-this._yscale)<0.2) {
    		delete this.onEnterFrame;
    	}
    }

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