Wednesday, August 27, 2008
Tweening from inner to outer glow
Wednesday, August 27, 2008
Using TweenFilterLite, I'm not sure if there is a better way to do this... you can't simply tween from inner to outer and have it work, you'll get glow "pop" instead. So to go from one to the other you have to back off to nadda and then start the other.
Anyone know a better way to achieve this? Four Methods is okay I guess, wondering if the base class might be modified to allow this internally instead (I could always just add a param and check for it / set to null on default).
TweenMax sure does the trick here. I have found a small little thing I need to work around somehow, but generally this is a super powerful engine.
I forgot about it because a while back I tried it and it wasn't working nearly as well as it does now (in fact I think for whatever reason it simply failed on most things except simple movements). Three cheers for TweenMax!
I was looking at GTween but honestly, I think this puppy will handle just about anything I can think of needing to do with a tweening engine.
Anyone know a better way to achieve this? Four Methods is okay I guess, wondering if the base class might be modified to allow this internally instead (I could always just add a param and check for it / set to null on default).
import gs.TweenFilterLite;Update:
function kickoff():void
{
TweenFilterLite.to( frame_mc, 0.5, {glowFilter:{
color:0x000000, strength:2, inner:true,
alpha:1, quality:3, blurX:22, blurY:22},
onComplete:reverse});
}
function reverse():void
{
TweenFilterLite.to( frame_mc, 0.1, {glowFilter:{
color:0x000000, strength:2, inner:true,
alpha:1, quality:3, blurX:0, blurY:0},
onComplete:outer});
}
function outer():void
{
TweenFilterLite.to( frame_mc, 0.5, {glowFilter:{
color:0x000000, strength:2, inner:false,
alpha:1, quality:3, blurX:22, blurY:22},
onComplete:reverseAgain});
}
function reverseAgain():void
{
TweenFilterLite.to( frame_mc, 0.1, {glowFilter:{
color:0x000000, strength:2, inner:false,
alpha:1, quality:3, blurX:0, blurY:0},
onComplete:kickoff});
}
kickoff();
TweenMax sure does the trick here. I have found a small little thing I need to work around somehow, but generally this is a super powerful engine.
I forgot about it because a while back I tried it and it wasn't working nearly as well as it does now (in fact I think for whatever reason it simply failed on most things except simple movements). Three cheers for TweenMax!
I was looking at GTween but honestly, I think this puppy will handle just about anything I can think of needing to do with a tweening engine.
Comments:
There are currently 1 Comments:
-
Richard said...“using TweenMax you could easily wrap this in a single .sequence call.”


