1 person found this helpful
Yes. If you're using a MobileApplication (now ViewNavigatorApplication), you would first need to prevent the default back button handing. Here's some example code based on the MAX Beta http://swfhead.com/blog/?p=884. If you're using just a Spark Application, just add your state change handling in KeyboardEvent handler.
Jason San Jose
Software Engineer, Flex
First and foremost, thank you for your timely response, and for your well-received advice!
After reading the posts from the MAX Beta link your provided, it is my understanding that if you disable the default back button handling, that the button itself would no longer function in the application.
I still want to use the back button, but I want to add the back button's popView function to states as well as Views.
If I missed anything, please let me know.
And thank you, once again!
PS-I don't know if this makes a huge difference, but I'm using the latest pre-released version of Flash Builder 4.5 with AIR 2.6 (released 2 weeks ago).
My apologies; I went back and re-read the page (including the "improved" version), and you're right: this fulfills my desired actions!
THANK YOU AGAIN!
There's a bit of a roadblock that I just discovered.
The example given used the old MobileApplication setup, but it appears that with the new ViewNavigatorApplication setup, there is no longer a backKeyHandler function.
Do you, by chance, know the function that replaces backKeyHandler()?
To avoid confusion, please post pre-release questions to the pre-release forums. You're looking for backKeyUpHandler().
Jason San Jose
Software Engineer, Flex Mobile