-
By fscommand("save","savefile.ext") - shown in Sx tutor, I can beutifully save a set of _root.variables into a local file.
However, in some occasion, in addition to the variables value that I want to save, there appear some Flash variables like:
&constructor=[type Function]&__proto__=[object Object]
Although, it wont disturbe my loadVariables script, it really lools ugly.
Anyone knows how to avoid this ?
-
movie clip
Just a guess, but if you call the fs from within a movie clip instead of from the root timeline, I think it only sends the variables in that mc, instead of all the variables available to root.
Let me know if it helps!
Psx
-
Re: movie clip
No, when I tried, fscommand wont save variables in the MovieClip scope. It just saves "all" _root variables into a file.
Well,usually a flash movie _root, has many many variables.I do not want to save them all, but I can not control them. So I make a movie "saver.fla", and loadMovie("main.swf",1);
fscommnad save nothing. So, I copy variables that I want to save to _level0 like "_root.var1=_lelvel1.var1"; Then after fscommand in the saver.fla, I create a text file with only the varaibles and value in that file.
Most of the time, the saved text file is clean with only the variables and value.
But if you trace(_root.constructor), the output window did shows [type Function]. But, most of the time, this would not saved into text file.
Sometimes, it did. Why ???