-
Hey
I am making search game. If the player has found all missing object a new page will load were they can download a song.
The problem is that I can't get the variable "allFound" update.
_level0:
frame 1: allFound = 0;
frame 2: some other code;
frane 3: gotoAndPlay(2);
_levelx:
onmouse release;
_root._level0.allFound = allFound+1;
It updates the allFound variable only ones.
I tried testing it with buttons wich are in level one and that works.
Why doesn't it work from a higher level into the root?
can anyone help me?
-
I think you should take out _root as this specifies the host _root and not the _level._root ie:
_level0:
frame 1: allFound = 0;
frame 2: some other code;
frane 3: gotoAndPlay(2);
_levelx:
on (release){
_level0.allFound++;
}
-
Thanks for helping me
You were right about leaving out the root.
The second thing I did was changing the code
_level0.allFound = allFound+1;
into:
_level0.allFound = _level0.allFound+1
Using the ++ command didn't work
Thanks again for your help. Seeing new options always creates solutions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|