Jump to content
Search Community

Tweenlite onComplete Function not firing

Fitchett Developments test
Moderator Tag

Recommended Posts

Hey everyone so In my Movie Clip class I have the Object move to the Right side of the stage using TweenLite and after the tween is finished I want the function "OnComplete" to remove the object but its not doing anything and the object is still on stage. Here is how I am using it:

 

 

TweenLite.to(this, 3.0, { x: 900, y: 300, onComplete:removeTween } );

 

Then the Function:

 

private function removeTween():void
        {
            if (this.parent)
            {
                parent.removeChild(this);
            }
            
        }

 

Does anyone know why its not removing the object from the stage?

Link to comment
Share on other sites

I'm not sure - I just tested your code and it worked perfectly for me. There must be something else going on in your FLA. Please create a reduced test case FLA and post it here so that we can publish it on our end and see what's happening. Click the "More Reply Options" button to get to a screen where you can attach a file (zip it first please). 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...