Legend 1 success for multiple targets in a Drag and Drop Interaction

I can't see how I can add legends of success to each target in an interaction drag-and - drop, but you can apply only 1 legend success multiple targets?

  1. The limits of smartshapes are overlapping with each other. For example, the smartshape on the 1st line was overlapped with the one on the 2nd line. For this reason, whenever you place the text of the 'Investment' legend on the smartshape on the 2nd line, it automatically moved to the smartshape on the 1st line. As a result, you could never get the right answer, and where you've ever seen the legend of success.

Solution: Move the smartshapes another (or resize them) and make sure that there is no overlap.

2, the number of attempts for this interaction has been on infinity. So, you have to play it until you get it right, but could not qualify because of the mention of the reasons above. That's why you have never seen the legend of failure.

Solution: Disable the infinite in the accordion of Action and specify the required number of attempts. You will get the legend of failure if you don't get it right in these attempts.

I just tested these solutions and it worked fine. Let me know if you still face problems.

Tags: Adobe Captivate

Similar Questions

  • Text comments for support of Drag and Drop Interaction

    I developed a drag and drop interaction that works well, the problem is with the behavior of the reset button send.

    If the objects of slide 'proper' are on the 'right' target - no problem

    The problem is if a combination of drag-and-drop 'wrong' is selected, displays the text 'wrong' feedback and the reset button moves all drag the object to the starting position, but once that the 'good' drag drop combination is submitted, the 'wrong' feedback text appears.

    The fla is available here: skydrive.live.com/?cid=bb539b6eff0afbf5 & sc = documents & uc = 1 & id = BB539B6 EFF0AFBF5% 21114 #

    Thanks in advance for any help/suggestions, you can provide and for taking the time to read this post

    The corresponding code is:

    Section 1:

    ActionScript code:

     

    function dragSetup(clip, targ) { clip.onPress = function() { startDrag(this); this.beingDragged=true; }; clip.onRelease = clip.onReleaseOutside=function () { stopDrag(); this.beingDragged=false; if (eval(this._droptarget) == targ) { this.onTarget = true; _root.targ.gotoAndStop(2); } else { this.onTarget = false; _root.targ.gotoAndStop(1); } }; //the variables below will store the clips starting position clip.myHomeX = clip._x; clip.myHomeY = clip._y; //the variables below will store the clips end position clip.myFinalX = targ._x; clip.myFinalY = targ._y; clip.onEnterFrame = function() { //all these actions basically just say "if the mouse is up (in other words - the clip is not being dragged) // then move the MC back to its original starting point (with a smooth motion)" if (!this.beingDragged && !this.onTarget) { this._x -= (this._x-this.myHomeX)/5; this._y -= (this._y-this.myHomeY)/5; //if the drag object is dropped on any part of the target it slides to the center of the target } else if (!this.beingDragged && this.onTarget) { this._x -= (this._x-this.myFinalX)/5; this._y -= (this._y-this.myFinalY)/5; } }; } dragSetup(drag1,drop1); dragSetup(drag2,drop2); dragSetup(drag3,drop3); dragSetup(drag4,drop4); dragSetup(drag5,drop5); dragSetup(drag6,drop6); dragSetup(drag7,drop7);

     

    on the submitBtn:

    ActionScript code:

     

    on (press) {     if ((_root.drag1._droptarget == "/drop1") &&         (_root.drag2._droptarget == "/drop2") &&         (_root.drag3._droptarget == "/drop3") &&         (_root.drag4._droptarget != "/drop4") &&         (_root.drag5._droptarget != "/drop5") &&         (_root.drag6._droptarget != "/drop6") &&         (_root.drag7._droptarget != "/drop7"))     {         {             resetBtn.enabled = false;         };         {             feedbackTxt = "Yes, hardware installation, asset tagging and imaging are the best services to recommend to help your customer meet her deadline.";         };         {             drag1.enabled = false;             drag2.enabled = false;             drag3.enabled = false;             drag4.enabled = false;             drag5.enabled = false;             drag6.enabled = false;             drag7.enabled = false;         };     }     else     {         feedbackTxt = "Not quite.  At least one of services you chose isn't the best recommendation, or you did not chose all of the correct services.  Consider your customers business needs, click Reset and try again.";         gotoAndPlay("Scene 1", 1);     } }

     

    on the resetBtn:

    ActionScript code:

     

    //this code controls the reset button function and returns all of the drag objects to the start position. on(Press) {  drag1.onTarget=false; drag1._x = drag1.myHomeX; drag1._y = drag1.myHomeY;  drag2.onTarget=false; drag2._x = drag2.myHomeX; drag2._y = drag2.myHomeY;  drag3.onTarget=false; drag3._x = drag3.myHomeX; drag3._y = drag3.myHomeY;  drag4.onTarget=false; drag4._x = drag4.myHomeX; drag4._y = drag4.myHomeY;  drag5.onTarget=false; drag5._x = drag5.myHomeX; drag5._y = drag5.myHomeY;  drag6.onTarget=false; drag6._x = drag6.myHomeX; drag6._y = drag6.myHomeY;  drag7.onTarget=false; drag7._x = drag7.myHomeX; drag7._y = drag7.myHomeY;  feedbackTxt = ""}

     

    include your onTarget in the if statement, not only 3 of them.

  • How can I register a message of success to a drag and drop interaction - I don't see this option in the Actions on the possibilities of success and it cannot know?

    How can I register a message of success to a drag and drop interaction - I don't see this option in the Actions on the possibilities of success and it cannot know?

    Hide you this way:

  • Virtual PC for Windows 7 - How to drag-and - drop or transfer files

    I am trying to use Virtual PC for Windows 7 and be able to identify ways to transfer files from my host system in a virtual PC, I created.

    I was previously using Virtual PC (VPC) 2007 under Vista and am familiar with just the files dragging and droping to and from my host on the virtual computer system.

    I enabled the integration services and am unsure of what the user really wants that the VPC. that is he doesn't want configure me a Local user on the virtual machine or the host.

    I was able to connect to the virtual computer by using a local user on the computer virtual account, but for the life of me can not find out how to transfer files that I used to.

    To achieve what I need, I copy files to a shared location on my network as my PC and the virtual computer has access.

    Can anyone suggest how to get the 'integration' works correctly then drag and drop files between the Bureau of the VPC and host is possible.

    Thank you.

    Integration features allows the WVPC7 to share resources and readers. Open the virtual machine settings, and these options are available:

    1. Audio. Without integration, sounds played inside the virtual machine are emulated using a SoundBlaster 16 card. Audio output is fairly shrill and unpleasant to play using MP3s that imitated the sound card. With audio integration, sounds inside the VM are routed via Protocol Office remotely to your physical card. Audio output will be much better.
    2. Clipboard. Host OS and guest OS supported can share contents of the Clipboard.
    3. Printer. Applications within the virtual machine can print using your physical printer. This is useful if you have a parallel printer (LPT1). For USB printers, click on the "USB" menu on the toolbar of the virtual machine monitor, then attach your USB printer to your virtual machine.
    4. Smart cards. (I do not have any device of smart card, experts, please answer)
    5. Readers. Guest operating system can access and write files directly to your physical hard disks (or DVD or USB flash disk drive); is based on the physical disks, you have shared.

    For drag / drop, until today (2 July here) does not. I used to drag-and - drop files from my desktop windows vista to the desktop of the virtual machine (windows XP inside) you do, but now we can't. Another approach is to share your disks in has integration of options described above.

    After I shared my C: drive, a new 'shared' drive appeared in my virtual Windows XP [workstation], which is 'C on RYAN-PC' (the name may be different on your PC). Whenever I need to copy some files from my virtual computer on the desk of my windows 7, I just opened that shared drive, navigate to \\tsclient\C\Users\Ryan\Desktop\, copy the files and they come to my office windows 7.

    Personally I agree that even this method is simpler that the copy of the shared network files, drag-and - drop is much easier.

  • Captivate 8 Drag and Drop several legends of text for your comments

    Hello

    I am creating an interaction with an element with which the learner can drag for four different images representing the different categories of data classification.  The idea of the interaction is for the learner to discover each of the four different categories, by trial and error.    I want them to provide comments through text captions that the answer is right or wrong, but each piece of comments will be different and the user should be able to drag the item several times until they found the right answer.  I can't fwork how to do this.

    I just upgraded to Captivate 8 week last, after having previously used Captivate 5.   Therefore, I've never used the installation drag - d├⌐poser and I don't know if he's going to do what I'm trying to achieve or if it's something I could achieve with shares advanced instead, or if it is not possible to do. I tried searching for similar topics, but either did not understand the answer or scenarios seemed different.  I don't really know where everything is still 8 Captivate, and while I have used certain actions in Captivate 5 tip, I'm not that comfortable with them, so simple is good.  The interaction doesn't have to be reported on.

    Is anyone able to help me please?

    Thanks in advance for your help.

    Hello

    According to my understanding, you have a source element that can drag and drop on 4 different targets (different images). For every drop of a sort of legend should appear on stage the feedback to the corresponding user from the target source. (Correct me if I'm wrong)

    This can be achieved with Drag and drop interaction.

    1. Insert the source 4times and overlap each other (since you can drag and drop 1 number 4 times, you must have this element to work as a source of slippage 4 up to 4 items).

    2. make the 4 elements as drag source and group them into a single type. (With the help of add option)

    3. you have your 4 images on stage and Mark as targets of drag.

    4. Insert the rear power legends and put them near their targets. Disable their 'Visible output' flag on Bill pro forma.

    5. now match the Correct ANS on stage.i.e of one of the source type to a target correct years.

    6. Select each target and open their box "Actions of the object". (from Panel drag / move)

    7. uncheck the ' accept all the ' option and the value of count 1. Add the action of 'travel' to show their legends of Feedback now under Drag source Type. (which were hidden). This should be through "Advanced Actions.

    8. now after for each target open the dialog box 'Good years' drag and drop the Panel. (it will be under options and so visible from the source or target is selected)

    9. here under the table, you can see that the value of count is 4. This is to reduce the value to 1. (double-click to change)

    Interaction is now ready. Please don't answer if that's what you wanted to achieve and if you do all the steps above.

    Derrick

  • Drag and Drop Hide Source of success

    Hi, I created a multiple source target Drag and Drop Interaction.

    It works great except for advanced behavior, I want to take place.

    I want to give the impression that my source objects 'disappear' (hide) after I drag them successfully to the right target; How can I go about it?

    Several possibilities. Select the target object, and you will see the options for snapping behavior in the D & D Panel. You can reduce the drag source objects by changing the size, you can make their get Alpha to 0% to make them transparent, or you can let them disappear behind, by choosing back instead of the Front. Look at this screenshot, I indicated the three places, but it is not defined on 0% transparency or very small.

    You don't say what should happen with the non-correct do drag sources? You should have them abruptly back and forth, by editing the sources accepted in the Actions of the object that you can open from the same place for each target dialog.

  • Correct answers for drag and drop dialog box

    I'm trying to get a better handle on the different options for drag and drop interactions.

    The right answers dialog box is used only for the edition of the correct answers after a drag and drop interaction has already been created?

    What does the column 'Number' and what is its purpose?

    Hi jay,.

    With the correct answers dialog box, you can get the following,

    1. can I change the answers correct configured.

    2. can define several correct answers to the same question.

    3. can we do good response as a 'combination', or a sequence

    The "count" column allows you to set the correct answer in the following scenario.

    Suppose you have a bunch of oranges (Say 12) while sources drag on and a fruit basket is in the form of the target, and the question is to drag and drop five oranges in the fruit basket; Then, you can configure a drag and drop interaction as follows,

    1. Select all the oranges, mark them as source and add them to the custom type orange

    2. mark "Basket of fruit" as target.

    3. create a correct answer between the oranges and the basket link.

    Now when you open the correct answers dialog box, it shows the correct answer as follows.

    Orange > basketball > 12 fruits.

    You can change the number of 5, the question being 'Drag and Drop five oranges' at the fruit basket.

    I hope this helps.

    Thank you

    VERALINE Sukumaran.

  • On the legend of rejection only appear not in the interaction drag and drop

    Hello

    I'm playing with drag and drop interaction to understand its functionality.

    I noticed that we can accept, reject and hint captions to individual moving targets. When I tested it, I Accept and indication of the legends as expected. But I don't get the legend to reject even when I place the wrong source on the target.

    What I am doing wrong?

    Anthony

    Hello

    Dismiss the legend appears when an unacceptable source fell on a target. To configure the "acceptance criteria", select a drop target, click on 'Accept' button, deselect the checkbox corresponding to the unacceptable source. (As shown below)

    Now each time the drop source user 'Unaccept' on top of the target, the legend of "Reject" will appear.

    Thank you

    VERALINE Sukumaran.

  • Drag and drop the text on the target

    I am changing a drag and drop interaction in Captivate 9 included in a Starter of course downloaded from the e learning brothers. I've renamed the source text, but when it reaches the correct destination, he returned to the original text "Answer 1". Where can I change the text of the button when it is properly recognized destination.

    Please see the icons present tutorial in the Captivate welcome screen.

    Image attached for reference.

    Click on the computer icon and you can find examples of projects and tutorials of every new feature implemented.

    Thank you

    Derrick

  • 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;

  • MovieClip only, Drag and Drop to multiple targets

    So I've been sitting for the last few hours trying to search the Web for solutions to be able to drag and drop a MovieClip between multiple targets. I have no idea and I am struggling to find something that will help me with this. This is for a class assignment slide / move and I would like to help, please let. This is the general pattern.

    The scene is a multiple-choice questionnaire. There are 3 statements aligned next to 3 boxes, these are my targets. A movieclip appears in the corner, that's the question I want to activate him drag / drop in one of the 3 targets. These targets are named separately as target1_mc, target2_mc and target3_mc. The movieclip that is the 'selector' for the multiple choice is named selector_mc.

    I only know the basic drag and drop the script that has been taught in class, but it's only for one target, not 3. A picture has been provided below. Again, selector_mc is the blue square in the upper part of the screen. Targets (target1_mc, target2_mc, target3_mc) are on the right side of the screen. I want to leave this blue square to be able to drag and drop on targets and areas nod to one of them, invoking a response to it.

    Capture.PNG

    selector_mc.origX = selector_mc._x;

    selector_mc.origY = selector_mc._y;

    {selector_mc.onPress = Function ()}

    this.startDrag ();

    }

    {selector_mc.onRelease = Function ()}

    this.stopDrag ();

    {if (Eval (this._droptarget) == target1_mc)}

    do something. Red Dragon has been selected

    This ._x = target1_mc._x;

    This ._y = target1_mc._y;

    } else

    {if (Eval (this._droptarget) == target2_mc)}

    do something. White Dragon has been selected

    This ._x = target2_mc._x;

    This ._y = target2_mc._y;

    } else

    {if (Eval (this._droptarget) == target3_mc)}

    something.blackdragon has been selected

    This ._x = target3_mc._x;

    This ._y = target3_mc._y;

    } else {}

    all lack em

    This ._x = this.origX;

    This ._y = this.origY;

    }

    }

  • Drag and drop, 1 share of different sur-succes drag Source, 4 Drop target, for each. Is this possible?

    Hello.

    I created an infographic of type board game and wants that the participant to be able to enter the game room, then drop it into different spaces on the Board, each holding to another slide. I need interaction drag - déposer so that they can pick up and drop the piece. Now, what I need is for each target to have a different action, but even if I add each one to a different group, if I change an action for one, that it applies the change to all drop targets.

    Is there a way to get around this?

    In addition, once / if possible, I would like to add a "back button" on each of these slides and would need when the participant returns to the boardgame slide, they can move the piece to a different drop target to read the following description. I think that the best way to do this would be to make all the "wrong" answers, while the game piece is not stuck once they have fell on a drop target "correct." Please correct me if I'm wrong.

    If I understand you correctly, I think that I thought about it.

    1. Create your Drag and Drop, as you would normally
    2. In the Panel of Drag and Drop, select the Options tab
    3. Click on the button set the correct answers
    4. The value of each drop target to have the source of displacement of the source (you must choose the sequence in the Type drop-down list)
    5. Create the slides that you want to display for each drop target
    6. Select one of the drop targets
    7. Go to the Format of the Panel Drag and Drop tab
    8. The Actions of the object... a button click
    9. In the action column, select go to slide, and then select the appropriate slide
    10. Repeat steps 6 through 9 for each target deposit
    11. Overview of the project

    I did a quick test and it seemed to work according to the settings you said earlier.

  • 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);
    }
    
  • Drag and drop them into simple errors of target, expecting identifier?

    IM creating a drag and drop. pass a guitarest name to a dragging for example, target a movieclip called slash to a dynamic text box called box_slash this is my code and I get 2 silly mistakes, but have been up all night and he can not know!

    flash cs5 actionscript 3, this is the code for actionscript3 I found the basis for him here: http://edutechwiki.unige.ch/en/Flash_drag_and_drop_tutorial any help would be amazing for a transfer and im new to Flash

    var = 0 hits;

    Registry of the mouse event functions

    slash.addEventListener (MouseEvent.MOUSE_DOWN, mouseDownHandler);

    slash.addEventListener (MouseEvent.MOUSE_UP, mouseUpHandler);

    clapton.addEventListener (MouseEvent.MOUSE_DOWN, mouseDownHandler);

    clapton.addEventListener (MouseEvent.MOUSE_UP, mouseUpHandler);

    hendrix.addEventListener (MouseEvent.MOUSE_DOWN, mouseDownHandler);

    hendix.addEventListener (MouseEvent.MOUSE_UP, mouseUpHandler);

    Set a mouse down Manager (the user is dragging)

    function mouseDownHandler(evt:MouseEvent):void {}

    var object = evt.target;

    We have to limit them by dragging to the area inside the canvas

    object.startDrag ();

    }

    function mouseUpHandler(evt:MouseEvent):void {}

    var obj = evt.target;

    obj.dropTarget will give us the reference to the form of

    the object on which we have abandoned the circle.

    var target = obj.dropTarget;

    If the target object is the we ask the test_match function

    compare moved obj, and target where he was abandoned.

    If (target! = null)

    {

    test_match (target, obj);

    }

    obj.stopDrag ();

    }

    function test_match (target, obj) {}

    test if one of the four pairs match

    If ((cible == box_slash & & obj == slash) |)

    (target == box_clapton & & obj == clapton) |

    (cible == box_hendrix & & obj == hendrix) |)

    {

    We got a great success

    Hits = hits + 1;

    textField.text = "" OK! :) ";"

    make the object transparent

    obj.Alpha = 0.5;

    kill its event listeners - object cannot be moved more

    obj.removeEventListener (MouseEvent.MOUSE_DOWN, mouseDownHandler);

    obj.removeEventListener (MouseEvent.MOUSE_UP, mouseUpHandler);

    Test if we are done

    If (hits is 3)

    {

    textField.text = "well done";

    }

    }

    on the other

    {

    textField.text = ' bad!:(";).

    }

    }

    errors are: I've highlighted lines

    Scene 1, Layer 'Actions', frame 1, line 391084: syntax error: expecting rightparen before leftbrace.
    Scene 1, Layer 'Actions', frame 1, line 381084: syntax error: expecting identifier before rightparen.

    sprites and movieclips can be dragged/dropped, not simple buttons.

    use a movieclip button (so you can use startDrag with it) or use an enterframe loop that causes your easy button to use the mouse (which resembles a startDrag).

  • Several Drag and Drop, several targets. CS5

    Hello:

    I do a Multiple of Drag and Drop in several objectives educational puzzle for child 6-7 years trying to teach them a little on which plants grow in environments in the country. So I have a map of the Mexico divided into 3 different areas: desert, forest and tropic and 6 different plants (3 different groups: cactus, pine and tropical flowers, 2 of each) scattered across the stage and around the map. The goal is for children to put plants in the box to the right and then click on "check" button, which triggers a validation process. Each video clip of the plant has 2 frames with a stop(); action on all: the graph of the plant extends on both images and the second picture has a red sign error graphic that indicates an error occurred (if this is the case). Then the validation process triggered by the "check" button is supposed to move the playback cursor in each placed wrongly move clip factory for the second image to show what plants are displaced and move the playhead of the main timeline to a picture that contains a "Please try again" text and a button "restart Puzzle." If the answers are good, an animation plays saying it was VERY WELL DONE! .

    I searched the Internet for some tutorials and found a file which is pretty close to what I need. I tried to adapt the code to my puzzle but failed miserably. The file is here if you want to check (scroll to the bottom of the page, it is called Soldier.fla). I'm not sticking the code here because it is VERY long, but I will if necessary. If you want that I download the files somewhere else and link them here, I will. If you need me to send them, I'll be happy.

    Here is the structure and instance names in my file:

    Departure:

    -Intro animation

    Map:

    -3 video clips: target_1, target_2 and target_3.

    -Each movie clip has two executives with a stop(); action on each.

    -Each movie clip has a frame-by-frame with a color change to show when a clip of plant fell on her.

    Plants:

    -6 video clips: drag_1, drag_2, drag_3, drag_4, drag_5 and drag_6.

    -Each movie clip has two executives with a stop(); action on each.

    -Each video clip has an invisible button in its background layer called dragbutton1 to dragbutton6 respectively.

    -In the second frame of each clip, I placed a sign of error to be displayed when the boy dropped the clip in the wrong target.

    Placement:

    -video clips drag_1 and drag_3 must be embedded in the target_1.

    -video clips drag_2 and drag_4 must be embedded in the target_2.

    -video clips drag_5 and drag_6 must be embedded in the target_3.

    Buttons:

    -Puzzle AutoScan: main playhead moves to an image named 'play '. It shows after the Intro animation.

    -Check the button: Validation process. If there is any mistakes sends the playhead to main to a named 'wrong' image (here is the text of "Please try" again). If there is no error, sends the playhead to main to a framework called 'good' where begins the animation "Very well done". It shows when start the puzzle.

    -Restart the Puzzle button: moves the main playback head to frame of 'Play '. It shows when start the puzzle.

    -Start button: just restarts. It shows after "Very well done" animation.

    Phew, it was long!

    Now, I'm not a programmer, I'm a designer. I can do buttons and other small things very simplistic but it's just out of my League. Programmers do things my office like PHP (Wordpress, Joomla), a few JS and things like that, but they don't do any ActionScript. They are trying to help but let drop the ball and I tried to understand this since Friday (I took this as a challenge and he lost). The customer wants in AS2, but if you can help me in AS3, screw the customer!

    If one of you can help me with the code, or point me to the right place, I'll be in debt to you. Forever.

    Thank you very much.

    This is a typo and should be:

    var dragA:Array = [drag_1, drag_2, drag_3, drag_4, drag_5, drag_6];

    for (var i: Number = 0; i<>

    [i] dragA dragA [i] ._x = .startX;

    [i] dragA .startY dragA [i] ._y =

    If (i == 0 |) I == 2) {}

    dragA [i] .target = target_1;

    } else if (i == 1 |) I == 3) {}

    Dropped [i] .target = target_2;

    } else {}

    Dropped [i] .target = target_3;

    }

    {dragA [i] .onPress = function ()}

    this.startDrag ();

    }

    dragA [i] .onRelease = function () {}

    this.stopDrag ();

    checkTarget (this);

    }

    }

    function checkTarget(drag_mc:MovieClip):Void {}

    {if (drag_mc. HitTest (drag_mc. Target))}

    feedback. Text = "done Well! »

    } else {}

    feedback. Text = "Missed";

    drag_mc._x = drag_mc.startX;

    drag_mc._y = drag_mc.startY;

    }

Maybe you are looking for