Hello:
I have a question regarding the following snippet.
//give sketchscreen a ref to Main.as to call the homescreen func
var rootMain:Main = this.root as Main;
//let's go to main and show the homescreen
rootMain.goToHomeScreen();
Versus using....
var scrnNav:ScreenNavigator = new ScreenNavigator();
scrnNav.addScreen("homeScreen", new ScreenNavigatorItem(HomeScreen));
addChild(scrnNav);
scrnNav.showScreen( "homeScreen" );
I was told there could be a situation where "This can fail if "root" is ever unavailable (unlikely but can
happen) and it's a lot cleaner using the events"
Can anyone confirm or deny?
Please advise,
RIck