ActionScript 2.0 :: Save The Local Shared Object(.sol) File At A Desired Location Or To Embed It Within The Flash Movie?
Jun 8, 2004
!--Does anyone know if it possible to save the local shared object(.sol) file at a desired location or to embed it within the flash movie?
2--Is it possible to create an image file at runtime from a flash projector file?
View 1 Replies
Similar Posts:
Jun 8, 2004
!--Does anyone know if it possible to save the local shared object(.sol) file at a desired location or to embed it within the flash movie?
2--Is it possible to create an image file at runtime from a flash projector file?
View 1 Replies
Dec 8, 2009
I'm playing with Local Shared Objects, and I was able to save and load simple data types like strings and integers. Pretty cool.
I want to Save/Load a Bitmap Object but I'm having problems. I think I got a Bitmap Object to save but when I loaded it back in, it was basically a blank bitmap. I located the actual .SOL file on my computer and opened it up. It had some basic Bitmap info like scale, rotation, visible, width, height, etc, but NOT the actual bitmap.
So I realized that I need to be saving/loading a BitmapData object instead of just Bitmap. BitmapData holds the actual bitmap pixels, I think. Anyway I saved out a BitmapData object. When i tried to load it back in, I get a type coercion error: "Type Coercion failed: cannot convert Object@df355b1 to flash.display.BitmapData". I dont get it because this error didnt occur for Strings, ints, or Bitmap Objects. Whats happening?
Also, I looked again at the .SOL file after saving out the BitmapData object, And I dont see any pixel data there. The bitmap I'm saving is 800x800 so the .SOL file should be pretty big but its just a tiny file so I know the pixels havn't been saved properly.
Here is the code I'm using (Simplified - error handling removed, etc)
Code:
// save
var mySo:SharedObject = SharedObject.getLocal("mysharedobjecttest");
mySo.data.testA = 14;
mySo.data.testB = "hello this is a test";
[Code].....
View 14 Replies
Mar 26, 2008
I am programming a web based application with Actionscript 2.0 classes for flash 8, and I want to save user data using the local shared object.As the data is potentially rather complex I would prefer to store it in an instance of a custom class that I then stick in an array property of the local shared object data property.However, when I try to do this, if I retrieve the stored object it seems to have lost all its instance methods. If I do a for in on it, I can see the private properties to which I have assigned my data, but as they are private I cannot retrieve them.how I can store an instance of a custom class in a local shared object without it being corrupted in this way?
View 4 Replies
Mar 14, 2011
I am trying to write a piece of code to retreive data from a SOL file : this is my code :[CODE]//get External interfaceimport flash.external.*;
[Code]...
How can that be ? what can I do ? What am I doing wrong ?(bear with me, as I said, I'm kind AS newbie).
View 4 Replies
Mar 11, 2011
I was working with FMS 3.5 and using the function 'copyTo()' to copy a file to a desired location. Code: fileObject.copyTo("store/"+name+".flv") store is a virtual directory defined in Application.xml file in the server side and name is a variable that stores the fileName without extension This was working fine with FMS 3 and FMS 3.5. Now, I moved to FMS 4 and noticed that this copyTo() function is not working. In the FMS Admin Console, it throws an error:Error: File operation copyTo failed.
View 10 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
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
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
Jan 28, 2010
Does anyone know if it's possible to save and access a LSO from an EXE projector on a CD?
Obviously the LSO couldn't be saved on the CD itself - would it be able to save the LSO somewhere on the users hard drive?
View 4 Replies
Jan 22, 2011
I'm using a loader for people to use to upload their own images for a background, and I want it to remember the image the next time they come to the page, so is there any way to save the loader data in a shared object? I haven't tried just using something like
Code:
sharedObject.data.dataName=loader
because I assume it doesn't work that way.
View 9 Replies
Oct 13, 2010
I am building an application that uses a Shared Object that is shared (ironically) between 3 separate applications. 1 application listens for updates, and the others update the app. The problem I am having is that I need the main application to be able to detect changes to the Shared Object. Unfortunately there seems to be no events to listen for that are not for 'remote objects'. Because of this I created a timer that gets a new local instance of the shared object every X seconds.I just call the following before I read or write to the sharedObject:[code]This is causing a CPU Hiccup every 3 seconds and bogging down the system. so all this being said, does anyone know of a clean way to refresh a copy of the sharedobject without creating a brand new instance of it
View 2 Replies
Sep 16, 2009
read a local shared object with a servlet even if there is no flash present on a page? I want to set a local shared object like a cookie, and then access it again from a page that doesn't have a flash movie.If I can't do this, is it standard to have the initial flash movie call an external javascript to set a traditional cookie that can later be read?
View 1 Replies
Dec 2, 2009
What are some possible reasons that an LSO will not update/store information when nested within an IFRAME nested in another IFRAME?The mark-up structure was not determined/dictated by me.
View 0 Replies
Oct 3, 2010
I have begun to use Local Shared Objects in my projects but i appear to have got a bit stuck. To be more specific, i have two input fields, first and last names, the user enters his/her first and last names into these fields, the user clicks the "Save details" button and the Local Shared Objects are then set to remember the two names. The text above the first and last name fields change from "Welcome guest" to "Welcome, First Last!". So at this point the whole system works.
The point at which the code fails to work is when the user navigates away from the page where he/she entered the first and last names. The user then returns back to that page and the Local Shared Object has been set to the two input fields which are now blank because of the scene change. The Local Shared Object is set to nothing but is still accepted as a variable and thus makes the text above the two text fields display "Welcome, !".
I understand that what i just wrote may appear a bit compicated, but what i am essentially needing to find out is how to set the Local Shared Objects to the two input values only once when the "Save Details" button is clicked, instead of constantly checking the values of the inputs and changing the Local Shared Objects.
In code:
Code:
save.onRelease //only do this once// = function() {
first_name_txt.text = name_details.data.first_name
last_name_txt.text = name_details.data.last_name
}
View 2 Replies
Oct 4, 2007
Alright, so I have a projector application running, and an SWF on a server. The projector loads the SWF on the server.The projector will save all of the sharedobjects it creates in the local-host folder, whereas the swf on the server will store it in it's own folder "or example. I want to be able to have them both store shared objects in the same folder, so that they can interact with each other through shared objects. Even if I load the SWF from the projector, it still creates it's own folder.
I need to have this because it stores level data for a game I'm making, where all the levels are on the server, and you can download each one individually, and make your own levels, and upload them, so others can play. The data would be loaded from a swf on the server, and then create the S/O on the users computer. Then, the actual game would load this SO and then create the map, based on the data.
View 1 Replies
May 3, 2011
Do you see anything wrong with this?
PHP Code:
package import flash.net.SharedObject; import flash.display.MovieClip; public class Example extends MovieClip var currentStage:int;var SOData:SharedObject; public function Example
[code].....
View 3 Replies
Oct 10, 2003
I would like to know how to save more than 1 score into the text file and not overwriting the previous score so that it can be displayed in the high score list...I'm not sure how to write the array and where to write itwrite a sample code of for example getting 3 scores, saving it and displaying it in the high score board ?
View 2 Replies
Jan 19, 2009
I am facing a problem in accessing Local shared object from 2 diff. swfs. Let me explain the scenario clearly.I am developing a radio widget (in maindomain.com for ex)which has a button to open a html page (placed in contentserver.com) as a popup with specific wt and ht. The html page loads the same SWF file of radio widget from "maindomain.com", means whatever changes we do for the SWF in maindomain will be reflected automatically in the popup also.Here where the problem is:
1. Say I am playing radio station "A" in main window and added this station to favourite list (which is done by storing in Share object). So when i open the popup its reflect there.
2. Now when i change radio station "A" to "B" in the popup and added "B" to favourites and closed the popup.
3. When I refresh the main window, I can get both "A" and "B" in fav, as expected.
4. But if without refreshing in main window when I changed to some new station "C" and then open the popup, it has got only radio station "A" in the fav list.
I am pretty sure this is because of Sharedobject.flush(). The thing I am wondering is, why the station "B" which is also pushed to sharedobject when added to favourite is getting deleted when I flush() the SO.?I googled many forums but not satisfied solution for this. Even I tried to get the Sharedobject.getLocal("SO","/") every time before using data in it. but no use.Is it a Flash limitation accessing LSO from diff SWF?
View 4 Replies
Apr 10, 2010
Is there a way in which xml can be saved as shared object?
View 1 Replies
Jan 28, 2010
I need to make a local shared object (or javascript cookie function- below) that I can use to calculate the time since an ad was last loaded. It's an expanding ad, and I only want it to expand once every 2 hours. (Trying to keep the expanding-annoyance to a minimum!) I understand the basics of creating an "lso" but the action script for retrieving the time, placing it as a variable in the lso, and later retrieving it to figure the time is well beyond me. I considered a normal browser cookie, set to delete after the session, bypassing all time calculations... Forcing javascript to create a cookie ONLY when flash tells it to (after the ad has expanded) is tripping me up and creating a function to check for the cookie on the first frame to decide whether or not to continue is also beyond my simple animation skills.
View 0 Replies
Oct 30, 2005
can a shared local object (.sol) store nested arrays? like:
myArray = new Array([a, b, c], [1, 2, 3]);
View 5 Replies
Aug 28, 2007
I am trying to have a local shared object in flash to detect whether a user is a new user or a returning user. If they are a new user I want to do newUser function and if they are a previous user I want to do a previousUser function. This should all be happening on an onEnterFrame.
Here is my code I have so far:
//shared object - cookie
newUser_test = SharedObject.getLocal("newUser");
newUser.text = newUser_test.data.title = "new user";
newUser.text.onEnterFrame = function () {
newUser.text = "new user";
} newUser.text.onEnterFrame = function(){
newUser.text = newUser_test.data.title = "previous user";
newUser_test.flush();
}
View 3 Replies
Jun 6, 2011
i`m going to attach movie from library i need when i click save button and close swf and run again the movieClip are loaded
View 3 Replies
Nov 18, 2010
I'm making a Flash projector which will be distributed on CD. I want to allow people to copy files off of the CD. Is this possible? Should I be using FileReference?
View 1 Replies
Mar 4, 2004
I am trying to use the shared object to save the _x and _y positions of several attached MC's. The attached MC's have all been given a variable name and attached to a dynamically created MC called "world".I need to loop through all of the MC's in _root.world to save their postions to the shared object. Here is what I have tried,.... when I trace so.flush.. it traces to true but the object postions are not saved.......
Code:
_global.initSo = function() {
_global.so = SharedObject.getLocal("marinaSave");
// if the SharedObject object created a new shared object
[code]....
Am I using the for... in method correctly to loop through the MC's in _root.world and save their values?
View 4 Replies
Sep 14, 2010
I'd like to get the input text in the SWF to save on exiting the SWF without pushing a button. Here's what I have so far that incorporates pushing a button
Code:
var savedstuff:SharedObject = SharedObject.getLocal("Cookie");
btnSave.addEventListener(MouseEvent.CLICK, SaveData);
function SaveData(MouseEvent) {
[Code]....
View 1 Replies
Feb 9, 2011
I wanna to make some flash for save and load color...
Click button to change button color and click again return to old color and
Save lase color
When run project to show last save color
View 7 Replies
Feb 11, 2011
i want to create some 1 button for save and 1 button for load all shared object in my projectthis is my code for save and load and i want to create 1 button for save and 1 button for load last check point
ActionScript Code:
import com.dVyper.utils.Alert;
import flash.events.MouseEvent;
[code].....
View 0 Replies