cypher181
07-17-2006, 11:29 PM
variables set in a frame aren't carrying over to the next frame. the movie clip "mc" has a variable named "var1". I am assuming all instances of "mc" will have this variable also. when i create a new instance of "mc" and set the "var1" variable, it traces to output correctly in frame 1, but in frame 2, "var1" becomes 0. is this documented a flash lite 2.0 problem?
frame 1:
var mcPointer:MovieClip = new MovieClip();
var count:Number = new Number(0);
_root.attachMovieClip("mc", "mc" add count, _root.getNextHighestDepth());
mcPointer = _root["mc" add count];
mcPointer.var1 = 1;
trace(mcPointer.var1);
frame 2:
trace(mcPointer.var1);
output:
1
0
frame 1:
var mcPointer:MovieClip = new MovieClip();
var count:Number = new Number(0);
_root.attachMovieClip("mc", "mc" add count, _root.getNextHighestDepth());
mcPointer = _root["mc" add count];
mcPointer.var1 = 1;
trace(mcPointer.var1);
frame 2:
trace(mcPointer.var1);
output:
1
0