Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7807195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:46:37+00:00 2026-06-02T02:46:37+00:00

I am trying to give my buttons a bounce in effect using the tween

  • 0

I am trying to give my “buttons” a bounce in effect using the tween class. I am also trying to make my code more efficent by using a function to handle this effect for all my buttons.

var MusicClip:MovieClip  = new music_mc();
var MoviesClip:MovieClip  = new movie_mc();
var GameClip:MovieClip  = new game_mc();

MusicClip.y = 63;
MusicClip.x = 577;
MoviesClip.y = 87;
MoviesClip.x = 401;
GameClip.y = 75;
GameClip.x = 151;

addChild(MusicClip);
addChild(MoviesClip);
addChild(GameClip);

This is where I am having a hard time. I thought I had to tween both the
scaleX and scaleY for all three MovieClips, but the button just appears on the
stage and doesn’t animate in. Also if I can put this code in a function so I
don’t have to write it for every button (and future buttons) that would be great.

var scaleTween:Tween=new Tween(MusicClip,"scaleX",Elastic.easeOut,0,1,1,true);
var scale2Tween:Tween=new Tween(MusicClip,"scaleY",Elastic.easeOut,0,1,1,true);

I am not getting any error but there is no bouncing in effect.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:46:39+00:00Added an answer on June 2, 2026 at 2:46 am

    You need to assign listeners to your MovieClips that will perform an action when you do something. You can use a single event handler for all of your MovieClips:

    MusicClip.addEventListener(MouseEvent.MOUSE_OVER,bounceButton);
    MusicClip.addEventListener(MouseEvent.MOUSE_OVER,bounceButton);
    MoviesClip.addEventListener(MouseEvent.MOUSE_OVER,bounceButton);
    
    function bounceButton(event:MouseEvent):void
    {
        var scaleTween:Tween=new Tween(event.target,"scaleX",Elastic.easeOut,0,1,1,true);
        var scale2Tween:Tween=new Tween(event.target,"scaleY",Elastic.easeOut,0,1,1,true);
    }
    

    Note that rather than specifying any one MovieClip as the tween target, you are using event.target, which will refer to the MovieClip you have rolled over.

    On an unrelated note, it is good practise to start instance names with a lower case letter. This helps to distinguish them from class names which by convention have uppercase letters to start each word:

    var myVariable:MyClass;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to give a rounded corners effect to the buttons on my
I am trying to give the effect of general headings in this table and
Using JQuery I am trying to perform validation and also get the values of
Hi I'm trying to generate my websites navigation/page buttons and give the active page
I'm trying to make a tab bar in android using a RelativeLayout and a
I'm trying to give my plugin callback functionality, and I'd like for it to
I am trying to give my form a view script decorator like so: public
I'm trying to give a custom background to my spinner. I've downloaded the HTC
I am trying to give float point into core-plot y axis value, it is
I haven't used Visual Studio since VB 3 and am trying to give it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.