In your use case probably no. It all comes down to when you want to use the 
variable you are creating.

In my case I always like my variables in a predetermined state when I create 
them so, if I can, I'll always initialize them in the declaration. It also 
saves an extra line of code ;-}

--- In flexcoders@yahoogroups.com, "luvfotography" <ygroups@...> wrote:
>
> Hi, 
> Is there any difference between initializing a variable in the declarations 
> vs. in the creationComplete function?
> 
> private var scrollTimer:Timer = new Timer(500,1);
>  
>  or
> 
> private var scrollTimer:Timer;
> 
> private function init():void {
>  scrollTimer = new Timer(500,1);
> }
> 
> When/Why should I use one vs. the other?
> thanks,
>


Reply via email to