Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

MovieClip does not appear on stage

New Here ,
Oct 21, 2013 Oct 21, 2013

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.

TOPICS
ActionScript
518
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 21, 2013 Oct 21, 2013

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2013 Oct 21, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2013 Oct 21, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 21, 2013 Oct 21, 2013
LATEST

Glad you got it working.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines