4 Replies Latest reply on Oct 18, 2007 4:05 PM by Newsgroup_User

    Dragging sprites from a window to another???

    Stefu80
      Hello,

      How can I drag moveable sprites from a window (miaw) to another? I have two layered windows. I want to drag a sprite from the window on bottom to the window on top (miaw). The problem is that the sprite stays behind the target window...

      - Stefu
        • 1. Re: Dragging sprites from a window to another???
          Level 7
          You've given me a challenge. I'm going to try to program this. I don't
          think it would be too difficult. A mouse down on your moveable sprite
          should set a flag that would make the MIAW look for the mouse passing over
          it. When that flag is set and the mouse is over the MIAW, a sprite from the
          miaw can track the mouse movement just as it would in the main movie or
          other MIAW. You could also load the image of the member of the sprite from
          the first window into a variable and send it to the MIAW, create a cast
          member, assign that image to the member and assign it to a sprite so it can
          be set to the location of the mouse. A small detail: you need to save the
          offset of the mouse loc relative to the original sprite and use that offset
          to place the new sprite relative to the mouse.

          If you understand any of this you win the grand prize. But if I have time
          to do a mock up of this before you get another answer I'll post the code.
          It really should take that many lines. I vaguely remember having to do this
          on a project back in about '98 but it'd be easier to recreate it rather than
          search the archives to find it.

          --
          Craig Wollman
          Lingo Specialist
          Word of Mouth Productions
          212-928-9581

          www.wordofmouthpros.com
          "Stefu80" <webforumsuser@macromedia.com> wrote in message
          news:ff5437$dem$1@forums.macromedia.com...
          > Hello,
          >
          > How can I drag moveable sprites from a window (miaw) to another? I have
          > two
          > layered windows. I want to drag a sprite from the window on bottom to the
          > window on top (miaw). The problem is that the sprite stays behind the
          > target
          > window...
          >
          > - Stefu
          >


          • 2. Re: Dragging sprites from a window to another???
            Level 7
            I created a sample movie. It works perfectly although I just used a sprite
            in the MIAW instead of the imaging that I mentioned.

            If you send me your email address I can forward it to you.

            --
            Craig Wollman
            Lingo Specialist
            Word of Mouth Productions
            212-928-9581

            www.wordofmouthpros.com
            "Stefu80" <webforumsuser@macromedia.com> wrote in message
            news:ff5437$dem$1@forums.macromedia.com...
            > Hello,
            >
            > How can I drag moveable sprites from a window (miaw) to another? I have
            > two
            > layered windows. I want to drag a sprite from the window on bottom to the
            > window on top (miaw). The problem is that the sprite stays behind the
            > target
            > window...
            >
            > - Stefu
            >


            • 3. Dragging sprites from a window to another???
              Chunick Level 3
              quote:

              Originally posted by: Newsgroup User
              I created a sample movie. It works perfectly although I just used a sprite
              in the MIAW instead of the imaging that I mentioned.


              Valentin Schmidt has an example from his site that uses the .media property of a member. The visual method is a bit different, but more consistent with Windows drag 'n drop... however, the results are the same. Here's the link:
              http://staff.dasdeck.de/valentin/lingo/unsorted/dragndrop.zip

              • 4. Re: Dragging sprites from a window to another???
                Level 7
                I'm happy to say my code is more concise and simple but his works just as
                well and you don't have to give out your email address by using his ;)



                --
                Craig Wollman
                Lingo Specialist
                Word of Mouth Productions
                212-928-9581

                www.wordofmouthpros.com
                "Chunick" <webforumsuser@macromedia.com> wrote in message
                news:ff7nv2$j1b$1@forums.macromedia.com...
                >
                quote:

                Originally posted by: Newsgroup User
                > I created a sample movie. It works perfectly although I just used a
                > sprite
                > in the MIAW instead of the imaging that I mentioned.

                >
                > Valentin Schmidt has an example from his site that uses the .media
                > property of
                > a member. Here's the link:
                > http://staff.dasdeck.de/valentin/lingo/unsorted/dragndrop.zip
                >
                >
                >