3 Replies Latest reply on Aug 5, 2013 6:26 AM by ayhanbabaa

    drag and drop bug in flash cs4

    ayhanbabaa

      Hi i have a little problem in flash cs4 , there are two items with drag and drop event...

      code for box1_mc;

       

      on (press) {

                  this.startDrag();

      }

      on (release) {

                  this.stopDrag();

                  this._x = orig_x;

                  this._y = orig_y;

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

                  this._visible=false;

                  }

       

      these codes working for but if i drag and drop my item to stage(!)

       

      thats alwayz invisible, i mean i drag and drop my item to stage or another one , thats alwayz being invisible but i would invisible only if i drop it box2_mc

       

      is that a bug or my fault can you explain me (sorry for english)

        • 1. Re: drag and drop bug in flash cs4
          Ned Murphy Adobe Community Professional & MVP

          As long as you have the ending " } " that is not shown, there is nothing wrong with that code and it works fine when I test it.  If there is a bug, it might be in your file, but it is not a bug of Flash.  Use the trace() function to see the status of things... see if they agree with what you expect.

          • 2. Re: drag and drop bug in flash cs4
            ayhanbabaa Level 1

            you are right i have tried now and its worked fine idk but on my projects if i click the items its being invisible.Thanks researching my fail..but hard to find it

            • 3. Re: drag and drop bug in flash cs4
              ayhanbabaa Level 1

              i found something my movieclips on different layers (for example box1mc on rooms layer other items in objects layer)Action script searchs my item in current layer , it being invisible coz its not on same layer , its on different layer.If i put my items same layer its working fine.Omg how to fix it i dont know

               

              (if acs cant find my item in same layer , onrelease codes working automaticaly and dont see drag drop)