3 Replies Latest reply on Dec 11, 2008 11:53 AM by kglad

    SHOOTER GAME TROUBLES

    PercyWaters
      I have been working on a star wars space shooter game. I am almost done but find I am running in to a problem.

      I have two movie clips that flash says are not movie clips. This is the error I get:

      Clip events are permitted only for movie clip instances onClipEvent(load)
      Clip events are permitted only for movie clip instances onClipEvent(enterFrame)

      They are movie clips. I have tried making them symbols again and rewording the actionscript. I am at a loss. This is for my college grad show, so the sooner I can get some help the better.

      Here is the actionscript the errors are refering to:

      first:

      onClipEvent(load)
      {
      function reset()
      {
      if(this._name=="enemy")
      {
      this._visible=false;
      }
      else
      {
      this._visible=true;
      }

      second:

      onClipEvent(enterFrame)
      {
      this._x-=this.speed;
      if(this._x<-50)
      {
      this.reset();
      }
      if(this.hitTest(_root["ship1"])&&this._name<>"enemy")
      {
      _root.gotoAndPlay("gameover");
      _root["ship1"].removeMovieClip();
      for(i=1;i<=3;i++)
      {
      _root["enemy"+i].removeMovieClip();

      }

      }
      }