PDA

View Full Version : shared objects quick question


stef
01-03-2006, 08:47 AM
Hello,

Happy new year!!
I have a very quick questions about shared objects, are they created only when used with a browser? as the project I'm working is going to be redesigned into a projector file will shared objects still be created and set?

thanks for your help

Stefan

mambenanje
01-03-2006, 10:21 AM
shared object is for the client system and works no matter where the flash file comes from be it from a webserver or from a cdrom or from the hard disk
check it out at livedocs.macromedia.com

stef
01-03-2006, 12:19 PM
maybe you can help me some more??

I have a shared object that doesn't want to share I am hitting a brick wall and am not sure why?

For a test I am using two files one with a movieclip loader and one with nothing but a trace statement code is as follows.


Movie 1 (sandwiche_base.fla)
var lsoUser:SharedObject = SharedObject.getLocal("userdata", "/");
lsoUser.data.userid = 100;
lsoUser.data.sandwiches = "pickle";
trace(lsoUser.data.sandwiches);
// <!-- MovieClipLoader Object --> \\
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myMCL.loadClip("sandwichSelector.swf", 10);
// <!-- MovieClipLoader Object --> \\

Movie 2 (sandwichSelector.fla)
trace(lsoUser.data.sandwiches);

The strange thing is the statement traces the value on the sandwich_base movie but not on the sandwichselector movie, I was thinking that shared objects are global in scope.

Stefan