Ok guys more theory id appriacate some help with
I hit an example today which illustrates the issue.
Lets say i have Main.as and Title.as
Main is the root
Title contains the graphics for the title
I want to tween this title into view.
This gives me 2 choices.
Do i do this from Main:
var title:Title = new Title();
addChild(title);
Tweener.addTween(title, {alpha:1, time:1});
or do i do this in Title:
public function fadeIn(): void
{
Tweener.addTween(title, {alpha:1, time:1});
}
so main looks like this instead:
var title:Title = new Title();
addChild(title);
title.fadeIn();
This example in its context might not mean anything and you may just say it is one and the same. However i realise as my applications get bigger i lose confidence. The first way seems to offer more flexibility as i work with a simple object but also code seems to get messy. What way is best?