home about | services artwork blog

Fuse & onMotionFinished follow-up

Thursday, September 06, 2007

One more thing while I'm still up, in follow-up to my post about the loss of onMotionFinished using Fuse, I've come up with something that's just as simple.

Fuse lets you pass in "callbacks" as objects, which basically call a method in whatever scope you tell it, like so:

{scope:this,func:doSomething,args:x,y}

It was recommended to me that movieclips could be removed like this:

bla_mc.fadeOut(1,"easeInOutQuad",null,{scope:bla_mc,func:removeMovieClip});

but that doesn't really replace what I've done in the past, which is to have one function that removes all of the movieclips as well as take care of any extraneous things that need to be done -- like calling the method to build the next page. So what I came up with is this:

var onTweensDone = function(){
bla1_mc.removeMovieClip();
bla2_mc.removeMovieClip();
isSomeVariable = true;
buildPage("pageName");
}

bla1_mc.fadeOut(1,"easeInOutQuad);
bla2_mc.fadeOut(1.5,"easeInOutQuad",null,{scope:this,func:onTweensDone});

I don't like that the onTweensDone function comes before the actual tweens, since it's counter-intuitive in the flow of things. But obviously it's got to be defined first before it can be passed in.

I have to say that I love the delay option in Fuse. As much as i like the simplicity of post-tween events for some things, burying tweens inside of other tweens' onMotionFinished events gets really tedious and the code is confusing. And man, bezierTo and Blur_blurTo are my two favorite new toys. slideTo is great too, but just adding even just a tiny bit of bezier curve to any animation really brings it to life.

Labels: , , ,

posted by j. Permanent Link 0 comments

A.D.: New Orleans After the Deluge

I don't have time for writing right now... or much of anything else. But I did find this tonight and wanted to share before I forget:

A.D.: New Orleans After the Deluge






It's a 12 part story about Katrina, of which everything up to part 6 has been published so far, including two prologues, the second of which is particularly powerful. The artwork is great and the characters are spot on -- especially the woman shopping in Hamid's store. Check it out.

posted by j. Permanent Link 0 comments