Jump to content
Search Community

A Case of the BLURRRS! Help Friends!

as3gs test
Moderator Tag

Recommended Posts

Hey Gang, I am working on this project and am using TweenMax for blurring between the big images in the main marquee. Its at: http://bit.ly/mM1Kkv

 

Though, when a user clicks the PREV/NEXT buttons fast the images start blurring as they should - but never finish. I know it's a factor of holding the next image from loading until the blur is done. But not sure where my code issue is. I'm waiting until the onComplete function to do the tweening. Any help is super big time appreciated.

 


function onMarqCompleteStatus(e:Event):void
{
var imgArr = new Array();
var imgloaderInfo:LoaderInfo = e.target as LoaderInfo;
imgArr.push(imgloaderInfo.content);

   marqLoading = false;

TweenMax.from(Object(this).marqDisplay_mc, 1, {blurFilter:{blurX:20}});
TweenMax.to(Object(this).marqDisplay_mc.addChild(imgArr[0]), 2, {blurFilter:{blurX:0}});

//preLoader.stop();
}


Link to comment
Share on other sites

it looks like you are de-blurring the parent marqDispplay from 20 and then separately removing a blur on imgArr[0].. which doesn't appear to ever have had a blur on it. that's not the real problem though.

 

assuming the container marqDisplay_mc initially has no blur, then tweening FROM blurX:20 will blur from 20 to 0 as expected.

 

if that tween is running and the current blurX is 10 when the user quickly hits "next" well..

 

then your FROM tween is going to blur FROM 20 to 10.

 

a fromTo tween may help in this situation.

Link to comment
Share on other sites

 TweenMax.fromTo(Object(this).marqDisplay_mc, 1, {blurFilter:{blurX:20}},  {blurFilter:{blurX:0}});

there is the chance that if the user clicks while this tween is happening, that the blur could be at 10 and then jump TO 20 and tween down to 0.

 

or maybe try tweening the img itself and not its container (imgloaderInfo.content)

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