Well, both are bad practice (IMO).

I'd go for an animation engine, like animationpackage:
http://www.alex-uhlmann.de/flash/animationpackage/

Which has a class for alpha tweening:
http://www.alex-uhlmann.de/flash/animationpackage/ap2/de/alex_uhlmann/animationpackage/animation/Alpha_doc.html

As an added bonus you'll get easing + being able to specify the duration of the 
alpha tween.

// begin
import de.alex_uhlmann.animationpackage.animation.*;
import com.robertpenner.easing.*;

var yPos:Number = 100;
var mc:MovieClip;
var mcAlpha:Alpha;
var num:Number = 5;

for (var i:Number = 0; i<num; i++) {
 mc = templates.duplicateMovieClip("templates"+i, this.getNextHighestDepth(), 
{_y:yPos});
 yPos += 50;
 mcAlpha = new Alpha(mc, [0,100], 1000, Linear.easeOut);
 mcAlpha.run();
}
// end

regards,
Muzak


----- Original Message ----- 
From: "Jesse Graupmann" <[EMAIL PROTECTED]>
To: <flashcoders@chattyfig.figleaf.com>
Sent: Wednesday, July 18, 2007 1:34 AM
Subject: RE: [Flashcoders] onEnterFrame() and delete onEnterFrame()


>I was just making an example based on this article.
>
> http://timotheegroleau.com/Flash/articles/scope_chain.htm
>
> "#6 To avoid memory waste, a simple solution is to not use nested function
> but create function externaly instead and attach references only."
>
> So would that still be bad practice for AS 1.0 considering nothing gets
> referenced beyond the scope of this?
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Muzak
> Sent: Tuesday, July 17, 2007 4:13 PM
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] onEnterFrame() and delete onEnterFrame()
>
>
> ----- Original Message ----- 
> From: "Jesse Graupmann" <[EMAIL PROTECTED]>
> To: <flashcoders@chattyfig.figleaf.com>
> Sent: Wednesday, July 18, 2007 12:49 AM
> Subject: RE: [Flashcoders] onEnterFrame() and delete onEnterFrame()
>
>
>> You could make it just a bit more lean than that...
>>
>
> Except that fadeInMc() now runs in a different scope => bad practice.
>


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to