[quoted text, click to view] "dvwatkins" <webforumsuser@macromedia.com> wrote in message
news:dt56vn$log$1@forums.macromedia.com...
> ok, i figured some stuff out about using SharedObject. It stores
> the variable
> properly, but the second picks it up as being blank. However, when
> i re-run
> the first one, it picks it up fine. So for some reason, my second
> movie won't
> load the SharedObject correctly. Or it doesn't load the correct
> one. I have
> checked like 5 million times to make sure it's all spelled the same
> and even
> copied and pasted from one movie to the other the function that
> grabs the data
> from the shared object and it still doesn't work. it keeps coming up
> undefined.
>
> If there is anything special i need to do to fix this, i could use
> some info
> please. Im testing it on a local machine and its all stored in the
> my
> documents folder, so if maybe this has anything to do with it i
> would like to
> know please.
>
> basically the first movie stores it and loads it all correctly, but
> the second
> movie doesn't load it correctly. i have the first movie check to
> see if there
> is data already on the users computer and if there is, it preloads
> the text
> fields with the data and when i re-run the first movie, it picks up
> the data.
> but the second movie won't pick up the data at all.
I have found it necessary to delete the reference to the shared object
after using it to allow it to be refreshed later on the next read. If
you don't delete the reference to it, the next read will pull the
information from a cache somewhere instead of reloading the file.
Here is a little demo with MX sourcecode..
http://members.cox.net/4my5cats/localObject/test.html One warning though.. I have found that sometimes if you click two
sends (from alternate swfs) in rapid succession, you can cause a
malfunction that makes further reading of the sol file mess up. After
that, each file reads it's own copy of the file and the changes made
by one file don't effect the other until you restart the swf. I think
it's a timing issue related to two files accessing the same sol file
at the same time. There are ways around it, like holding sends and
reads until a certain clock value so that each file has it's own time
slice to use in accessing the sol file.
tralfaz