Copy link to clipboard
Copied
Hello i am making a simple platform game, but i am now completely stuck. Each level of the game is on individual frames on the main timeline. A level consists of a movieclip with the platforms and a few enemies which are individual movieclips. Everything seems to work well, but strangely when i get to level 4 (the fourth frame) the enemies wont appear on stage. I have checked all my code and tried to add trace statements in the main function of the enemy class but it is not added to stage. I really dont know what to do as it seems like flash does not even know the movieclips are there?
Any help is much appreciated, i know this is not very clear and it is probably hard to help me, but if you have any suggestions please let me know.
Copy link to clipboard
Copied
So the problem is confined to frame 4. How are these enemy movieClips added to the stage? Are you using addChild()? If that's the case, are you adding these enemies to another movieClip or directly to the display list? Is it possible that they are loading under another movieClip?
Can you trace the position for each enemy movieClip?
Can you show us the code that you are using for this frame?
Copy link to clipboard
Copied
I have just dragged the objects to the stage so i can position them excactly where i want them. I dont have code on each of the frames but in a "MainDocument" which holds the code.
Copy link to clipboard
Copied
I figured it out - or at least i fixed it. On the same layer i have movieclip with a flag which the player must get to in order to win the level, and for some reason (i have no idea why) the flag has to be on top of all the enemy movieclips.
Copy link to clipboard
Copied
Glad you got it working.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now