1 Reply Latest reply on Jul 5, 2006 7:50 AM by gregmax17

    I don't understand this

    gregmax17 Level 1
      Ok, this might be hard to explain (and a little long), but it will be really thankful if someone can answer this problem I am having.

      I am moving a character around the stage and when this character collides with another object (enemy/character), I tell it to:

      gotoAndPlay('this_scene', 1);

      When it goes to the first frame of the scene, I tell it load an external .swf file. When it is finished loading it works and plays just fine. This is what I have that loads the external .swf file (it is in a movie clip placed on the stage on the scene 'this_scene':

      createEmptyMovieClip("holder", 1);
      holder.loadMovie("test.swf", 0);
      holder._x = _global.char_x - Stage.width/2;
      holder._y = _global.char_y - Stage.height/2;
      if(holder.bytesLoaded == holder.bytesTotal) {
      _parent.nextFrame();
      }

      After the external .swf file is done playing, it triggers a _global variable which, when read, will go back to the scene so the gamer can move his character around. I also unload the movie. for example:

      //this script is on the main timeline of the scene 'this_scene'
      if(_global.action_done == true) {
      unloadMovie(loadMC.holder);
      gotoAndPlay('game_play', 1);
      }

      Everything works how it is suppose to; however, it will only work once. So if I were to collide with the character/enemy again, it won't repeat this proces. I would have to reset the .swf file.

      Sorry for the long explanation, and I appreciate any help that is given.