Problem Cursor disappears / Drag and Drop doesn't work

Hey everybody,
I have an urgent problem!
Three butterflies are supposed to be dragged in an object.  My customized cursor is sort of a landing net to catch these butterflies.
For the cursor I have this code:
cursor_mc.startDrag("true");
Mouse.hide();
My drag and drop code is:
cursor_mc.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
redbutterfly_mc.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
violetbutterfly_mc.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
yellowbutterfly_mc.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
cursor_mc.addEventListener(MouseEvent.MOUSE_UP, stopMove);
redbutterfly_mc.addEventListener(MouseEvent.MOUSE_UP, stopMove);
violetbutterfly_mc.addEventListener(MouseEvent.MOUSE_UP, stopMove);
yellowbutterfly_mc.addEventListener(MouseEvent.MOUSE_UP, stopMove);
function startMove(evt:MouseEvent):void {
   redbutterfly_mc.startDrag();
   cursor_mc.startDrag();
   violetbutterfly_mc.startDrag();
   yellowbutterfly_mc.startDrag();
function stopMove(evt:MouseEvent):void {
   redbutterfly_mc.stopDrag();
   cursor_mc.stopDrag();
   violetbutterfly_mc.stopDrag();
   yellowbutterfly_mc.stopDrag();
But when I'm clicking on a butterfly my cursor stops to move and stays on the position of the butterfly, which i'm dragging. After dropping it, there is no cursor at all so one doesn't know where the mouse is currently located.
Does someone know why this doesn't work? I'm working currently with a mousefollower, because at the moment this is the only way it works..
The mousefollower code is:
addEventListener(Event.ENTER_FRAME, enterFrameHandler)
function enterFrameHandler(event:Event):void {
    cursor_mc.x += cursor_mc.mouseX / 4;
    cursor_mc.y += cursor_mc.mouseY / 4;
But now I have the problem that only the yellow butterfly moves even if I'm clicking on the red or the violet...
Please help me!! Thank you in anticipation!

You've solved the problem, thank you very much!
Since it seems you know all about actionscript or at least all answers to my questions, I try my luck a further time
If I wanted to collect the caught butterflies in a certain target, for example a flowerpot, where the butterflies can't be removed after dragged in, is this more or less the code for it? I haven't tried it yet but I'm searching the internet for something like that and maybe it is the right thing? And is in this case "myTarget" the name of the picture which is used as the target? Thank you in advance!
function pickUp(event:MouseEvent):void {
    event.target.startDrag(true);
    event.target.parent.addChild(event.target);
    startX = event.target.x;
    startY = event.target.y;
function dropIt(event:MouseEvent):void {
    event.target.stopDrag();
    var myTargetName:String = "target" + event.target.name;
    var myTarget:DisplayObject = getChildByName(myTargetName);
    if (event.target.dropTarget != null && event.target.dropTarget.parent == myTarget){
        event.target.removeEventListener(MouseEvent.MOUSE_DOWN, pickUp);
        event.target.removeEventListener(MouseEvent.MOUSE_UP, dropIt);
        event.target.buttonMode = false;
        event.target.x = myTarget.x;
        event.target.y = myTarget.y;
        counter++;

Similar Messages

  • Drag and drop doesn't work and also control C and control V

    drag and drop doesn't work and also control C and control V

    Try this first. On your hard drive, go to Users / yourself / Library / Preferences.
    In that Preferences folder there is a file called com.apple.finder.plist.
    Trash that file and restart.

  • Drag and drop doesn't work on iMac running 10.5.8

    Drag and drop doesn't work on iMac running 10.5.8

    Please do a SMC and PRAM reset using the directions in iMac SMC and PRAM reset. If that doesn't work then please tell us exactly which mouse you own, it's possible it needs cleaning or replacing.

  • Drag and drop doesn't work after upgrading to Yosemite

    It is strange.  Since upgrading yesterday to Yosemite, my drag and drop does not working consistently.  I use drag and drop all of the time, into emails, moving files from one folder to another, moving music from finder to itunes, etc.  It seems each time I try to drag a file, initially the Finder window I am dragging from crashes and re-starts.  Once it re-starts, I actually am able to move a file as normal for about a minute or two.  After a minute or two, if I try to drag and drop a file, again it crashes and re-opens.
    Does anyone have any ideas?  I did submit a bug notice to Apple, but thought maybe someone would have a fix.

    I'm not sure if this experience relates to your issue but maybe..
    After upgrading my iMac to Yos, I could only select and copy files to relocate them. Frustrating for a couple of days. I eventually found that the setting on my trackpad was for three fingers over a selected file/folder window/etc moved the item to where I wanted. It had automatically changed to this preference. Its called a 'three finger drag'. The video shows a pane being moved but it also applies to all files etc. It can found in preferences/trackpad/point & click. Here you can turn it off if that is hat is causing the issue. Otherwise no software solutions I'm aware of. Good luck.

  • I am trying to import an mp3 audio file into garage band for editing.  drag and drop doesn't work. What now?

    I am trying to import an mp3 audio file into garage band for editing.  Drag and drop does not work. any ideas?

    Try reposting in the Garageband forums. You can find it at:
    https://discussions.apple.com/community/ilife/garageband

  • Drag and drop doesn't work on non-intel machines

    It may be just me but Pages on my Macbook Pro allows me to drag and drop. The same document on my work G5 doesn't have this functionality. Both machines run 10.4.10 though the G5 doesn't have all the latest updates (corporate firewall issues)
    I am assuming its the different processor but would be interested to know of others experience.

    I drag & drop in Pages, Numbers, AppleWorks, etc. on both my G5 tower & my MacBook Pro all the time, no problems. There is a trick, though. You do need to click & then wait a half-second or so before dragging.

  • Drag and drop doesn´t work with photoshop

    Hi,
    I can't open any files in ps anymore by simply drag and drop the file on the ps app. open with in the context menue doesn't help either, ps is called up, but the file is not opened. looks like some other people had the same problem, but the links are all broken.
    your help would be very much appreciated.
    thanks
    g4, 1,25   Mac OS X (10.4.3)  

    Take a look in the root Library folder (not your home one) and see if you have the ScriptingAdditions folder with the Adobe Units Types file inside. If not that is your problem. You can either reinstall Photoshop, or you can create the ScriptingAdditions folder and download and unzip the file HERE, then put it in the ScriptingAdditions folder. NB: there is NO SPACE in the folder's name.
    Francine
    Schwieder

  • Drag and drop doesn't work

    Drag and drop does not seem to work for me. I have 2 IPods & an Ipad2. I use iTunes ios5. I see many posts on the Internet for this problem but no solutions! Help!,

    Patrick hello,
    Not quite sure what has happened here as a number of things may be wrong ... to correct and also do the necessary system maintenance at the same time follow the instructions here and re-install iTunes ...Let me know how it goes after that.
    1st take a copy of the iTunes Library file inside the iTunes folder for safety sake.
    TP

  • My 'drag and drop' doesn't work using Mountain Lion OS X 10.8.2 on iMac

    Drag and drop occasionally works between folders but very rarely - and now not at all. I have tried various remedies suggested onthis forum, but they didn't work.
    Copy and paste is a real drag (sorry!)
    Hugh

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up guest users” (without the quotes) in the search box. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    When you see the gray Apple logo, release the shift key.
    If you are prompted to log in, type your password, and then hold down the shift key again as you click Log in.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.  The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • Drag and drop doesn't work in Optimise Toolbars

    when I try to add an icon to the taskbar, nothing happens. The moved icon is shown as being in an unusable place (black circle with diagonal bar).
    Also I cannot unlock the elements in the toolbars to rearrange them...

    You can only drag icons onto one of the toolbars at the top.<br />
    If you want them on the Status Bar then that should be supported by that extension.
    TotalToolbar: http://totaltoolbar.mozdev.org/

  • Illustrator extension - Drag and drop is not working on mac

    During testing my extension on Mac,I noticed that drag and drop doesn't work as expected. Therefore I have created a new simple extension with two lists.
    <s:List id="lst1" label="name" dragEnabled="true">
         <tree>
              <name>a</name>
              <name>b</name>
              <name>c</name>
         </tree>
    </s:List>
    <s:List id="lst2" dropEnabled="true" dragMoveEnabled="true"> </s:List>
    This will allow lst1 items to be dragged and drop in lst2.
    This sample works fine on Windows and on Mac as AIR app  but not working as extension on Illustrator( Not able to drag and drop between list on mac).
    Any help or workaround would be appreciated.

    Thanks for quick reply and help. I am able to drag multiple files but this is giving problem in case of filename with spaces like "abc def.png". Can you please put some thoughts on this.
    DataFlavor uriListFlavor = new DataFlavor("text/uri-list;class=java.lang.String");
                   Reader in = (Reader)t.getTransferData(DataFlavor.plainTextFlavor);
                   BufferedReader br = new BufferedReader(in);
                   String uriStr;
                   while ((uriStr = br.readLine()) != null)
                       URL url = new URL(uriStr);
                       String category = GalleryUtils.contentsPanel.getCurrentCategoryPath();
                       GalleryUtils.generateILPFromFile(new File(url.getFile()), category);
                   }Thanks
    Kanni

  • Problems with ListViews Drag and Drop

    I'm surprised that there isn't an Active X control that can do this more
    easily? Would
    be curious to find out if there is - although we aren't really embracing the
    use of
    them within Forte because it locks you into the Microsoft arena.
    ---------------------- Forwarded by Peggy Lynn Adrian/AM/LLY on 02/03/98 01:33
    PM ---------------------------
    "Stokesbary, Michael" <[email protected]> on 02/03/98 12:19:52 PM
    Please respond to "Stokesbary, Michael" <[email protected]>
    To: "'[email protected]'" <[email protected]>
    cc:
    Subject: Problems with ListViews Drag and Drop
    I am just curious as to other people's experiences with the ListView
    widget when elements in it are set to be draggable. In particular, I am
    currently trying to design an interface that looks a lot like Windows
    Explorer where a TreeView resides on the left side of the window and a
    ListView resides on the right side. Upon double clicking on the
    ListView, if the current node that was clicked on was a folder, then the
    TreeView expands this folder and the contents are then displayed in the
    ListView, otherwise, it was a file and it is brought up in Microsoft
    Word. All this works great if I don't have the elements in the ListView
    widget set to be draggable. If they are set to be draggable, then I am
    finding that the DoubleClick event seems to get registered twice along
    with the ObjectDrop event. This is not good because if I double click
    and the current node is a folder, then it will expand this folder in the
    TreeView, display the contents in the ListView, grab the node that is
    now displayed where that node used to be displayed and run the events
    for that as well. What this means, is that if this is a file, then Word
    is just launched and no big deal. Unfortunately, if this happens to be
    another directory, then the previous directory is dropped into this
    current directory and a recursive copy gets performed, giving me one
    heck of a deep directory tree for that folder.
    Has anybody else seen this, or am I the only lucky one to experience.
    If need be, I do have this exported in a .pex file if anybody needs to
    look at it more closely.
    Thanks in advance.
    Michael Stokesbary
    Software Engineer
    GTE Government Systems Corporation
    tel: (650) 966-2975
    e-mail: [email protected]

    here is the required code....
    private static class TreeDragGestureListener implements DragGestureListener {
         public void dragGestureRecognized(DragGestureEvent dragGestureEvent) {
         // Can only drag leafs
         JTree tree = (JTree) dragGestureEvent.getComponent();
         TreePath path = tree.getSelectionPath();
         if (path == null) {
              // Nothing selected, nothing to drag
              System.out.println("Nothing selected - beep");
              tree.getToolkit().beep();
         } else {
              DefaultMutableTreeNode selection = (DefaultMutableTreeNode) path
                   .getLastPathComponent();
              if (selection.isLeaf()) {
              TransferableTreeNode node = new TransferableTreeNode(
                   selection);
              dragGestureEvent.startDrag(DragSource.DefaultCopyDrop,
                   node, new MyDragSourceListener());
              } else {
              System.out.println("Not a leaf - beep");
              tree.getToolkit().beep();
    }

  • Drag-and-drop no longer working in FF

    All drag-and-drop features stopped working on my FF 21.
    That is, I can no longer:
    - Drag items to bookmarks or rearrange the bookmarks
    - Drag words to the search box or links to the URL box
    - Change the order of tabs
    - Rearrange items on toolbars
    - Move text in text boxes
    - etc.
    Safe mode exhibits the same problems.
    Please advise.

    I am having this problem as well. It persists even with all my extensions and add-ons disabled, and even in Safe Mode.
    I tried both solutions above. I downloaded FF21 installer, uninstalled FF, then reinstalled. Still cannot drag and drop anything. So I reset Firefox. Still no drag and drop. No rearranging tabs, no dragging images on web pages, you get the idea.

  • Drag and drop won't work in application

    Hello,
    I want to drag and drop elements of a listbox to another position inside ob the listbox.
    That works very fine as long as I use LabView during the programming of the VI.
    If I build the VI to a application drag and drop is not working anymore.
    What is the problem?
    Thanks.
    Ronny

    Just hit the bug myself.  Thanks for taking the time to post so I don't have to waste time debugging a know issue.
    Thanks,
    Matt
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

  • How do I copy messages in a Mail folder to a flash drive?  Drag and drop is not working.

    How do I copy messages in a Mail folder to a flash drive?  Drag and drop is not working!

    Try doing a save as to the desktop and then try dragging thr .rtf file to the usb drive

Maybe you are looking for

  • Not allow order unit in INFO record if it is not in material master

    Hello there! In standar SAP any user can introduce any order unit in the info record, even if it is not maintained in the material master alternative units of meassure. We need to block this... The conversion factor is not a problem for us, as we can

  • In which cases result cache status is changed to bypass?

    In which cases result cache status is changed to bypass? Because I tried but it wans't changed?

  • 00000098bf7d appears in list of shared

    "00000098bf7d" appears in list of shared items in Finder When I click on it I get a "connecting to" window (like a shared disk or network computer) It then shows "canon_memory" but there is nothing there I have checked all three computers conneted to

  • I tunes version 7.5 and error message 2738

    Have made several attempts recently to download the latest version of i tunes (7.5) but everytime I try I get almost to the end of installing and then when it starts to install quicktime I get an error message which is 2738 and says it cannot complet

  • ID error 13000

    quisiera saber como puedo comprar una aplicacion de youtube con mi tarjeta de   credito ,porque siempre cuando voy a comprar me salta error de ID13000,quisiera saber como se solusiona este problema,ya que tengo credito en mi tarjeta