ActionScript 3.0 :: Clear Shared Object When Close Flash Player?
Aug 9, 2011
Is there a way to clear shared object when I close Flash player.
stage.addEventListener(Event.UNLOAD, Close);
function Close(event:Event):void
{
mySO.clear();
}
View 1 Replies
Similar Posts:
May 28, 2009
I made a shared object whiteboard but I have a stupid problem with removing objects. This is function to clear shared object :
public function clearShape (so:SharedObject):void {
trace('clear:', this.name);
delete so.data[this.name];
[code].....
View 2 Replies
Oct 12, 2005
I am using this code:
Code:
clearList_btn.onRelease = function() {
extTracks.clear();
};
But the array in the shared object still exists.
View 2 Replies
Jun 14, 2010
since updating my Flash Player plugin from 10 to 10.1, I'm seeing a weird crash when accessing shared objects. Flex Builder's debugger pops up and prints a stack trace like this:
undefined
at flash.net::SharedObject$/getLocal()
at my.code::MyClass$/load()[/my/path/to/my/MyClass.as:27]
(...)
This happens when calling SharedObject.getLocal("someString") for the second time for the same string, though it doesn't always crash. When using another browser on the same machine (not configured as the preferred debugging browser in Flex Builder), Flash Player remains silent. The code is wrapped in a try/catch(Error) block which does not catch this error. I'm using Flex SDK 3.5 and Flex Builder 3 on Mac OS X 10.6.3.
View 4 Replies
Mar 13, 2009
I created a very simple experiment to attempt to access the same shared object in Flash Player and AIR.
A Flash SWF creates a local shared object.
A AIR application (being tested from CS3 or installed) opens the same shared object.
The data does not persist. Is this theoretically possible?
View 1 Replies
Jun 7, 2011
How to clear the shared objects when user closes the browser abruptly?If the user opens the same application in two tabs, and user tries to close any one of the tab, we have to listen only the closed tab event.
View 1 Replies
Jul 31, 2009
What is the actionscript required to close a Flash player window? I want to run a flash movie on my computer that has a button which closes the window, but in Actionscript 3 I cannot add actions to the button.
View 4 Replies
Jul 4, 2011
Whenever I compile my project using FlashDevelop in 'Debug' the Flash Player window remains after I have clicked the 'Stop' button in Flash Develop. I have to then switch over to the flash player, click through any error messages and then close the player, which wastes a lot of time in the long run.Any way to make it so Flash Player closes when I click 'Stop' in the Flash Develop debug tools? EDIT: My setup is a fresh install of Windows 7, a new copy of Flash Develop 4 and Flash Player 10.
View 2 Replies
Feb 19, 2007
is there a code to close the flash player window from a button in the flash movie? i want to run a movie full screen then have a button in the flash movie close the window when the people are done viewing it.
View 2 Replies
Jun 24, 2009
Can I use Flash Shared Object to pass information between two different SWF files on two different pages within the same website?I know it can if the SWF files are the same. But what if they are different Flash object with different SWF files?
View 7 Replies
Aug 23, 2009
I have a gane that uses shared object and keeps note of highscores and users names. So - if that is possible then I can set up teaching courses on standalone pcs can't I? ie: Databses I have in access can go in XML and the recording of position in course and results of tests can also be recorded using Shared object.Is that a good way of going about things OR should the whole thing go over to AIR and its sqlite system?
View 3 Replies
May 10, 2011
I have a Flash.exe projector that stores data in a Shared Object. Anything works fine if I launch it from my desktop. The Flash.exe will be recorded and used from a CD-rom. Will the path of the Shared Object change? Say, will it try to record itself on the cd?!
View 1 Replies
Oct 31, 2011
I am trying to access a flash shared object using sharedObject.getLocal("sharedObjectName"); But, it always creates a new object and doesn't locate the existing object, then I searched the location where it saves the object and I got this location from the internet c:/Documents and Settings/username/Application Data/Macromedia/Flash Player/#SharedObjects But, I could not get this directory in my windows XP. access my shared object which is residing in my flash media serverapplication folder..
View 1 Replies
Jul 31, 2011
At the moment I'm developing something in which I need to have a server of some sort store and send Shared Objects. When I was looking into it the API said that you would use something like a flash media server. Well the student price for that is about 1300$ so I can't do that. Is there a way for me to create a server in actionscript using socket connections (or something). To send and receive shared objects? I haven't started on this yet I'm just looking ahead into what I'm going to need.
View 2 Replies
Feb 13, 2007
How can I find a shared object file that flash uses to store data? I want to remove it manually.
View 2 Replies
Aug 21, 2007
I have a working shared object. The visitor types a password into an input text field and hits go. The next time they go to the log-in it pulls the shared object out and prepopulates the input text field. How can I add a "checkbox" (Remember Me) option to the process. I'd like the visitor to have the option of whether or not they want to be remembered.
My current code looks like this:
On frame 1 Actions Keyfame:
pw_babytalk = SharedObject.getLocal('babytalk');
if (pw_babytalk.data.pword != undefined) {
password_txt.text = pw_babytalk.data.pword;
}
stop();
View 1 Replies
Jan 18, 2011
I am looking for a way to edit .sol-files (LSO/Local Shared Object). I have tried searching quite a bit, but I have not been able to find any program that can edit AS3-files properly. Is there a solution for me out there?
View 4 Replies
Mar 22, 2011
In one of the classes in my Flex application I have a dictionary, which is periodically updated from other parts of the application. It contains some sort of user preferences and I want to keep it in sync with a local shared object - the dictionary needs to be read during the class initialization and saved to the local storage when an element is changed, added or deleted.
The "Dictionary" object inherits only "Object" and does not have a change event - like the "collectionChange" in ArrayCollection. So I can't sync the dictionary just by listening for an event and manipulating the shared object in the event handler. The other possible solution would be to make the dictionary private and manipulate it using special methods in my class. Something like:
public function setValue(key:String, value:String):void
public function getValue(key:String):String
public function delValue(key:String):void
But using bindings will become a real nightmare and I will have to make changes in many other parts of the application.
View 2 Replies
Jun 24, 2011
I'm wondering if it's possible to access a shared object's data (once it's been changed) without reloading the swf. Specifically, I have two swfs: one changes the data in the so and lets the second swf "know" via a localconnection. I have a function in the second swf that fires via the local connection.[code]This function looks for the new value however it doesn't show the updated value in my textfield unless I refresh the browser. Thoughts?
View 1 Replies
Feb 13, 2004
My problem is that i have a flash movie with has a link to another flash movie. I want both of them to read from the same shared object. I know it violates the funda of shared objects. Is there some way of doin this.Both these movies run from a Tomcat Web server within the same domain.
View 2 Replies
Feb 23, 2003
Is it possible to access the same shared object from different flash movies. I am trying this, and I put the exact same code to access the shared object in the first frame of both movies, but when I update the SO in one of the movies, the other one does not reflect the change. Both movies are in the same folder. Any ideas?
Since it is called a "shared object, I would think that more than one movie could access it, but what do I know. I don't know if it matters, but here is the code:
[Code]...
View 3 Replies
Jan 30, 2010
need 3x times more space than it's available... is it possible to get it somehow?
View 8 Replies
May 15, 2011
I'm trying to save an object to a shared object, the thing is that while i run it the first time it works perfectly, but as soon as the swf is closed and re-opened my object just disappears.If I'm not wrong this is because it's a custom class instance and the .data saves a reference to the object instead of the object which is deleted as soon as the program closes.My question is:I've tried saving each var in a different data.[something], having to save five variables might not be bad but what about twenty or more.
View 2 Replies
Feb 13, 2004
My problem is that i have a flash movie with has a link to another flash movie. I want both of them to read from the same shared object. I know it violates the funda of shared objects. Is there some way of doin this.Both these movies run from a Tomcat Web server within the same domain.
View 2 Replies
May 26, 2009
I have a couple of static functions (one shown below) that can be called from multiple instances; there is a problem because of a shared object I am using.
My tracing shows that the application is in this function or the converse function addRec when my application is crashing.
[Code]....
In another class I have this statement where I set the value of some date in my shared object. I have to comment the following lone of code out in order for the application not to crash after a short while:
so.data.rArray = currentRecs; // the culprit I see the first trace in the removeRec function but then nothing. I expect to see the second trace indicating that the array of current recordings taking place (currentRecs) has been cut back by one.
Originally my function was not static and my application crashed very quickly. By making the function static the situation improved insofar as it took longer for the application to crash. Flash seems to be very particular about the way it handles shared objects.
View 5 Replies
Jan 11, 2010
I'm looking for a way to play flash animated content once ( even as the user navigates to different HTML pages with similar flash content) and expire after a set amount of time or after the browser is closed.
I'm aware I could use a shared object for this but can't seem to find info about how to clear them at browser session end.
View 5 Replies
May 12, 2011
i have prepared a login screee. using shared object i have saved username and password, now i want to know the sol path. Is there any way to actually retrieve the shared object local path.like C:Documents and Settings[userName]Application DataMacromediaFlash Player#SharedObjectsXXXXXlocalhost ext.sol
View 1 Replies
Nov 30, 2011
I'm using Flash and AS3 to write an app for iOS and for Android and I'm saving XML-data using shared objects. Now it struck me that when I supply an update to the app store and the user updates the app, will the shared objects remain intact or will they be replaced? I'd very much like them to remain as they were.
View 1 Replies
Jan 31, 2004
I have a couple of static functions (one shown below) that can be called from multiple instances; there is a problem because of a shared object I am using.My tracing shows that the application is in this function or the converse function addRec when my application is crashing.
public static var currentRecs:Array;
private static function removeRec(recName:String) { trace("Removing record "+ recName + " from currentRecs"); for (var item in currentRecs) { if (currentRecs[item] == recName) { currentRecs.splice(item, 1); trace("Finished recording " + recName + " currentRecs = " + currentRecs.length); } } }
In another class I have this statement where I set the value of some date in my shared object. I have to comment the following lone of code out in order for the application not to crash after a short while:
so.data.rArray = currentRecs;// the culprit I see the first trace in the removeRec function but then nothing. I expect to see the second trace indicating that the array of current recordings taking place (currentRecs) has been cut back by one.
Originally my function was not static and my application crashed very quickly. By making the function static the situation improved insofar as it took longer for the application to crash.Flash seems to be very particular about the way it handles shared objects.
View 1 Replies
May 16, 2007
Is it possible to load data from another shared object from another flash file? if so how?
View 1 Replies