Avoid states.. they're hard to maintain, control, etc..

Look into using ViewStacks and controling application state through 
actionscript.

----- Original Message ----- From: "ben gomez farrell" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Monday, December 17, 2007 6:07 PM
Subject: [Flashcoders] Another sort of Off Topic Flex question



I'm working with an application in Flex, and using states to switch back and forth between components. You can kind of think of each component as a "page" of my Flex application, and each "page" is a state that I go back and forth to from a main navigation.

It first occurred to me that my states don't really go away when I had an enter frame event attached to one of my component pages. Of course it's easy and good practice to clean those kinds of things up when I'm not using them - but even then - when I go back to my component page, it's in exactly the same state as I left it. Anything I interacted with on screen is there in the exact same state and position.

So this stuff is not going away when I switch states. I guess, when I think about it, it makes sense. But I'm wondering if I should be worried as my application picks up complexity? Essentially, it's a question of when I remove children from the stage - should I worry they still exist?

I guess its a question of best practices in Flex. Do you folks author applications in this way - using states to navigate between several large component pieces? Or do you get smarter and break it out into smaller SWFs using an AS3 only shell to do all the garbage collecting yourself of the SWFs?

Thanks! Things seem to work pretty well right now, but I'd just hate at the end of this project when we have all our graphics in that it runs all sluggishly because everything's running at once.

ben

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to