Jump to content
Search Community

TweenMax onComplete2

leticiAH test
Moderator Tag

Recommended Posts

Hello!

 

I'm a newbie to TweenMax and would LOVE help!

I have a mini gallery with a left and right arrow, 4 images. What I need to accomplish is this: click on a button and a blur transition occurs between images.

 

Here's my code:

import com.greensock.*;

 

left_btn.addEventListener(MouseEvent.MOUSE_DOWN, blurImageL);

right_btn.addEventListener(MouseEvent.MOUSE_DOWN, blurImageR);

 

function blurImageL(event:MouseEvent):void

{

TweenMax.to(images_mc, 1, {blurFilter:{blurX:12, blurY:12, onComplete:unblurL}});

}

 

function blurImageR(event:MouseEvent):void

{

TweenMax.to(images_mc, 1, {blurFilter:{blurX:12, blurY:12, onComplete:unblurR}});

}

 

function unblurL(event:Event=null):void

{

TweenMax.to(images_mc, 1, {blurFilter:{blurX:0, blurY:0}});

}

 

function unblurR(event:Event=null):void

{

TweenMax.to(images_mc, 1, {blurFilter:{blurX:0, blurY:0}});

}

 

function prevImage(event:Event=null):void

{

images_mc.prevFrame();

}

 

function nextImage(event:Event=null):void

{

images_mc.nextFrame();

}

 

What happens is the code runs the MouseEvents, but then freezes on the blurred image and doesn't go to the next function.

Thanks! :)

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...