I did the same way what you told.But the clear function is called when i refresh the browser instead of close the browser.
2010/4/4 Ryan <[email protected]> > Hi baskaran ! > > this: > > ExternalInterface.addCallBack("clear",clearValue); > will be ExternalInterface.addCallback("clear",clearValue); > > and when your app initialized ,is isLoaded() function do? > > in your project ,index.template.html added your js code: > > like: > > window.onbeforeunload=function(){ ${application}.clear(); > > Good luck! > > On 3月31日, 下午7时08分, baskaran rajendran <[email protected]> wrote: > > hi > > I have cleared shared Object using addcallback(); > > It is not working properly ,this method is called when i refresh the > > browser.It should called when i close the browser. > > > > here my code > > mxml > > public function isLoaded():void > > { > > ExternalInterface.addCallBack("clear",clearValue); > > //did some work based on shared object value} > > > > public function save():void > > { > > //save the shared objects values > > sh.flush();} > > > > public function clearValue(): > > { > > sh.clear(); > > > > } > > > > //java script coding > > > > window.onbeforeunload=function(){ swfname.clear();} > > -- > > Best Regards > > Baskaran.R > > -- > You received this message because you are subscribed to the Google Groups > "Flex India Community" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<flex_india%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/flex_india?hl=en. > > -- Best Regards Baskaran.R -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.

