PDA

View Full Version : Shared Objects: Puppets of doom?



lrhb
September 17th, 2003, 01:29 AM
Hello friends,

Here's another simple question I can't seem to figure out...

In a perfect world, when I do this:


superMonster = new Object();
superMonster.reptile = "Gamera";
superMonster.dinosaur = "Godzilla";
superMonster.robot = "Mecha Godzilla";

superMonster = SharedObject.getLocal("SuperMonsterSOL");

The shared object "SuperMonsterSOL" should be written to the hard drive, right?

1. Do I need to have the remoting components installed to use SharedObject? Neither SharedObject or getLocal change colors to let me know Flash is on my side...

2. When does the file get written to the hard drive? When I test it? Must I view it through a browser for the ActionScript to work it's magic?

Thanks in advance...

lrhb :hat:

kode
September 17th, 2003, 02:28 AM
superMonster = SharedObject.getLocal("SuperMonsterSOL");
superMonster.data.reptile = "Gamera";
superMonster.data.dinosaur = "Godzilla";
superMonster.data.robot = "Mecha Godzilla";
1) Nope. And download the documentation updater from Macromedia's site.
http://www.macromedia.com/support/flash/documentation/flmx_documentation_updater/

2) It will be stored when you call the flush method of the Shared Object, or if you close the window.
http://www.macromedia.com/support/flash/action_scripts/local_shared_object/local_shared_object04.html