You could force the browser to reload the page. That reloads the swf and
sets all the values back to their initial state.

Force a reload with something like,

 

navigateToURL( new URLRequest( "javascript:window.location.reload( false
);") , "_self" );

 

A bit brute force, but effective.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:       01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
<blocked::http://www.inps.co.uk/> 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact [EMAIL PROTECTED]

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Glenn Williams
Sent: 21 January 2008 17:51
To: [email protected]
Subject: [flexcoders] Help With Log Out

 

Hi all.

 

Can anyone tell me if there is a way to fully reset a flex application
programmatically?

 

My problem is this.

 

I'm using states to manage my apps logging in/out

 

But, when a user logs out, then back in again all of the components have
already been initialized during the first log in, so not all
creationComplete Events are being triggered on the users second visit
(without leaving the browser and closing the application)

 

What i want to know is this.

 

Is there a way to clear all the objects that are not displayed when on
the LOGGEDOFF State Or can I trigger the application to reset itself
(like play for a flash swf) so that everything is cleared properly?

 

I only noticed this problem just. After using a PopUpButton and setting
the .popUp=foo property to a menu I create on the creationComplete event
of the PopUpButton. It's all working ok, until the users logs off (and
the state is set to LOGGEDOFF) then logs back in again. I need to be
able to reinitialize all components to their 'first run' values then the
user logs back in.

 

Any ideas?

 

Hope I'm making sense here.

 

 

 

   

   Glenn Williams

<tinylion:dev/>

 

10 Print "glenn "

20 Goto 10

30 Rem " was that really 1982? it seems like only yesterday "

 

 

 

 

http://twitter.com/tinylion

 

<<image001.jpg>>

Reply via email to