Help with a Drag and Drop problem

I design a simple drag and drop the game, ranking but I had several objects and targets, for example square shaped object cannot go to target square shape, but when I have 2 or more place then the square2, carre3 can not go to square target! I used the code as belo

var objectoriginalX:Number;
var objectoriginalY:Number;
var counter: Number = 0;

triangle_mc.buttonMode = true;
triangle_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
triangle_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

circle_mc.buttonMode = true;
circle_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
circle_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

square_mc.buttonMode = true;
square_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
square_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

square2_mc.buttonMode = true;
square2_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
square2_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

square3_mc.buttonMode = true;
square3_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
square3_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

star_mc.buttonMode = true;
star_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
star_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

poly_mc.buttonMode = true;
poly_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
poly_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

function pickupObject(event:MouseEvent):void {}
event.target.startDrag (true);
event.target.parent.addChild (event.target);
objectoriginalX = event.target.x;
objectoriginalY = event.target.y;
}
function dropObject(event:MouseEvent):void {}
event.target.stopDrag ();
var matchingTargetName:String = "target" + event.target.name;
var matchingTarget:DisplayObject = getChildByName (matchingTargetName);
If (event.target.dropTarget! = null & & event.target.dropTarget.parent == matchingTarget) {}
reply_txt. Text = "Good Job!"
event.target.removeEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
event.target.removeEventListener (MouseEvent.MOUSE_UP, dropObject);
event.target.buttonMode = false;
Event.Target.x = matchingTarget.x;
Event.Target.y = matchingTarget.y;
counter ++;
score_txt. Text = String (counter);

} else {}
reply_txt. Text = "Try Again!";
Event.Target.x = objectoriginalX;
Event.Target.y = objectoriginalY;
-counter;
score_txt. Text = String (counter);
}
}

Thank you very much for your help!

An easy way to handle this is to assign a variable for each target that will tell you whether or not it is still a usable lens... Let's say you name "usable", it starts as a true for each target value.  Once a target is used you change the value of this variable to false.  You use this variable as abother test in your conditional.  Something like...

If (event.target.dropTarget! = null & event.target.dropTarget.parent == matchingTarget & event.target.dropTarget.useable ) {}

event.target.dropTarget.useable = false;

Tags: Adobe Animate

Similar Questions

  • Newbie request for assistance with several drag-and-drop & multiple targets

    I know that this question has been asked a million times, but I get always very well the solution.  I know that the solution called for me the use of tables in a part of my code, but I have problems understanding how to implement it.  I use Flash CS 5.5 with AS3.

    I have a flash drag-and-drop file which is divided into 4 distinct zones on the stage.  On each box, there are 7 places, for 7 different "puzzle pieces".  The first two spaces on each quadrant have very a very specific order for the correct puzzle pieces, while the 5 additional places on each quadrant also have specific parts, but the order is not important.  I have included my code below for reference (note that I have not all instances, finished yet).

    Basically, in code that's been created, the following bodies have specific targets with specific command:

    D1_1_mc, D1_2_mc, D1_1_mc, D2_2_mc, D3_1_mc, D3_2_mc, D4_1_mc and D4_2_mc.

    All other instances, such as D1_3_mc, D2_3_mc, D2_4_mc, etc. have specific quadrants on which they need to fall, but what about the last 5 'spaces' in each quadrant, the order does not matter.  I know that I can continue to do what I do, but I would have preferred that the last 5 pieces on each quandrant do not have to be in a specific order.

    You can provide any assistance is greatly appreciated!

    var startX:Number;

    var startY: number;

    var counter: Number = 0;

    D1_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D1_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D1_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D1_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D1_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D1_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D2_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D2_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D2_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D2_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D2_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D2_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D2_4_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D2_4_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D3_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D3_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D3_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D3_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D3_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D3_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D4_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D4_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D4_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D4_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D4_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D4_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D4_4_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D4_4_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    function pickUp(event:MouseEvent):void {}

    event.target.startDrag (true);

    reply_txt. Text = "";

    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) {}

    reply_txt. Text = "Good Job!"

    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropIt);

    event.target.buttonMode = false;

    Event.Target.x = myTarget.x;

    Event.Target.y = myTarget.y;

    counter ++;

    } else {}

    reply_txt. Text = "Try Again!";

    Event.Target.x = startX;

    Event.Target.y = startY;

    }

    if(Counter == 5) {}

    reply_txt. Text = "congratulations, you did!"

    }

    }

    D1_1_mc.buttonMode = true;

    D1_2_mc.buttonMode = true;

    D1_3_mc.buttonMode = true;

    D2_1_mc.buttonMode = true;

    D2_2_mc.buttonMode = true;

    D2_3_mc.buttonMode = true;

    D2_4_mc.buttonMode = true;

    D3_1_mc.buttonMode = true;

    D3_2_mc.buttonMode = true;

    D3_2_mc.buttonMode = true;

    D4_1_mc.buttonMode = true;

    D4_2_mc.buttonMode = true;

    D4_3_mc.buttonMode = true;

    D4_4_mc.buttonMode = true;

    Since it seems to afew possible gaps in the code you showed, and what I offer myself in response to your questions, I spent a little time get a working model of what I guess you just using the three targets and the fall of four objects.  If you want, I can make the file available for you, but for now, here's the code that works...

    var startX:Number;
    var startY: number;
    var counter: Number = 0;

    target_D2_1_mc.allowed = new Array (D2_1_mc);
    target_D2_2_mc.allowed = new Array (D2_2_mc);
    target_D2_3_mc.allowed = new Array (D2_3_mc, D2_4_mc);

    D2_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    D2_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);
    D2_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    D2_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);
    D2_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    D2_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);
    D2_4_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    D2_4_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    function pickUp(event:MouseEvent):void {}

    reply_txt. Text = "Good Luck."
    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 ();

    If (event.target.dropTarget! = null & MovieClip (event.target.dropTarget.parent).allowed.indexOf (event.target) >-1) {}
    reply_txt. Text = "Good Job!"
    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropIt);
    event.target.buttonMode = false;
    Event.Target.x = MovieClip (event.target.dropTarget.parent) .x;
    Event.Target.y = there MovieClip (event.target.dropTarget.parent);
    counter ++;
    } else {}
    reply_txt. Text = "Try Again!";
    Event.Target.x = startX;
    Event.Target.y = startY;
    }

    if(Counter == 5) {}
    reply_txt. Text = "congratulations, you did!"
    }
    }

    D2_1_mc.buttonMode = true;
    D2_2_mc.buttonMode = true;
    D2_3_mc.buttonMode = true;
    D2_4_mc.buttonMode = true;

  • Help with IMMEDIATE EXECUTION and drop

    Hi all

    We strive to create a procedure to do the following:

    * We have in the database of the tables named as C$ _XXXXXXXXX
    * We want to drop some of these tables with a common prefix (Fe C$ _1203101)

    DECLARE
    v_sql VARCHAR2 (300);
    BEGIN
    SELECT 'DROP TABLE ODISTAG.' | TABLE_NAME | « ; » IN v_sql FROM USER_TABLES WHERE TABLE_NAME LIKE ' C$ _1203101% ';
    EXECUTE IMMEDIATE v_sql;
    END;

    But we are getting this error:


    Error report:
    ORA-00911: invalid character
    ORA-06512: at line 5
    00911 00000 - "invalid character".
    * Cause: identifiers may not start with any character other than ASCII
    letters and numbers. $# _ are allowed after the first
    character. May contain identifiers surrounded by doublequotes
    any character other than a quotation mark. Other quotes
    (q' #... #') cannot use spaces, tabs or as carriage returns
    delimiters. For all other settings, consult the SQL language
    Reference manual.
    * Action:


    Any help on this please?

    Thank you!

    You don't need the semicolon.

  • Drag and Drop problem - the photo under the cursor of the mouse is too large

    I guess it's supposed to be an improvement, but the new version of Win 7 HPE produced an overview under the mouse cursor of the moved files from one place to another. It often causes the files end up in the wrong place [the wrist action is not like flying like 20 years ago]. Maybe I'm missing something that would cure it, but have not yet found.

    Any ideas, please?

    See if that helps,

    Click the start (windows logo) on the taskbar button.

    Type advanced system settings, click the suggestion on top link, Page 2,

    On the settings page.

    Visual effect customized, uncheck the show window content while dragging, the section

    Apply and OK.

    Or see if these settings help,

  • With reagent drag and drop cursor misalignment.

    Hello!

    I use jquery ui to make movable and capable of receiving items. I also use the new feature of reactive (thanks!) across the entire animation.

    However, when I try to click on my moveable objects, the cursor and the element are disrupt. It seems that when the cursor is over x, y of the draggable element is x ^ 2, y ^ 2, the slider gets to the top left, plus the distance between the droppable object and the cursor.

    I can't even let go of the cursor capable of receiving areas and the movable object behaves as he dropped it, even if it appears in the wrong position.

    I read something on the adjustment of the alignment of the scene, but that has not worked. See below.

    http://forums.Adobe.com/message/4817827#4817827

    All the tips are greatly appreciated. A code that I can put directly into the compositionReady stadium would be excellent.

    Thank you very much

    Heureka! It is possible, I found a solution...

    I take the width of the window and make a report with the width of the stage variable... The stageratio then gets multiplied with the details... When resizing the window, variables are recalculated...  Here's a working example:

    http://sandbox.junglecrowd.org/responsive_works/publish/Web/responsive.html

    Here is the code:

    CompositionReady

    SYM.xycompensation = function() {}

    var point = sym.$('Stage');

    var parent = sym.$('Stage').parent ();

    var parentWidth = stage.parent () .width ();

    var stageWidth = stage.width ();

    SYM.scaleratio = stageWidth/parentWidth;

    };

    SYM.xycompensation ();

    $(window) .one ("Resize", function() {}

    SYM.xycompensation ();

    });

    sym.infoLabel = function() {}

    var position = sym.$("box").show ();

    position2 var = sym.$("text").show ();

    position. CSS({)

    Top: sym.posY, left:sym.posX

    });

    position2. CSS({)

    Top: sym.posY, left:sym.posX

    });

    };

    Stage.MouseMove

    sym.posX = e.pageX * sym.scaleratio + 30;

    sym.posY = e.pageY * sym.scaleratio;

    sym.infoLabel ();

  • Drag and Drop problem

    I have several buttons in a MC container. What I want is to have it so that when a button is clicked on a particular MC is attached to the cursor (startDrag) and the MC container is moved to the side. The code below seems to work for the fixation part well and moving, but I can't understand how to detach the MC of the cursor. I tried many variations of stopDrag and removeMovieClip in various areas (inside the container of MC, in the MC slipped on the main timeline, etc), but nothing seems to work. Basically, what I want is that when we click on the mouse again on a special MC on a particular frame, it checks to see if the two MCs are overlapping. Will they do advance the main storyline to the next section. If they are not the moved MC is simply deleted and nothing else happens. So, any ideas for how to do this?

    {this.onRelease = function ()}

    attachMovie ("key", "keys", this.getNextHighestDepth ())

    startDrag (keys, true)

    _root. Inventory._x = 780;

    }

    :

    {whateverobject.onRelease = function ()}

    {this.onMouseUp = function ()}

    stopDrag();

    delete this.onMouseUp;

    }

    whatever.startDrag ();

    }

    p.s. Please mark this thread as answered, if you can.

  • Drag and drop helps!

    Hey guys,.

    I am in need of assistance with my drag and drop code. I have 3 Movieclips (mc, mc1, mc2). With an area (targetCircle). For the moment, it is when I do drag of the clips in the target area and then replace it with an another movieclip, the movieclip that was in the target area goes back to the original position of the movieclip that I just replaced with the recent movieclip.

    Thus for example shown in the picture below, 'mc' is in the target zone for the moment, and its original position is shown in the picture. Let's say I have take "mc2" and drag it to replace "mc" in the target area. What is happening is "mc" goes where "mc2" original position up to the top. Where "mc" should be going back to his appointed to the top post.

    Example Image:

    123.png1234.png

    Here is my code:

    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    
    showtext.visible = false;
    showtext1.visible = false;
    showtext2.visible = false;
    
    // initialize your draggable MovieClips
    mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseHandler);
    mc1.addEventListener(MouseEvent.MOUSE_DOWN, mouseHandler);
    mc2.addEventListener(MouseEvent.MOUSE_DOWN, mouseHandler);
    
    var xpos:Number;
    var ypos:Number;
    var draggedMc:String;
    var hittingMc:String = "";
    
    function mouseHandler(e:MouseEvent):void{
        switch(e.type){
            case "mouseDown":
                draggedMc = e.target.name;
                xpos = e.target.x;
                ypos = e.target.y;
                setChildIndex(getChildByName(e.target.name), this.numChildren-1);
                e.target.startDrag();
                stage.addEventListener(MouseEvent.MOUSE_UP, mouseHandler);
            break;
            case "mouseUp":
                stopDrag();
                stage.removeEventListener(MouseEvent.MOUSE_UP, mouseHandler);
                checkPosition();
            break;
            default:
                trace("Error");
            break;
        }
    }
    function checkPosition():void{
        // tests if the draggable object hits the targetCircle
        if(getChildByName(draggedMc).hitTestObject(targetCircle)){
            var xEndPoint:Number = targetCircle.x + ((targetCircle.width / 15) - (getChildByName(draggedMc).width / 15));
            var yEndPoint:Number = targetCircle.y + ((targetCircle.height / 15) - (getChildByName(draggedMc).height / 15));
        
         if(getChildByName(draggedMc) == mc) {
              showtext.visible = true; 
              }else{
                   showtext.visible = false; 
              }
              
              if(getChildByName(draggedMc) == mc1) {
              showtext1.visible = true; 
              }else{
                   showtext1.visible = false; 
              }
              
              if(getChildByName(draggedMc) == mc2) {
              showtext2.visible = true; 
              }else{
                   showtext2.visible = false; 
              }
              
              if(hittingMc == ""){
                var tween1:Tween = new Tween(getChildByName(draggedMc),"x",Strong.easeOut,getChildByName(draggedMc).x,xEndPoint,.5,true);
                var tween2:Tween = new Tween(getChildByName(draggedMc),"y",Strong.easeOut,getChildByName(draggedMc).y,yEndPoint,.5,true);
                hittingMc = draggedMc;
            }
            else if(hittingMc != "" && hittingMc != draggedMc){
                var tween3:Tween = new Tween(getChildByName(draggedMc),"x",Strong.easeOut,getChildByName(draggedMc).x,xEndPoint,.5,true);
                var tween4:Tween = new Tween(getChildByName(draggedMc),"y",Strong.easeOut,getChildByName(draggedMc).y,yEndPoint,.5,true);
                var tween5:Tween = new Tween(getChildByName(hittingMc),"x",Strong.easeOut,getChildByName(hittingMc).x,xpos,.5,true);
                var tween6:Tween = new Tween(getChildByName(hittingMc),"y",Strong.easeOut,getChildByName(hittingMc).y,ypos,.5,true);
                hittingMc = draggedMc;
            }else{
                var tween7:Tween = new Tween(getChildByName(draggedMc),"x",Strong.easeOut,getChildByName(draggedMc).x,xEndPoint,.5,true);
                var tween8:Tween = new Tween(getChildByName(draggedMc),"y",Strong.easeOut,getChildByName(draggedMc).y,yEndPoint,.5,true);
            }
        }
         
         
         
        else if(hittingMc == draggedMc) {
            hittingMc = "";
        }
         
         else{
            var tween9:Tween = new Tween(getChildByName(draggedMc),"x",Strong.easeOut,getChildByName(draggedMc).x,xpos,.5,true);
            var tween10:Tween = new Tween(getChildByName(draggedMc),"y",Strong.easeOut,getChildByName(draggedMc).y,ypos,.5,true);
        }
    }
    
    

    Import fl.transitions.Tween;
    Fl.transitions.easing import. *;

    ShowText.Visible = false;
    showtext1. Visible = false;
    showtext2. Visible = false;

    var xArr:Array = new Array();
    var yArr:Array = new Array();


    initialize your draggable MovieClips
    for (var i: int = 0; i<>
    This ["mc" + i] .addEventListener (MouseEvent.MOUSE_DOWN, mouseHandler);
    xArr.push (this ["mc" + i] .x);
    yArr.push (this ["mc" + i] there);
    }

    var xpos:Number;
    var ypos:Number;
    var draggedMc:String;
    var hittingMc:String = "";

    function mouseHandler(e:MouseEvent):void {}
    {Switch (e.type)}
    case "mouseDown":
    draggedMc = e.target.name;
    PosX = e.target.x;
    YPos = e.target.y;
    setChildIndex (getChildByName (e.target.name), this.numChildren - 1);
    e.target.startDrag ();
    stage.addEventListener (MouseEvent.MOUSE_UP, mouseHandler);
    break;
    case "mouseUp":
    stopDrag();
    stage.removeEventListener (MouseEvent.MOUSE_UP, mouseHandler);
    checkPosition();
    break;
    by default:
    trace ("Error");
    break;
    }
    }
    function checkPosition (): void {}
    tests whether the draggable object strikes the targetCircle
    {if (getChildByName (draggedMc) .hitTestObject (targetCircle))}
    var xEndPoint:Number = targetCircle.x + ((targetCircle.width / 15)-(getChildByName (draggedMc) .width / 15));
    var yEndPoint:Number = targetCircle.y + ((targetCircle.height / 15)-(getChildByName (draggedMc) .height / 15));
       
    If (getChildByName (draggedMc) == mc0) {}
    ShowText.Visible = true;
    } else {}
    ShowText.Visible = false;
    }
             
    If (getChildByName (draggedMc) == mc1) {}
    showtext1. Visible = true;
    } else {}
    showtext1. Visible = false;
    }
             
    If (getChildByName (draggedMc) == mc2) {}
    showtext2. Visible = true;
    } else {}
    showtext2. Visible = false;
    }
             
    If (hittingMc == "") {}
    var tween1:Tween = new Tween (getChildByName (draggedMc), "x", Strong.easeOut, getChildByName (draggedMc) .x, xEndPoint,.5, true);
    var tween2:Tween = new Tween (getChildByName (draggedMc), "y", Strong.easeOut, getChildByName (draggedMc) there, yEndPoint,.5, true);
    hittingMc = draggedMc;
    }
    ElseIf (hittingMc! = "" & hittingMc!) = draggedMc) {}
    var tween3:Tween = new Tween (getChildByName (draggedMc), "x", Strong.easeOut, getChildByName (draggedMc) .x, xEndPoint,.5, true);
    var tween4:Tween = new Tween (getChildByName (draggedMc), "y", Strong.easeOut, getChildByName (draggedMc) there, yEndPoint,.5, true);
    var temp:int=int(hittingMc.charAt(2));
    var tween5:Tween = new Tween (getChildByName (hittingMc), "x", Strong.easeOut, getChildByName (hittingMc) .x,xArr [temp],. 5, true);
    var tween6:Tween = new Tween (getChildByName (hittingMc), "y", Strong.easeOut, getChildByName (hittingMc) there,yArr [temp],. 5, true);
    hittingMc = draggedMc;
    } else {}
    var tween7:Tween = new Tween (getChildByName (draggedMc), "x", Strong.easeOut, getChildByName (draggedMc) .x, xEndPoint,.5, true);
    var tween8:Tween = new Tween (getChildByName (draggedMc), "y", Strong.easeOut, getChildByName (draggedMc) there, yEndPoint,.5, true);
    }
    }
        
        
        
    of other if(hittingMc == draggedMc) {}
    hittingMc = "";
    }
        
    else {}
    var tween9:Tween = new Tween (getChildByName (draggedMc), "x", Strong.easeOut, getChildByName (draggedMc) .x, xpos,.5, EU tr);
    var tween10:Tween = new Tween (getChildByName (draggedMc), "y", Strong.easeOut, getChildByName (draggedMc) there, ypos,.5, EU tr);
    }
    }

    Note: Once you drag the first position the xpos and ypos are updated to the item newly slipped. That's why itz to another location. Please copy and paste the code it works.

  • Right click mouse to drag and drop or rename folders and files does not work

    For a few weeks now, I had problems with the right click function to drag - move files and folders, or rename files and folders. This happens when I use windows Explorer or access to the computer and click thruogh for a feature. He can't go to all the folders and files, but many. I can't right click on these folders or files to change the sharing because explore closes and restarts on the desktop with a right-click. Manifest error "appcrash" reason. I have Norton Security suite installed and neither Norton or your fix program detects a problem.

    Please notify.

    awehnert

    Have you installed or removed/uninstalled all hardware or software or drivers since just before the start of this problem (if so, exactly what - name, version, device, whatever)?  Norton take any infection, although it is said that he cleaned their since just before the problem started?  If so, you know the names of these infections?

    Do you know when this problem started?  Try a system restore to a point in time BEFORE the problem started.  Here is the procedure: http://www.howtogeek.com/howto/windows-vista/using-windows-vista-system-restore/.  Don't forget to check the box to show more than 5 days of restore points.  If the first attempt fails, then try an earlier point or two.  NOTE: You will need to re - install any software and updates that you have installed between now and the restore point, but you can use Windows Update for updates.  It's been a while so I'm not sure that you have a fairly old restore point but it is possible - hopefully.

    Are these files and folders in your user profile?  If Yes, your user profile may become corrupted (in fact, if can still be corrupted if the folders are not there).  To fix this use http://windows.microsoft.com/en-AU/windows-vista/Fix-a-corrupted-user-profile.  If that is the only available Administrator Profile (you need to be an administrator to fix this), enable the Hidden Administrator Account (HAA) using http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.windows.vista.administration_accounts_passwords&p=1&tid=d20f9db4-7b2c-48be-a087-7835dc2a9055&mid=d20f9db4-7b2c-48be-a087-7835dc2a9055.  If you don't remember the password, try nothing because that's probably what you (or seller) did during the installation.  Once that is done, don't forget to disable the HAA to save it in case it is necessary once again and for safety reasons (since people often try to hack into systems using this account).  Do NOT use the HAA as your administrator account because if you lose the only administrator on the system account or it is damaged again, then you're watered.

    We will check some of your system files and hard drive for ccorruption that may be the cause:

    Go to start / all programs / accessories / command prompt and right click on command prompt, and then click Run as administrator.

    Type sfc/scannow, go and let it run.  It will scan and try to correct some of your system files.  If all goes well he comes complete with no corruption, it could not repair (if it has these post of corruption here or try to analyze it to find the problem or files using http://support.microsoft.com/kb/928228.  Try to put all the corrupt files here so that we can see if they can be repaired with good copies of the installation disc (unless there are too many).

    While in the command prompt, type chkdsk /f /r and enter and let it run.  She might want to plan itself to start at the next startup.  Okay, then restart so that the program can run. It will scan and attempt to resolve any corruption or bad sectors on your hard drive and remove especially as a potential cause.

    Please checkwith the manufacturer to find out if there is a mouse driver updated (software or firmware) available for your make and model of mouse and your version of Vista.  Download and install to update the driver to the most recent available and see if that solves the drag and drop problem (even though I know that this will not affect the question of the name change).  Once you have the drivers, you can install them via the Manager device as follows: http://www.vistax64.com/tutorials/193584-device-manager-install-driver.html.

    If it doesn't (or if SFC detects corruption it cannot repair), we you will need to do a repair/system upgrade using the Windows Vista Installation disc authentic (you own or that you can borrow from someone).  Here is the procedure: http://www.vistax64.com/tutorials/88236-repair-install-vista.html.  Although this will not affect your data, settings or programs, you should always back up your data before you start just be on the safe side. You can have a lot of updates to re - install (including all you need to remove service packs).  If the version of the system came with SP1 or SP2 preinstalled and the disc is an earlier version, then you will need to make a record of slipstream as follows: http://www.vistax64.com/tutorials/151606-vista-sp1-slipstream-installation-dvd.html.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Drag and Drop indicator of progress

    Hello everyone,

    I really hope to get help here:

    I did a fun quiz with a drag and drop slides (which works fine).

    The next slide after slide slide - déposer is a regular question slide. The problem is that the progress indicator (Question 1 of the XX)

    ignores the blade drag / move (I know that it is not a question slide to drag-n - déposer)

    Is it possible to add the progress to this slide indicator drag-and - déposer?

    I am the first and only one with this problem?

    Any help is appreciated.

    Greetings

    Panthalassa

    P.S. I use captivate 7 If this helps

    Hello

    No, you're not the first. I blog for a long time already on creating a custom progress indicator. The reason at that time was that he could not be located in this version, and I've created some custom question that slides get either the progress indicator. Now D & D is one of these. Take a look on:

    Custom indicator progress - Captivate blog

    If you're on CP7 or later, you can replace the tip by a joint action (easier to transfer to other projects) and I think that the statement of increment in the drop-down list advanced Actions was already available for 7. It can replace the Expression in the action described to increment the counter.

    Lilybiri

  • Error #1069: TextField drag and drop

    I created a clip I creates instances of the runtime by clicking on a button, these movieclips all have the anuee name # where # is the instance number.

    My problem is that the clip has a text box Dynamics slap in the middle of it that does not work with my drag and drop function. If I shake the cloud around the edges, drag drop works. If I click in the Middle it does not work and gives the following error in the output window

    ReferenceError: Error #1069: property not found dropTarget on flash.text.TextField and there is no default value for Suite_fla::MainTimeline/myDragHandler()

    Here is the myDragHandler function which only downwards click the Component Manager I have also a top manager who made stopDrag() but it's the same thing send me two errors for each click.

    function myDragHandler(event:MouseEvent):void
    {
    var object = event.target;
    object.startDrag ();
    };

    So I need to drag the clip even if the user clicks on the text in the middle of the box. Advice or advice is welcome.

    Thank you.

    in your loop where assign you event handlers, try to set the mouseChildren to false on the MovieClips bcloud property.

  • Drag-and-drop exercise

    I'm having problems with the drag and drop code. I think I have everything down to this line:

    20. assign the index zero of dropData to the property selectedRoom of the rf.

    I can get the property selectedRoom of the form with the id ' rf,: but I'm not sure what is meant by "zero index of dropData?

    I had the same problems, changed code in
    AdobeODT.mxml:

    1 make-dropdata object that can be linked, not local
    [Bindable]
    private var dropData:Object;
    and in the function doDragDrop(): dropData = new Object();

    2.

  • Drag and Drop exercise: buttons disappear

    Hello

    When I hit the button 'Send' an exercise slide / move quiz buttons 'Back', 'Reset' and 'Send' (that come automatically with the Drag and Drop exercise) disappear.

    Any idea what goes wrong?

    I see, in English these are the buttons cancel, restore, and submit. Only the last is really necessary. The other two buttons can be selected in the Actions tab, but are not mandatory.

    If you have kept the default settings, which means 1 attempt and the two actions on the success and failure are left to continue it is normal that all the buttons disappear after clicking on the submit button. They will also disappear when you gave a correct answer, even if efforts are not exhausted. They will remain on the slide when you have an incorrect answer and attempts are not exhausted: in this case, the buttons will remain and the legend of the failure appears. With undo the last action can be cancelled, with reset all sources of drag are returned to their original location. The two buttons are also active before the submission of the response.

    You can find more tips on D & D:

    http://blog.lilybiri.com/drag-and-drop-tips

    & Slipped in 2016 with Captivate 9 - Captivate blog

  • Drag and drop - lots of sources to a Drop target

    I have a D & D built scenario where I have 13 objects potential drag, enter a single drop zone. I have the set drop target to accept all the potential that they may all be considered "correct" its a learning experience, not a question of quiz, as well as several items can be deleted. I want to count to 5 and then offer the opportunity to continue to the next section.

    I wonder, to simply count items 5 (in any combination), I would just do a conditional action called "correct" and then set it to zero... and then when an article is accepted, a tip action sets 'proper' fix + 1. and then a conditional action would trigger the 'next' button and the message when correct was equal to 5?

    I did something similar from the selections with buttons, but not with the drag and drop. Does anyone have an overview of how to count the elements correctly deleted? When my account hits 5 fell, I want to bring up the 'Thank you now extend' option.

    Thanks in advance.

    JPM

    Hello

    It is a possible workflow, I used a tip action, but if you want to do this more than once, or to different numbers of counter, I propose to create a joint instead. Will try to explain my work flow (did not use the 13 7 do but drag sources, my account was created to3):

    1. Create a v_counter variable user, with the default value 0
    2. Create interaction D & D according to the normal procedure, BUT do not forget to assign a type to the drag_sources; that will make it easier not only to create the interaction (you need only a single link from 'type' to the target) to affect the action. I've created a «Ellips» type
    3. Create the message appears when the user drags the correct number of objects, and the next button, but both are invisible in the properties panel. I have marked their 'Star' (for the message) and BtNext
    4. Create an advanced (or shared action) which will be conditional with two decisions, the first decision is a Standard measure simulated to increment the counter. Then, check the meter and displays the message and button if the number is correct.
    5. Assign to this fast action to the action object column (see Format tab for the Actions of the object in case button you are on CP8) for the type.

    More tips for D & D: advice & glide - Captivate blog

  • I have problems with gmail with firefox. Refreshing page is slow; Drag and drop files in email sometimes do not work.

    My problem is mainly associated with gmail. When I click on return to the Inbox after reading a mail, it takes a good few seconds while in the past, it was always instant.

    My other problem is drag them / move the files as an attachment in gmail. Sometimes it won't work and I have to use the manual icon attaches trombone. However, if I restart firefox and re - connect to gmail, it will work again.

    I also noticed that when you drag an image in the mail window, it will not become an attachment, but it will appear instead. Is there a way where I can choose to have inserted images as attachments rather than displayed in the mail?

    Thanks for any advice you can give me.

    Hi Guigs2,

    Thanks for your advice. I'm not sure what will happen if I change my profile. I'm afraid I'll be somebody else for those who know me.

    So I decided to try the second option on the plugin check. After I clicked on the link the message says that my version of firefox is not the last. I've updated it and so far I don't have drag and drop the problem but we will give it some time and see. This problem does not occur all the time but it happened a few times, so I guess I should try it for a while.

    Thanks a lot for your advice

  • Problem with drag and drop multiple lines of ListView

    I work on an example application with 2 views of list that is the players and the team and implement drop and drop as players can be deposited to one list to the other. Everything works as expected when there is selection unique model is enabled in the source list view. However, if I have activated several model selection and drag 2 or more lines of source target list view list view, see the following exception after that the decline is over.

    Exception:

    java.lang.IllegalArgumentException: only objects serializable or ByteBuffer can be used as data with the format of data [subListPlayers]

    at com.sun.javafx.tk.quantum.QuantumClipboard.putContent(QuantumClipboard.java:513)

    at javafx.scene.input.Clipboard.setContent(Clipboard.java:230)

    (1) what should be the DataFormat used to be able to drag and drop multiple lines? Looks like we don't have for the type of object, so I created the following which does not solve the problem.

    private DataFormat dataFormat = new DataFormat ("subListPlayers");

    (2) I made changes to support serialization on the data object that seems no more to solve the problem. Tried by implementing the interface Serializable, as well as the implementation of the Externalize interface.

    Can someone Guide please if there is an easy way to implement this behavior?

    Code:

    
    

    public class player

    {

    private String name;

    public player (String name)

    {

    myIdName = name;

    }

    public String getName()

    {

    return the name.

    }

    public void setName (String name)

    {

    myIdName = name;

    }

    @Override

    public boolean equals (Object o)

    {

    If (this == o) return true;

    If (o == null | getClass()! = o.getClass ()) return false;

    A player = o (player);

    If (name! = null? name.equals (player.name): player.name! = null) return false;

    Returns true;

    }

    @Override

    public int hashCode()

    {

    return the name of! = null? name.hashCode (): 0;

    }

    }

    SerializableAttribute public class JavaFXDnDApplication extends Application

    {

    private final static ListView < drive > playersListView = new ListView < drive > ();

    private final static ObservableList < drive > /playerslist is FXCollections.observableArrayList ();.

    private final static ListView < drive > teamListView = new ListView < drive > ();

    private final static GridPane rootPane = new GridPane();

    private DataFormat dataFormat = new DataFormat ("subListPlayers");

    Public Shared Sub main (String [] args)

    {

    Launch (args);

    }

    @Override

    public void start (point primaryStage)

    {

    primaryStage.setTitle ("Drag and Drop Application");

    initializeComponents();

    initializeListeners();

    buildGUI();

    populateData();

    primaryStage.setScene (new scene (rootPane, 400, 325));

    primaryStage.show ();

    }

    Private Sub initializeListeners()

    {

    playersListView.setOnDragDetected (new EventHandler < MouseEvent >)

    {

    @Override

    public void handle (event MouseEvent)

    {

    System.out.println ("setOnDragDetected");

    Dragboard dragBoard = (TransferMode.MOVE) playersListView.startDragAndDrop;

    ClipboardContent content = new ClipboardContent();

    content.putString (playersListView.getSelectionModel () .getSelectedItem () .getName ());

    Content.put (dataFormat, playersListView.getSelectionModel () .getSelectedItems ());

    dragBoard.setContent (content);

    }

    });

    teamListView.setOnDragOver (new EventHandler < DragEvent >)

    {

    @Override

    public void handle (DragEvent dragEvent)

    {

    dragEvent.acceptTransferModes (TransferMode.MOVE);

    }

    });

    teamListView.setOnDragDropped (new EventHandler < DragEvent >)

    {

    @Override

    public void handle (DragEvent dragEvent)

    {

    String player = dragEvent.getDragboard () .getString ();

    ObservableList < drive > drive = dragEvent.getDragboard () .getContent (dataFormat) (< drive > ObservableList);

    String player = dragEvent.getDragboard () .getString ();

    teamListView.getItems () .addAll (New Player (player));

    playersList.remove (new Player (player));

    dragEvent.setDropCompleted (true);

    }

    });

    }

    Private Sub buildGUI()

    {

    rootPane.setGridLinesVisible (true);

    rootPane.setPadding (new Insets (10));

    rootPane.setPrefHeight (30);

    rootPane.setPrefWidth (100);

    rootPane.setVgap (20);

    rootPane.setHgap (20);

    rootPane.add (playersListView, 0, 0);

    rootPane.add (teamListView, 1, 0);

    }

    Private Sub populateData()

    {

    () playersList.addAll

    New Player("Adam"), New Player("Alex"), Player ("Alfred") New Player("Albert") new,.

    New Player("Brenda"), New Player("Connie"), Player ("Derek") new new Player ("Donny").

    Player ("Lynne") new, New Player ("Myrtle"), Player ("pink") New Player("Rudolph") new,.

    Player("Tony") new, New Player ("Trudy"), Player ("Williams") New Player ("Zach") new

    );

    playersListView.setItems (playersList);

    }

    Private Sub initializeComponents()

    {

    playersListView.setPrefSize (250, 290);

    playersListView.setEditable (true);

    playersListView.getSelectionModel () .setSelectionMode (SelectionMode.MULTIPLE);

    playersListView.setCellFactory (new reminder < < drive > ListView, ListCell < drive > > ())

    {

    @Override

    public call for ListCell < drive > (ListView < drive > playerListView)

    {

    return again ListCell < drive >)

    {

    @Override

    protected void updateItem (player, boolean b)

    {

    super.updateItem (reader, b);

    If (player! = null)

    {

    setText (player.getName ());

    }

    }

    };

    }

    });

    teamListView.setPrefSize (250, 290);

    teamListView.setEditable (true);

    teamListView.getSelectionModel () .setSelectionMode (SelectionMode.MULTIPLE);

    teamListView.setCellFactory (new reminder < < drive > ListView, ListCell < drive > > ())

    {

    @Override

    public call for ListCell < drive > (ListView < drive > playerListView)

    {

    return again ListCell < drive >)

    {

    @Override

    protected void updateItem (player, boolean b)

    {

    super.updateItem (reader, b);

    If (player! = null)

    {

    setText (player.getName ());

    }

    }

    };

    }

    });

    }

    }

    
    

    Yes, it is a pain. I filed https://javafx-jira.kenai.com/browse/RT-29082 earlier. Go ahead and vote in favour if you're inclined...

    I think that the problem in your case, it is the observable list provided by MultipleSelectionModel.getSelectedItems () is not serializable. So even if you make your player Serializable class, the list is not. The first thing I would try, I think, is to make player implements Serializable and pass in an ArrayList instead of the observable list. If you can do

    content.put(dataFormat, new ArrayList(playersListView.getSelectionModel().getSelectedItems()));
    

    and

    List player = (List) dragEvent.getDragboard().getContent(dataFormat);
    teamListView.getItems().addAll(player);
    

    If it does not, a solution is simply to store the "slipped" into a property list:

    final ListProperty draggedPlayers = new SimpleListProperty();
    //...
    // Drag detected handler:
    content.putString("players");
    draggedPlayers.set(playersListView.getSelectionMode().getSelectedItems());
    
    // Drag dropped handler:
    if (dragboard.hasString() && dragboard.getString().equals("players")) {
         teamListView.getItems().addAll(draggedPlayers.get());
         draggedPlayers.set(null);
    }
    

Maybe you are looking for