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 6951597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:14:24+00:00 2026-05-27T14:14:24+00:00

I’ve been fumbling with this issue for a bit. I’ve got a lovely little

  • 0

I’ve been fumbling with this issue for a bit. I’ve got a lovely little tooltip movieclip that follows the user’s mouse for a few seconds before it removes itself. My problem is that if there is one already there I remove it, however, I cannot seem to remove the MOTION_FINISH event and it still fires and possibly deletes a new tooltip.

What I want is to essentially put in a line item such as var tween(smallhelp_panel).deleteAll();
I saw a tweenlight function killtweensof(mc); However I’ve used the tweens I’ve incorporated below throughout my 30k lines of AS3 code.

Here is my tooltip handler. I call it with a simple

Main_Warning("Please don't forget to save!",5);

My movieclip is a ‘smallhelp_panel’ and I check if it already exists and remove it. However, the alpha and MOTION_FINISH tweens still exist and cause issues with any new smallhelp_panels.

public function Main_Warning( the_text:String, myTimer:int = 4){
        if(smallhelp_panel != null){
                stage.removeChild( smallhelp_panel );
                removeEventListener(Event.ENTER_FRAME, trackmouse);
                smallhelp_panel = null;
            }
        smallhelp_panel = new small_help();
        smallhelp_panel.name = "myWarning";
        smallhelp_panel.x = mouseX - 50;
        smallhelp_panel.y = mouseY + 15;
        smallhelp_panel.helptext.text = the_text;
        stage.addChild( smallhelp_panel );
        addEventListener(Event.ENTER_FRAME, trackmouse);
        var myTween:Tween;

        myTween = new Tween(smallhelp_panel, "alpha", None.easeOut, 1, 0, myTimer, true);
        tweenholder = myTween;
        tweenArray.push(tweenholder);
        myTween.addEventListener(TweenEvent.MOTION_FINISH, removeTween);
    }

That is my Tooltip handler.

for reference purposes my tween remover is:

public function removeTween(e:TweenEvent = null):void{
        e.target.removeEventListener(TweenEvent.MOTION_FINISH, removeTween);
        if(smallhelp_panel != null){
            removeEventListener(Event.ENTER_FRAME, trackmouse);
            stage.removeChild( smallhelp_panel );
            smallhelp_panel = null;
        }
    }

and my mouse tracker that moves the tooltip with the mouse is a simple:

public function trackmouse(e:Event):void{
        smallhelp_panel.x = mouseX - 50;
        smallhelp_panel.y = mouseY + 15;
    }
  • 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-27T14:14:25+00:00Added an answer on May 27, 2026 at 2:14 pm

    That’s because you’ve added your MOTION_FINISH event listener to the tween, not to the panel. You remove the panel, if one already exists, but the tween still exists in the tweenholder and tweenArray variables – and fires a MOTION_FINISH event, when its calculations are finished. Your event listener method doesn’t know which tween the event came from, and correctly removes the help panel.

    To fix this, either remove the tween and event listener along with the help panel in your Main_Warning function, or modify the removal block in your event listener method:

    public function removeTween(e:TweenEvent = null):void{
        e.target.removeEventListener(TweenEvent.MOTION_FINISH, removeTween);
        // --- this will check if the Tween belongs to the panel on the stage!
        if (smallhelp_panel && e.target.obj == smallhelp_panel ) { 
        // ---
            removeEventListener(Event.ENTER_FRAME, trackmouse);
            stage.removeChild( smallhelp_panel );
            smallhelp_panel = null;
        }
        // --- NOW remove the tween from the array (all of them should be removed after use)
        tweenArray.splice (tweenArray.indexOf (e.target), 1); 
    }
    

    I don’t understand exactly why you would need both a tweenholder and a tweenArray variable, though 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I know there's a lot of other questions out there that deal with this
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,

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.