Hello. I haven’t asked for help in a long time so I’ll get to the point.
I have:
MyPlayer = function()
{
this.n = 0;
};
_global.player1 = new MyPlayer();
in layer 1 of my movie.
later, in clip1 of layer 2 i have
onClipEvent(load)
{
_global.player1.n = 300;
trace(_global.player1.n);
}
onClipEvent(enterframe)
{
_global.player1.n += 3;
trace(_global.player1.n);
}
I am coding in flash mx, and when I run the movie it traces
300
303
3
3
3
3
I read the Variable scope tutorials and I understand most of it, but I dont know why _global.player1.n doesn’t increase by 3 like I want it to?
thanks!