3 Replies Latest reply on Oct 14, 2012 9:50 AM by kglad

    frame bug in my game please help

    ayhanbabaa

      in my flash game , frames are resetting always to my object.İ use variables but doesnt.İf i convert frames to keyframes it works but i return first frame same thing is happening again only for first frame.

       

      i use variable:

       

      _global.lantern=0;  //acs layer

       

      normal object code:

      onClipEvent (load) {

                  this.tabEnabled = false;

                  if (_global.lantern== 1) {

                              this._visible = false;

                  }

      }

      on (release) {

                  _global.lantern= 1;

                  this._visible = false;

                  _level0.lantern_inv._visible = true;

      }

       

      inventory object code:

      onClipEvent (load) {

                  this.tabEnabled = false;

                  this._visible = false;

                  orig_x = this._x;

                  orig_y = this._y;

      }

      on (press) {

                  this.startDrag();

      }

      on (release) {

                  this.stopDrag();

                  this._x = orig_x;

                  this._y = orig_y;

                  if (eval(this._droptarget) == _level0.hareket_mc) {

                              _level0.gotoAndStop(61);

                              this._visible = false;

                  }

       

       

       

       

      }

       

      maybe my codes copying can fix it to timeline but i dont know how to do it

       

       

       

      its normal:

      http://c1210.hizliresim.com/12/g/dxr7u.jpg

      it shows everyframe , pls help me how to fix it

      (this event is being i return come the room otherwise i take item to my inv with success)

       

      http://c1210.hizliresim.com/12/g/dxr9t.png

      http://c1210.hizliresim.com/12/g/dxrb3.png

        • 1. Re: frame bug in my game please help
          kglad Adobe Community Professional & MVP

          try:

           

           

           

           

          _global.lantern=0;  //acs layer

           

          normal object code:

          onClipEvent (load) {

                      this.tabEnabled = false;

                      if (_global.lantern== 1) {

                                  this._visible = false;

                      }

          }

          on (release) {

                      _global.lantern= 1;

                      this._visible = false;

                      _level0.lantern_inv._visible = true;

          }

           

          inventory object code:

          onClipEvent (load) {

                      this.tabEnabled = false;

                      this._visible = false;

                      orig_x = this._x;

                      orig_y = this._y;

          }

          on (press) {

                      this.startDrag();

          }

          on (release) {

                      this.stopDrag();

                      this._x = orig_x;

                      this._y = orig_y;

                      if (eval(this._droptarget) == _level0.hareket_mc) {

          _global.lantern=1;

          this._visible = false;

                                  _level0.gotoAndStop(61);

           

                      }

           

           

           

           

          }

           

           

           

          • 2. Re: frame bug in my game please help
            ayhanbabaa Level 1

            it worked thanks you rock

            • 3. Re: frame bug in my game please help
              kglad Adobe Community Professional & MVP

              you're welcome.