3 Replies Latest reply on Oct 13, 2012 10:18 AM by kglad

    a question about action script 2

    ayhanbabaa Level 1

      hi all , i do a game with as2 (its an escape game) i have stuck somewhere in as 2. if u help me i will be glad.İ am begginer at flash yet pls help frown

       

      i use this code for i take the item to my inv:

       

      its object code in my inv:

       

      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.yuk) { 

                              _global.lantern = 1;

                              this._visible = false;

        _level0.gotoAndStop(5);

                  }

      }

       

      its 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;

      }

       

      problem is that my objects doesnt show everyframe in my inventory.

      e.t.c. in frame 1:i take object to my inventory but in second frame:it doesnt show in inventory i wanna player can take object his inv and use it other rooms in my game  didnt able to solve the prob. with layers if u help me i will be glad.

      (sorry for eng)