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

  • Home
  • SEARCH
  • 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 6005471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:24:06+00:00 2026-05-23T01:24:06+00:00

I am doing actionscript 3 at the moment and was wondering if it was

  • 0

I am doing actionscript 3 at the moment and was wondering if it was possible to remove and eventListner temporarily. I know of removeEventListener, however, that removes the eventListener completely and i cannot click the button again.

If you want some more details, here the exact problem. I have function that when a button is pressed, an object appears. In the function which makes this object there is an eventListener which leads to a function which allows the user to press that object. When you press that object it disappear and the button will animate. However, since the original eventListener still exists, you can press the object while in motion and create a new object. So to the point: What i want to do is disable the eventListener while the button is moving, and reactivate it when it stops.

  • 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-05-23T01:24:07+00:00Added an answer on May 23, 2026 at 1:24 am

    The best way is to simply use a flag which tells the function if the animation is complete or not. Here’s an example of what I’m talking about using TweenLite as tween library:

    public class CreateButton extends Sprite{
            private var animating:Boolean = false;
    
            public function CreateButton(){
                this.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
            }
    
            private function onClick(event:MouseEvent):void{
                if(this.animating == false){
                    // Trigger creation functionality
                    TweenLite.to(this, 0.5, {/* Parameters for the actual animation */ onComplete:animationComplete});      
                    this.animating = true;
                }
            }
    
            private function animationComplete():void{
                this.animating = false;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing an animation class in ActionScript 3 and would like to know the
I know I can create an actionscript loop in a script block that can
I'm doing some Actionscript work right now and I'd like to know whether there's
I'm doing a project using ActionScript 2 where I'm loading in text from an
I'm a newbie doing Objective-C, coming from Flex/Actionscript development. I have an iPhone app
I'm doing an Image Cache following this method: http://www.brandondement.com/blog/2009/08/18/creating-an-image-cache-with-actionscript-3/ I copied the two as
I am the freshman for flex and actionscript. I want to know when a
I have a swf that I call as /SWFUploader/upload.swf?single=true Then in ActionScript 3 I
I have a simple ActionScript 2-based flash file where I'm doing all of the
I've created an mxml page that displays a tree control, however the data is

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.