There is typo:
"and in the event handler set some variable to the event.OldState"
Its event.oldState (lower case o)
-Ashish
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ashish Goyal
Sent: Monday, April 10, 2006 3:03 PM
To: [email protected]
Subject: RE: [flexcoders] Calling previous state
You can use newState and oldState properties of the StateChangeEvent.
There is another event "currentStateChanging" which you can define on
the application tag and in the event handler set some variable to the
event.OldState.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
currentStateChanging="setOldState(event)">
In the script block:
import mx.events.*;
public var prevState;
public function setOldState(evt:StateChangeEvent):void
{
prevState = evt.oldState;
}
You can set your currentState to prevState to go to the previous state.
Hope this helps.
-Ashish
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Jeremy Rottman
Sent: Monday, April 10, 2006 2:00 PM
Subject: [flexcoders] Calling previous state
I am working on my app, and I have run into a situation where I need
change states and then when a user saves it takes them back to thier
previous state. Is there something like previousState?
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

