Hi, I tried to reduce my code to smalles amount for testing. I made a few tests with the example in flash 8 and had no Problem catching the onStatus method call if it´s placed on the first frame, but everytime I tried to simple wrap the exact same code into the constructor of a class the onStatus method is sometimes called every two or three compilation tryouts sometimes it is never called. It looks pretty random to me.
If you want to try it out here is the code for the first frame: var base : MovieClip = this; var message_str:String; base.createTextField("message_txt", base.getNextHighestDepth(), 0, 0, 300, 22); var message_txt : TextField = base.message_txt; message_txt.html = true; base.createTextField("status_txt", base.getNextHighestDepth(), 10, 30, 300, 100); var status_txt : TextField = base.status_txt; status_txt.multiline = true; status_txt.html = true; var items_array:Array = new Array(101, 346, 483); var currentUserIsAdmin:Boolean = true; var currentUserName:String = "Ramona"; var my_so:SharedObject = SharedObject.getLocal("superfoo"); my_so.data.itemNumbers = items_array; my_so.data.adminPrivileges = currentUserIsAdmin; my_so.data.userName = currentUserName; my_so.onStatus = function(infoObject:Object) { status_txt.htmlText = "<textformat tabStops='[50]'>"; for (var i in infoObject) { status_txt.htmlText += "<b>"+i+"</b>"+"\t"+infoObject[i]; } status_txt.htmlText += "</textformat>"; }; var flushResult = my_so.flush(1000001); switch (flushResult) { case 'pending' : message_str = "flush is pending, waiting on user interaction."; break; case true : message_str = "flush was successful. Requested storage space approved."; break; case false : message_str = "flush failed. User denied request for additional storage."; break; } message_txt.htmlText = "<a href=\"asfunction:System.showSettings,1\"><u>"+message_str+"</u></a>"; This works fine for me. Now have the bad idea to try wrap this thing into a class: class LSObject { public function LSObject(base : MovieClip) { var message_str:String; base.createTextField("message_txt", base.getNextHighestDepth(), 0, 0, 300, 22); var message_txt : TextField = base.message_txt; message_txt.html = true; base.createTextField("status_txt", base.getNextHighestDepth(), 10, 30, 300, 100); var status_txt : TextField = base.status_txt; status_txt.multiline = true; status_txt.html = true; var items_array:Array = new Array(101, 346, 483); var currentUserIsAdmin:Boolean = true; var currentUserName:String = "Ramona"; var my_so:SharedObject = SharedObject.getLocal("superfoo"); my_so.data.itemNumbers = items_array; my_so.data.adminPrivileges = currentUserIsAdmin; my_so.data.userName = currentUserName; my_so.onStatus = function(infoObject:Object) { trace("onStatus"); status_txt.htmlText = "<textformat tabStops='[50]'>"; for (var i in infoObject) { status_txt.htmlText += "<b>"+i+"</b>"+"\t"+infoObject[i]; } status_txt.htmlText += "</textformat>"; }; var flushResult = my_so.flush(1000001); switch (flushResult) { case 'pending' : message_str = "flush is pending, waiting on user interaction."; break; case true : message_str = "flush was successful. Requested storage space approved."; break; case false : message_str = "flush failed. User denied request for additional storage."; break; } message_txt.htmlText = "<a href=\"asfunction:System.showSettings,1\"><u>"+message_str+"</u></a>"; } } And call following script in the first frame: import LSObject; var lso : LSObject = new LSObject(this); Then sometimes I get the onStatus method call on the first compilation. But on the second, third,.. The method is not called anymore. Does anyone get the same results or is something mysterious going on with my flash 8 installation? Cheers, Christoph -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christoph Atteneder Sent: Montag, 27. November 2006 09:39 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] SharedObject.onStatus not fired in browser Hi all, I´ve tried recently to react on the onStatus method call of the SharedObject class but noticed that it was only called in the standalone player, but failed to be called if the plugin is nested in the browser. Are there any specific security settings I forgot to set for the usage in a browser? I just wanted to catch the information if the user has accepted or denied to increase the storage limit in the settings window. thx for any hints, cheers Christoph _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com