# Drag and Drop problem

**URL:** <https://forum.kirupa.com/t/drag-and-drop-problem/1756>\
**Category:** flash\
**Created:** [May 29, 2002, 12:02pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756 "2002-05-29T12:02:09Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 12:02pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/1 "2002-05-29T12:02:09Z")

</div>

I have a drag and drop problem which i do not know how to solve myself. What\ri need to do is the following:\rI need a scrollable list of single text lines which i can drag and drop onto\ra text field. On the stop drag action the text of the single text line\rshould be copied into the text field. Does anyoune have an idea, solution,\rtutorial or the like?\rThanks very much in advance.\r\rBeat\r

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 12:08pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/2 "2002-05-29T12:08:48Z")

</div>

When you say a list, you mean a Listbox, a comboBox, or simply text hanging around ?\r\rpom 0]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 12:12pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/3 "2002-05-29T12:12:54Z")

</div>

Actually I don’t care what kind of list. I just need several text lines like:\r\rText 1\rText 2\rText 3\rText 4\r\rwhich are scrollable, as there can be about 20 of them. And I would like to drag and drop for example Text 3. \r\rI hope this helps.\r\rZimbo

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 12:26pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/4 "2002-05-29T12:26:38Z")

</div>

Turn them all into movie clips, and then do as in this tutorial : [www.kirupa.com/developer/…agdrop.asp](http://www.kirupa.com/developer/actionscript/dragdrop.asp)\r\rpom 0] \r\r\* Edit : doesn’t work that way. I don’t know, I could never use textboxes… I’ll try later.\*

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 12:39pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/5 "2002-05-29T12:39:56Z")

</div>

Maybe I am a bit stupid. But my problem is not the drag and drop thing, but the scrollable list. How do I make a scrollable list of my text items.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 1:13pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/6 "2002-05-29T13:13:55Z")

</div>

I gave that a quick try, but It is not possible with my method. I will explain it anyway, and give you another idea as food for thougth…\r\rYou can use the scrollable pane in MX to achieve a scrollable area in which you can insert another movie clip or an swf. \r\rWith that knowledge, you could create an swf that has mc’s in it.\r\rThe scrollable pane has a method which allows you to make contents inside the scrolling pane dragabble. However, you cannot pick up the contents that reside inside the scrollable pane and drop them outside of that “container”. In other words, the content inside the scrollable pane online exists in there. You can drag it anywhere INSIDE the scrollable pane, but that is it.\r\rHere is a suggestion.\r\rYou can use the getscrollContent(). This basically returns the name of the movie clip inside your scrollable content. You could use this information to make something happen elsewhere in the screen.\r\rFor example:\r\rWhen you press mouse button on movie clip inside the scrollable pane,\ruse getScrollContent(), and change the cursor to reflect that you have “picked up” something. If you release the mouse button over your “target”, then do whichever action using the value that was returned within the getScrollContent().\r\rand that is as far as I can go with this one… purely theoritical.\r\rHere’s the catch… I don’t know how you would load multiple MC’s into scrollable pane. It may require that you have multiple mc’s inside a main MC which you then load into the scrollable pane.\r\rAs always, I’m sure someone will come up with a different approach. Good luck!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 1:28pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/7 "2002-05-29T13:28:34Z")

</div>

Thanks I appreciate everyone taking the time to post a possible solution.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 2:05pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/8 "2002-05-29T14:05:51Z")

</div>

Idea !!!\r\rpom 0]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 2:24pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/9 "2002-05-29T14:24:49Z")

</div>

There : I did this with a Combobox, and attachMovie. Looks like what you want ?\r\rpom 0]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 2:27pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/10 "2002-05-29T14:27:38Z")

</div>

that’s pretty cool…\r\rhow did you that one, Pom?\r\rhey, we’re practically working together!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 5:10pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/11 "2002-05-29T17:10:36Z")

</div>

Hey Inigo,\rI read what you wrote, and I I don’t understand everything 😃 \rAnyway, what I did was the following : I created a movie clip, a little bit like the hover caption of Kirupa : a background and a textbox.\r\rThen I created the ComboBox, with everything in it.\r\rFinally a function that gets what is clicked in the ComboBox, attaches an instance of the clip and fill the text with the label of the ComboBox.\r\rThe only (and unsolvable I’m afraid) trouble with this is that you have to release to make it work. So it won’t be droptarget anymore.\r\rWant the fla, Montoya ?\r\rpom 0]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 10:38pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/12 "2002-05-29T22:38:51Z")

</div>

Yeah… I’d love to play with it… \r\rThanks, Pom.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2002, 11:41pm UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/13 "2002-05-29T23:41:18Z")

</div>

Here it is !\r[membres.lycos.fr/museebra…boDrag.fla](http://membres.lycos.fr/museebranly/ComboDrag.fla)\rTell me if you can do something with it…\r\rpom 0]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 30, 2002, 5:25am UTC](https://forum.kirupa.com/t/drag-and-drop-problem/1756/14 "2002-05-30T05:25:16Z")

</div>

Thank you all.\r\rYou did a great job posting all this! Finally I see light at the end of the tunnel and I am able to build my own solution now.\r\rZimbo2
