6 Replies Latest reply on Nov 10, 2006 7:35 AM by Hodders

    Drag and drop query

      I wonder if anyone can help me with my dilemma.

      I am creating a movie that allows the user to drag a huge image around a small stage. My problem is that I do not want the image to be dragged off the stage.

      I have tried adding arguements to the startDrag() function by putting in co-ordinates, but it doesn't to work. I think this is because the image is much bigger than the stage. Any suggestions anyone
        • 1. Re: Drag and drop query
          arunbe Level 1
          this can be done out simply using the flash ScrollPane component.
          But, i will allow you to scroll the content only...
          Do you want to scroll the image and drag the image ???
          If scroll is enough, you can use the Scrollpant component.

          • 2. Drag and drop query
            Hodders Level 1
            Thanks for the speedy reply arunbe.

            Unfortunately your solution will not satisfy what I am trying to achieve....perhaps I should explain in more depth.

            I am doing simulations for a new GIS system, a mapping application which looks a bit like www.multimap.com. One of the features it has is drag and drop functionality. To try and emulate this, I have created a movie the size of the map window in the web application and have a large draggable image of a map that, when added to the parent movie of the total application, looks and acts like the real thing. What I want to stop is users reaching the edge of the map image and keep dragging it so that the map only fills part of the stage.

            This solution must be drag and drop, but thanks for your idea anyway
            • 3. Re: Drag and drop query
              Glazer Level 1
              Hi Hodders,

              I've made a quick example of what i think you're after, the code is a bit "dirty" at the moment, maybe if i have time later, i can clean it up a little.

              here's a link to the files: Drag And Drop Query Files, there's an fla and a swf.

              • 4. Re: Drag and drop query
                Hodders Level 1
                Barry, you're a God-send!! That is exactly what the doctor ordered, thank you, thank you. I've been scratching the ol' noodle for a good few hours over this - must be getting old! :-)

                Did you save the source file as Flash8? Unfortunately we are a bit behind the times here and only have MX2004. Any chance you could re-save it as an MX2004 file...please.

                Thanks again for your help, regards

                • 5. Re: Drag and drop query
                  Glazer Level 1
                  No probs Carl,
                  Just uploaded an MX 2004 version.

                  Just don't scream at me when you see the code, as i said it needs a bit of work, but i'm sure you'll be able to customise it for your usage.
                  • 6. Re: Drag and drop query
                    Hodders Level 1
                    I'm not going to do any screaming at all, I'm just extremely grateful that you have given me a solution to my problem. As far as I am concerned, this is the most beautiful code I have ever seen.......today!!!! :-)

                    Thank you again, very much appreciated