Avatar of Sideas
Sideas
 asked on

MOTION_CHANGE Event help

Hi, the below is tweening OK as expected but the doBlur function is not being called.

Does anybody know why? It's driving me nuts!

Cheers

//////////////////////////////////////////////////////////////////////////////////////////////////////

function doBlur(e:TweenEvent):void
{
      rectangle.filters = [blur];
      trace("BLUR");
}

//////////////////////////////////////////////////////////////////////////////////////////////////////

function slideRect(e:TimerEvent):void
{
      hideSelected();
      trace(rectangle.x);
      trace(slideAmount);
      
      if (rectangle.x == -3840)
      {
            trace("LAST SLIDE");
            var myTween:Tween = new Tween(rectangle,"x",Strong.easeOut,rectangle.x,rectangle.x + 3840,.5,true);
            slideTimer.reset();
            slideTimer.start();
            rectangle.addEventListener(TweenEvent.MOTION_CHANGE, doBlur);
      }
      else
      {
            var myTween2:Tween = new Tween(rectangle,"x",Strong.easeOut,rectangle.x,rectangle.x - 960,.5,true);
            blocker.block1.visible = true;
            rectangle.addEventListener(TweenEvent.MOTION_CHANGE, doBlur);
      }
}
Adobe Flash

Avatar of undefined
Last Comment
Sideas

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
edchipman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Sideas

ASKER
Cheers edchipman!
Your help has saved me hundreds of hours of internet surfing.
fblack61