3 Replies Latest reply on May 18, 2007 3:34 AM by MurMeeKeer

    Draggable mc with an image swap

    twistedpancreas Level 1
      Hi there.

      I've got a draggable mc that needs to swap to another image (but still remain draggable).

      Problem is when you release the draggable item, with the changed image, it sticks to the mouse (until clicked down).

      Check out my example here

      is there any way around this?

      Thanks in advance
        • 1. Re: Draggable mc with an image swap
          MurMeeKeer Level 1
          I've almost finished but for the first time after released, it is not going to its original position.

          The main problem is on(release) event of the button in the second frame is not executed.

          Things I've done are:

          1. I removed the on(release) event of the button in the first frame completely as it is not necessary.
          2. I named the button in the first frame as 'first_btn' and attached the following code in the first frame of the pipette3's timeline.
          3. I copied the first_btn and pasted in the next frame and made its _alpha to zero (This is because to execute its on(release)
          event)
          4. I commented these two lines in the on(press) event of the button in the second frame.
          this.ox = this._x;
          this.oy = this._y;

          Actually, I don't know how to upload a file to the site. So, I elaborated. Make sense?
          • 2. Re: Draggable mc with an image swap
            twistedpancreas Level 1
            Hmm you've kinda lost me there MurMeeKeer.

            I understand up to point 2, but am wondering why you're setting the 2nd "first_btn" to alpha=0

            To upload to this forum do you have any webspace available? If so, upload your file to there and then you can then post a link to it from here.
            • 3. Re: Draggable mc with an image swap
              MurMeeKeer Level 1
              I made first_btn._alpha to zero in the second frame because we don't need the first button to visible there and at the same time we want its on(release) event.

              sorry....I don't have any webspace available.