0
votes

Hi im new on this board hope you can help me.

Im trying to make a flash map game.Now i have got items in a Movieclip and want this Movieclip into a scrollpane component but i have got probs cause the dragging dont go outside of the scrollpane.

Here is my Code

container.mc_item.buttonMode = true;

container.mc_item.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
function onDown(event:MouseEvent):void {
container.mc_item.startDrag();
}
container.mc_item.addEventListener(MouseEvent.MOUSE_UP, onUp);
function onUp(event:MouseEvent):void {
container.mc_item.stopDrag();
trace(container.mc_item.dropTarget.parent.name);   // this is the command that tells us which area the mc_item was dropped on
}
container.scrollpane.source= container.mc_item;

Please help


I uploaded the source in cs4. Would be great if you can make the each dynamic _mc in scrollpane dragable, to drag into the movieclip outside. Is it possible to give each of the _mc in the scrollpane a label?

http://www.speedshare.org/download.php?id=5324318F11

Thanks

1
Could you try explaining in more detail what it is you want, and what the current behavior is? Maybe post your SWF as it is now.Jonatan Hedborg
Ok See this is my problem I have got dynamic Movieclips in a scrollbar component now i want them each dragable outside of the scrollpane into a Movieclip. Now this is my DEMO speedshare.org/download.php?id=37410CEB11 Here is the SOURCE speedshare.org/download.php?id=5B6A311C11 Would be realy happy if you can help me out of this damt... Via Drag And Drop Thank youArapqueen

1 Answers

0
votes

I think you either need to write your own scroll-pane component, or (easier I think), add some code so that when you start dragging the item in the list, you create a duplicate of the item instead (which is not added as a child to the scrollpane), and drag that instead. Don't forget to remove it when you drop it :)