Drag and Drop Labels with line interconnected

Dear all,
As before, I use java.awt.dnd objects and java.awt.datatransfer objects to help me to drag and drop some labels with right-click my mouse.
Now I would like to left-click my mouse to draw a line between the two labels by pressing the left-click on label 1 and drag and drop to label 2. Then I would like to see a now line created betwwen label 1 and 2. I have an idea to addMouseListener and addMouseMotionListener on the labels to get the position of the labels and draw a line with the position. But I found that both right-click and left-click can trigger this event. Can I give some restriction on that so only left-click can trigger this event.
Also I cannot do it successfully as I found that after I rewrite the paintComponent method, the older image cannot be cleared and make the screen become verbose. Do I missing something on rewrite the paintComponent method? Also do you have any other suggestion on the task of drawing a line between the 2 labels?
Thanks a lot!
Peter

Of course you can select only left click events :
You simply add a test like that in your Mouse(Motion)Listener's methods :
if (SwingUtilities.isLeftMouseButton(aMouseEvent)) {
I hope this helps,
Denis

Similar Messages

  • Drag and Drop objects with JavaFX properties

    Has anyone tried to implement drag and drop functionality with objects containing JavaFX properties? The issue I'm running into is that the objects appear to need to be serializable, and the JavaFX properties are not serializable. I can implement Externalizable instead of Serializable, and basically serialize the values contained by the FX properties, but of course I lose any bindings by doing this (as the listeners underlying the bindings are not serialized).
    The [url http://docs.oracle.com/javafx/2/api/javafx/scene/input/Clipboard.html]javadocs for Clipboard state "In addition to the common or built in types, you may put any arbitrary data onto the clipboard (assuming it is either a reference, or serializable. See more about references later)" but I don't see any further information about references (and at any rate, this doesn't really make sense since anything that's serializable would be a reference anyway). Is there a special DataFormat I can use to specify a reference in the local JVM so the reference gets passed without serialization?
    I know this might not make sense without a code example; I just thought someone might have come across this closely enough to recognize the problem. I'll try to post a code example tonight...

    Here's pretty much the simplest example I can come up with. I have a real-world example of needing to do this, but the object model for the real example is quite a bit more complex.
    For the toy example, imagine we have a list of projects, some employees, and we want to assign each project to one or more employees. I have a Project class with a title and assignee. (In real life you can imagine other properties; due date, status, etc.) I'll keep a ListView with a bunch of unassigned projects (titles but assignees equal to null) and then a ListView for each of the employees.
    To assign a project to an employee, the user should be able to drag from the "master" list view to one of the employee list views. When the project is dropped, we'll create a new project, set the assignee, and bind the title of the new project to the title of the project which was dragged. (Remember we want to be able to assign a single project to multiple employees.)
    So here's the first shot:
    A couple of simple model classes
    Project.java
    import java.io.Externalizable;
    import java.io.IOException;
    import java.io.ObjectInput;
    import java.io.ObjectOutput;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.beans.property.StringProperty;
    public class Project {
         private final StringProperty title ;
         private final ObjectProperty<Employee> assignee ;
         public Project(String title) {
              this.title = new SimpleStringProperty(this, "title", title);
              this.assignee = new SimpleObjectProperty<Employee>(this, "assignee");
         public Project() {
              this("");
         public StringProperty titleProperty() {
              return title ;
         public String getTitle() {
              return title.get() ;
         public void setTitle(String title) {
              this.title.set(title);
         public ObjectProperty<Employee> assigneeProperty() {
              return assignee ;
         public Employee getAssignee() {
              return assignee.get();
         public void setAssignee(Employee assignee) {
              this.assignee.set(assignee);
         @Override
         public String toString() {
              String t = title.get();
              Employee emp = assignee.get();
              if (emp==null) {
                   return t;
              } else {
                   return String.format("%s (%s)", t, emp.getName()) ;
    }Employee.java
    import java.io.Externalizable;
    import java.io.IOException;
    import java.io.ObjectInput;
    import java.io.ObjectOutput;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.beans.property.StringProperty;
    public class Employee {
         private StringProperty name ;
         public Employee(String name) {
              this.name = new SimpleStringProperty(this,"name", name);
         public StringProperty nameProperty() {
              return name ;
         public String getName() {
              return name.get();
         public void setName(String name) {
              this.name.set(name);
    }and the application
    DnDExample.java
    import javafx.application.Application;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.ListCell;
    import javafx.scene.control.ListView;
    import javafx.scene.control.TextField;
    import javafx.scene.input.ClipboardContent;
    import javafx.scene.input.DataFormat;
    import javafx.scene.input.DragEvent;
    import javafx.scene.input.Dragboard;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.input.TransferMode;
    import javafx.scene.layout.HBox;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class DnDExample extends Application {
         private static final DataFormat PROJECT_DATA_FORMAT = new DataFormat("com.example.project"); // is there something special I can use here?
         @Override
         public void start(Stage primaryStage) {
              final HBox root = new HBox(5);
              final ListView<Project> allProjects = new ListView<Project>();
              final Employee fred = new Employee("Fred");
              final Employee ginger = new Employee("Ginger");
              final ListView<Project> fredsProjects = new ListView<Project>();
              final ListView<Project> gingersProjects = new ListView<Project>();
              final VBox employeeLists = new VBox(5);
              employeeLists.getChildren().addAll(new Label("Fred's Projects"), fredsProjects, new Label("Ginger's Projects"), gingersProjects);
              root.getChildren().addAll(allProjects, employeeLists);
              allProjects.setCellFactory(new Callback<ListView<Project>, ListCell<Project>>() {
                   @Override
                   public ListCell<Project> call(ListView<Project> listView) {
                        return new AllProjectListCell();
              allProjects.setEditable(true);
              final EventHandler<DragEvent> dragOverHandler = new EventHandler<DragEvent>() {
                   @Override
                   public void handle(DragEvent dragEvent) {
                        if (dragEvent.getDragboard().hasContent(PROJECT_DATA_FORMAT)) {
                             dragEvent.acceptTransferModes(TransferMode.COPY);
              fredsProjects.setOnDragOver(dragOverHandler);
              gingersProjects.setOnDragOver(dragOverHandler);
              fredsProjects.setOnDragDropped(new DragDropHandler(fred, fredsProjects.getItems()));
              gingersProjects.setOnDragDropped(new DragDropHandler(ginger, gingersProjects.getItems()));
              allProjects.getItems().addAll(new Project("Implement Drag and Drop"), new Project("Fix serialization problem"));
              Scene scene = new Scene(root, 600, 400);
              primaryStage.setScene(scene);
              primaryStage.show();
         public static void main(String[] args) {
              launch(args);
         private class DragDropHandler implements EventHandler<DragEvent> {
              private final Employee employee ;
              private final ObservableList<Project> itemList;
              DragDropHandler(Employee employee, ObservableList<Project> itemList) {
                   this.employee = employee ;
                   this.itemList = itemList ;
              @Override
              public void handle(DragEvent event) {
                   Dragboard db = event.getDragboard();
                   if (db.hasContent(PROJECT_DATA_FORMAT)) {
                        Project project = (Project) db.getContent(PROJECT_DATA_FORMAT);
                        Project assignedProject = new Project();
                        assignedProject.titleProperty().bind(project.titleProperty());
                        assignedProject.setAssignee(employee);
                        itemList.add(assignedProject);
         private class AllProjectListCell extends ListCell<Project> {
              private TextField textField ;
              private final EventHandler<MouseEvent> dragDetectedHandler ;
              AllProjectListCell() {               
                   this.dragDetectedHandler = new EventHandler<MouseEvent>() {
                        @Override
                        public void handle(MouseEvent event) {
                             Dragboard db = startDragAndDrop(TransferMode.COPY);
                             ClipboardContent cc = new ClipboardContent();
                             cc.put(PROJECT_DATA_FORMAT, getItem());
                             db.setContent(cc);
                             event.consume();
                   this.setEditable(true);
              @Override
              public void updateItem(final Project project, boolean empty) {
                   super.updateItem(project, empty);
                   if (empty) {
                        setText(null);
                        setGraphic(null);
                        setOnDragDetected(null);
                   } else if (isEditing()) {
                        if (textField != null) {
                             textField.setText(getItem().getTitle());
                        setText(null) ;
                        setOnDragDetected(null);
                        setGraphic(textField);                    
                   } else {
                        setText(project.getTitle());
                        setOnDragDetected(dragDetectedHandler);
              @Override
              public void startEdit() {
                   super.startEdit();
                   if (!isEmpty()) {
                        textField = new TextField(getItem().getTitle());
                        textField.setMinWidth(this.getWidth()-this.getGraphicTextGap());
                        textField.focusedProperty().addListener(new ChangeListener<Boolean>() {
                             @Override
                             public void changed(
                                       ObservableValue<? extends Boolean> observable,
                                       Boolean oldValue, Boolean newValue) {
                                  if (! newValue) {
                                       getItem().setTitle(textField.getText());
                                       commitEdit(getItem());
                        setText(null);
                        setGraphic(textField);
                        setOnDragDetected(null);
              @Override
              public void cancelEdit() {
                   super.cancelEdit();
                   if (!isEmpty()) {
                        setText(getItem().getTitle());
                        setGraphic(null);
                        setOnDragDetected(dragDetectedHandler);
                   } else {
                        setText(null);
                        setGraphic(null);
                        setOnDragDetected(null);
              @Override
              public void commitEdit(Project project) {
                   super.commitEdit(project);
                   if (!isEmpty()) {
                        setText(getItem().getTitle());
                        setGraphic(null);
                        setOnDragDetected(dragDetectedHandler);
    }If you try to drag from the list on the left to one of the lists on the right, it will fail pretty quickly and tell you that the data need to be Serializable.
    Simply adding "implements Serializable" to the Project and Employee classes doesn't work, as you find that SimpleStringProperty and SimpleObjectProperty are not Serializable. So instead I can use Externalizable:
    public class Project implements Externalizable {
    @Override
         public void writeExternal(ObjectOutput out) throws IOException {
              out.writeObject(title.get());
              out.writeObject(assignee.get());
         @Override
         public void readExternal(ObjectInput in) throws IOException,
                   ClassNotFoundException {
              setTitle((String)in.readObject());
              setAssignee((Employee)in.readObject());
    }and
    public class Employee implements Externalizable {
         @Override
         public void writeExternal(ObjectOutput out) throws IOException {
              out.writeObject(name.get());
         @Override
         public void readExternal(ObjectInput in) throws IOException,
                   ClassNotFoundException {
              setName((String) in.readObject());
    }This makes the drag and drop work, but if you drop a project on one of the employee lists, then edit the project title in the master list, the binding is not respected. This is because deserialization creates a new SimpleStringProperty for the title, which is not the property to which the title of the new Project object is bound.
    What I really want to do is to be able to drag and drop an object within the same JVM simply by passing the object by reference, rather than by serializing it. Is there a way to do this? Is there some DataFormat type I need?

  • A drag and drop game with dynamic text response

    Hi,
    I am a teacher and my school has recently upgraded to Adobe Design Premium.  Our previous version was about 5 versions out of date.
    I teach A Level which requires students to create an Interactice Multimedia product.
    In the previous 6 years, I have taught students how to create simple drag and drop game with dynamic text responses.
    Since the upgrade to Actionscript 3.0 the dynamic text response has ceased working.
    When creating the game from scratch, I need to move to Actionscript 2.0 as 3.0 does not allow me to add actionscript to objects - I know and am sure that this is a better way of doing things, but I would prefer to keep working the way I am used to.
    I use a switch case statement which I have copied below to make the drag and drop work.  The objects I apply the code to work in that they can be dragged, however, my dynamic text box with a variable name of "answer" is no longer displaying the response when an answer is left on a dropzone (rectangle converted to a symbol and given an instance name).
    on(press) {
    startdrag(this);
    on(release) {
    stopdrag();
    switch(this._droptarget) {
      case "/dropzoneB":
       _root.answer="Well done";
       break;
      case "/dropzoneA":
      case "/dropzoneC":
       _root.answer="Hopeless";
       break;
      default:
       _root.answer="";
       break;
    Any help would be much apeciated.
    Thanks
    Adrian

    To drag in as3
    blie_btn is the instance of the object drawin on the stage. In AS3 you have to assign a even listener, in this case MOUSE_DOWN, and MOUSE_UP, as we want the drag to stop if the mouse is not clicked. Then we fire the functions, and tell the object to start drag.
    // Register mouse event functions
    blue_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    blue_btn.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    red_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    red_btn.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    // Define a mouse down handler (user is dragging)
    function mouseDownHandler(evt:MouseEvent):void {
         var object = evt.target;
         // we should limit dragging to the area inside the canvas
         object.startDrag();
    function mouseUpHandler(evt:MouseEvent):void {
         var obj = evt.target;
              obj.stopDrag();
    if you want to make the text do what you want then something like this might work.
    In the function, you could add a text box onto the stage, give it a instance of something like outputText
    and then:
    outputText = ("Bla Bla Bla");
    (^Not sure if this will work exactly^)
    PS. I am currently a A-level student

  • Drag and Drop fails with JDK 7u6 in Linux

    Hi,
    I'm face with a strange bug on JavaFX 2.2 (JDK 7u6, Ubuntu 12); I implemented drag & drop feature of labels in a stage; first time, I open the stage, the drag & drop works well; when I close the stage and reopen it, it fails : I can drag the label but I cannot drop it on the target (the target events are not fired); I can reproduce the bug easily with the class below, you have just to instantiate the class TestDragAndDrop in an application class.
    On window 7, it works well, I cannot reproduce the bug.
    Thank you for your help,
    David
    public class TestDragAndDrop {
        public TestDragAndDrop() {
            Stage stage = new Stage();
            stage.setTitle("Hello Drag And Drop");
            Group root = new Group();
            Scene scene = new Scene(root, 400, 200);
            scene.setFill(Color.LIGHTGREEN);
            final Text source = new Text(50, 100, "DRAG ME");
            source.setScaleX(2.0);
            source.setScaleY(2.0);
            final Text target = new Text(250, 100, "DROP HERE");
            target.setScaleX(2.0);
            target.setScaleY(2.0);
            source.setOnDragDetected(new EventHandler <MouseEvent>() {
                public void handle(MouseEvent event) {
                    /* drag was detected, start drag-and-drop gesture*/
                    System.out.println("onDragDetected");
                    /* allow any transfer mode */
                    Dragboard db = source.startDragAndDrop(TransferMode.ANY);
                    /* put a string on dragboard */
                    ClipboardContent content = new ClipboardContent();
                    content.putString(source.getText());
                    db.setContent(content);
                    event.consume();
            target.setOnDragOver(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* data is dragged over the target */
                    System.out.println("onDragOver");
                    /* accept it only if it is  not dragged from the same node
                     * and if it has a string data */
                    if (event.getGestureSource() != target &&
                            event.getDragboard().hasString()) {
                        /* allow for both copying and moving, whatever user chooses */
                        event.acceptTransferModes(TransferMode.COPY_OR_MOVE);
                    event.consume();
            target.setOnDragEntered(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* the drag-and-drop gesture entered the target */
                    System.out.println("onDragEntered");
                    /* show to the user that it is an actual gesture target */
                    if (event.getGestureSource() != target &&
                            event.getDragboard().hasString()) {
                        target.setFill(Color.GREEN);
                    event.consume();
            target.setOnDragExited(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* mouse moved away, remove the graphical cues */
                    target.setFill(Color.BLACK);
                    event.consume();
            target.setOnDragDropped(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* data dropped */
                    System.out.println("onDragDropped");
                    /* if there is a string data on dragboard, read it and use it */
                    Dragboard db = event.getDragboard();
                    boolean success = false;
                    if (db.hasString()) {
                        target.setText(db.getString());
                        success = true;
                    /* let the source know whether the string was successfully
                     * transferred and used */
                    event.setDropCompleted(success);
                    event.consume();
            source.setOnDragDone(new EventHandler <DragEvent>() {
                public void handle(DragEvent event) {
                    /* the drag-and-drop gesture ended */
                    System.out.println("onDragDone");
                    /* if the data was successfully moved, clear it */
                    if (event.getTransferMode() == TransferMode.MOVE) {
                        source.setText("");
                    event.consume();
            root.getChildren().add(source);
            root.getChildren().add(target);
            stage.setScene(scene);
            stage.show();
        public static void main(String[] args) {
            Application.launch(args);

    DUUUUUUUDE! IT'S WORKING NOW!!!!
    When you originally asked, "What happens if you click on an image and move it to another folder?", I didn't really understand what you were talking about because I almost never have my workspace set up in a way that the folders are showing. I always hide them. So I didn't really understand what you were saying. Just a few minutes ago, I realized that that is what you were asking so I opened up the folder area and tried dragging thumbs into different folders and saw that it does work.
    So then, because of you mentioning that blue line and me know that I did see the blue line on occasion. I went back over into the thumbnails to find out if I always got the blue line or if it was a hit or miss thing. I couldn't believe my eyes when all of the sudden I saw that I no longer was getting that circle with the line through it, and low and behold, the thumbnail dropped right into position like it is supposed to!!!!
    The thing is, I don't know what I've learned from this. I thought, "well, what is different?" The only thing that I can think of is that I now have the folders showing in my workspace so I wondered if that was the secret but I just now hid the folders again like I usually do and the drag and drop into position is STILL WORKING!!!
    All I can figure is that somehow, dragging and dropping a thumbnail into a folder like that for the first time, triggered something so that I can now drag and drop among the thumbnail positions? Not sure. All I know is that for some reason, IT'S WORKING NOW!
    Now, for the second important part, I wonder if I drag and drop everything into the order that I want and then select all of the files and drag them into a new folder, will they stay in that order? I need to go experiment with that.
    If you hadn't kept at it and in turn had me keep trying stuff, it would have never happened because I had pretty much given up.
    Thanks Curt!
    You da man!!!

  • Why won't drag and drop work with Library Assets in Illustrator or InDesign?

    I've read a couple of threads with people having this issue, some dating back to late summer last year. I tried the fixes offered up in the responses, but haven't had success yet.
    All my programs are up-to-date, but I cannot drag and drop graphics from my library into InDesign or Illustrator. Photoshop is working fine.
    Are there any actual solutions to this yet?

    What kind of graphic are you talking about? In the Library panel (Illustrator) or CC Library panel (InDesign) graphics are identified with a small label to tell what their source is (Ai, ID, PS, SVG, etc.)
    And even though you say you have the latest version, exactly what version of InDesign do you have? You can see it in the About InDesign choice under the InDesign menu (Mac) or Help menu (Windows).

  • Unable to drag and drop images with manual sort in CS2 bridge

    I've had CS2 for several years now but for some reason, just never really needed to do a manual sort. Now that I DO need to, it doesn't seem to be working. I have the view set for manual and no matter what kind of working space I use, the program does not allow me to drag and drop the thumbnails into different positions. All I get is that circle with a diagonal line through it, showing me that what I'm trying isn't going to work.
    Any ideas?
    Windows XP
    2G of ram
    Bridge version 1.0.4.6 (104504)
    CS2

    DUUUUUUUDE! IT'S WORKING NOW!!!!
    When you originally asked, "What happens if you click on an image and move it to another folder?", I didn't really understand what you were talking about because I almost never have my workspace set up in a way that the folders are showing. I always hide them. So I didn't really understand what you were saying. Just a few minutes ago, I realized that that is what you were asking so I opened up the folder area and tried dragging thumbs into different folders and saw that it does work.
    So then, because of you mentioning that blue line and me know that I did see the blue line on occasion. I went back over into the thumbnails to find out if I always got the blue line or if it was a hit or miss thing. I couldn't believe my eyes when all of the sudden I saw that I no longer was getting that circle with the line through it, and low and behold, the thumbnail dropped right into position like it is supposed to!!!!
    The thing is, I don't know what I've learned from this. I thought, "well, what is different?" The only thing that I can think of is that I now have the folders showing in my workspace so I wondered if that was the secret but I just now hid the folders again like I usually do and the drag and drop into position is STILL WORKING!!!
    All I can figure is that somehow, dragging and dropping a thumbnail into a folder like that for the first time, triggered something so that I can now drag and drop among the thumbnail positions? Not sure. All I know is that for some reason, IT'S WORKING NOW!
    Now, for the second important part, I wonder if I drag and drop everything into the order that I want and then select all of the files and drag them into a new folder, will they stay in that order? I need to go experiment with that.
    If you hadn't kept at it and in turn had me keep trying stuff, it would have never happened because I had pretty much given up.
    Thanks Curt!
    You da man!!!

  • Wacky Drag and Drop issue with JNLP

    I'm sure I'll have to be a bit more descriptive but I'll just throw this out and see if anyone has any suggestions.
    I've got a swing app which is an administration tool to a rules engine I have built. I distribute the app to users using JNLP 1.2.
    Here's the problem. When I launch the app using JNLP, a portion of the app does not work. There is a panel in which I allow users to drag items off of a tree and onto a panel. They can drag and drop one item but when they attempt to drag and drop a second item it doesn't drop. If I take that same code which is being distributed via JNLP, copy it to the local machine and run it, it works. I can drag and drop all day long.
    There are no exceptions, no errors or funny gooey state things going on. I start the drag, the mouse pointer changes, I hover of the drop zone and let go of the mouse and it appears to drop, but the component does not show. Wacky.
    Does this set off any bells to anyone?
    Thanks,
    - Jay
    App compiled using 1.4.1_01.

    Ah ha.. Yes this does seem to the issue. Thanks for the response. I've tested it on a couple of machines and it works on the one's with 1.4.1 and it doesn't seem to work on 1.4.0 jre machines.
    NEW Question though, if I set my .jnlp to:
    <j2se version="1.4.1+"/>
    I get the 'ol 'Error Code 11 (11 Could not locate requested version'
    Is there any way to get this guy to auto-install???
    I've installed JRE 1.4.1 manually and it doesn't seem to pick that up either.
    Thanks...

  • Drag-and-drop issue with Linux, KDE

    My application used to work fine, but when i tested it on Linux drag and drop stopped working.
    I used snippet that would take list of supported DataFlavors of Transferable and used for loop to find a javafilelist one. (isJavaFileListType()).
    Well, now, it does that flava scan, but it doesn't find javafilelisttype in the list!
    I tried to retrieve String, serializedobject.. no use. It throws and illegal action exception of DnD or something like that.
    Does anybody know what's wrong, or had similar issues? I use j2 of v 1.5.2
    I shall provide you with more info if it's something totally new.

    I'd be interested in the answer to this too.
    It only just started happening to me a day or so ago, about the time that I think I did an OS upgrade.
    I'm on OSX 10.8.2.
    Its annoying.
    I can drop and drag in Finder but it just affects email.

  • Drag and drop into subject line

    I installed OS 10.4.5 and use Tiger mail. I noticed that unlike Panther mail, in Tiger mail draging text from the message to the subject box doesn't work. Sure you can copy and paste but in old mail, you drag and drop. It's absent in Tiger. You can drag to the other address windows even if it's text and not an Email address. I went back to Panther to make sure. Drag and drop still works. I tried repairing permissions with no change. Thanks.
    Eric
    PowerMac G4 1.25 GHz DP   Mac OS X (10.4.5)   2 GB RAM

    Thanks for the confirmation. I’m surprised more Mac fans haven’t made a peep. Maybe the majority of users are new and they’re not used to drag and drop?
    Another fine point in mail is that the space bar will only work once for deleting space or text. In Panther Mail, one could use the space bar an unlimited number of times to delete space or text but not in Tiger mail. I tried running repair permissions, also DiskWarrior without any change. Trying the same deleting sequence in TextEdit using the space bar proceeds normally. Maybe Apple dropped that feature thinking nobody would notice?
    G4 DP 1.25 GHz, MDD, 2 GB RAM   Mac OS X (10.4.5)   G3 iBook, OS 10.3.9,   Umax G4, 450 GHz, 1 GB RAM

  • Drag and Drop Interaction with 50+ Drop Targets

    Hello,
    I'm fairly new to Captivate 7 but very familiar with Flash. I'm tasked with a project that I would like to do with the drag and drop interaction widget from Captivate 7. Basically, we need our learners to identify the locations of our resorts on a map. Select the name of the resort, drag and drop it in the city/state or country where located. My question is can Captivate handle this task? To me, it seems as a large task for Captivate to handle, and so I was thinking of coding it in Flash.
    Here is what I need:
    1.- List of all the properties at bottom with the drop target being a map of the US or world and have the location for each property as the drop target.
    2.- When the resort/property is selected, the name will change to the three letter code. Example: New York City, when clicked = NYC and the map itself to reflect the 3 letter code once dropped on the map if correct.
    3. If incorrect, the listed item will revert to the long name and return to the list.
    4. If this can be graded, it would be best.
    I can break the project into different regions but if I wanted to keep all 300+ properties in one module, will it be an issue? At the very least, I would need to do a minimum of about 50 per module.
    Thanks all! I've found this forum to be extremely helpful and the members seem to be eager to help.

    var matchingTargetName:String =(event.target.name).substring(0, 1);
    Change the name of the target to A and B and the mc A1, A2, A3, A4... and B1, B2,B3...

  • Zen 8/16/32GB: drag and drop (UMS) with Wi

    I am still unsure regarding the drag and drop capability of the Zen 8/6/32GB. From various post here and there, I understand that external SD card is UMS, but internal memory remains MTP.
    On the other side, the anythingbutipod guys report that:
    - In Vista it is easy drag and drop just as an MSC (UMS) thumb dri've.
    - Drag and drop on XP works as well but can be "problematic"
    Where do we go then?
    Is there somewhere any "enable UMS" menu setting?
    Message Edited by Tatami on 03-4-2008 02:3 PM

    From my experience, the difference between MTP and UMS for the Zen is that the UMS gives you a Dri've Letter and the MTP don't. With the MTP mode, the Zen as an icon would still show up in the Windows Explorer which I could drag and drop my files from my computer to the player and vice versa. At least that is what i face in Windows XP and Vista.
    Of course if you are using a 3rd party software, the MTP mode does not give you a dri've letter and it would be impossible to see the files. But if you are only requiring Drag and Drop then MTP and UMS makes no difference in Windows Explorer.

  • Drag and Drop game with only two targets

    I created a drag and drop activity where their are five boxes that are supposed to go in to two columns in any order. I found a tutorial online that I based this activity off of.
    The problem is that the tutorial shows you how to make a target for each mc which has worked for all the activities I've made except for this one where I need only two targets. How would I change it so I can have multiple mc's drop on to one target?
    This is my AS:
    var score:Number = 0;
    var objectoriginalX:Number;
    var objectoriginalY:Number;
    growing_mc.buttonMode = true;
    growing_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickupObject);
    growing_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    gorging_mc.buttonMode = true;
    gorging_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickupObject);
    gorging_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    dormancy_mc.buttonMode = true;
    dormancy_mc.addEventListener(MouseEvent.MOUSE_DOWN  , pickupObject);
    dormancy_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    cystform_mc.buttonMode = true;
    cystform_mc.addEventListener(MouseEvent.MOUSE_DOWN  , pickupObject);
    cystform_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    hosttrans_mc.buttonMode = true;
    hosttrans_mc.addEventListener(MouseEvent.MOUSE_DOW  N, pickupObject);
    hosttrans_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 matchingTargetisplayObject = getChildByName(matchingTargetName);
    if (event.target.dropTarget != null && event.target.dropTarget.parent == matchingTarget){
    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;
    score++;
    scoreField.text = String(score);
    } else {
    event.target.x = objectoriginalX;
    event.target.y = objectoriginalY;
    if(score == 5){
    response_mc.gotoAndStop(2);

    var matchingTargetName:String =(event.target.name).substring(0, 1);
    Change the name of the target to A and B and the mc A1, A2, A3, A4... and B1, B2,B3...

  • Drag and drop issue with Mail.

    Why would the ability to drag and drop files from my email suddenly stop and how to I enable it again?

    I'd be interested in the answer to this too.
    It only just started happening to me a day or so ago, about the time that I think I did an OS upgrade.
    I'm on OSX 10.8.2.
    Its annoying.
    I can drop and drag in Finder but it just affects email.

  • Drag and Drop Layout with items attached to Page 0 Region Bug

    Hi,
    I have a region on P0 (P0_REGION) and multiple page items (not on page 0) are associated to the region. When I go to "Drag and Drop" the page items I see all the Page Items for the given page and all the Page Items that are linked to a P0 Region. For Example:
    P0:
    Region: P0_REGION
    P100:
    Items: P100_X, Region: P0_REGION
    P200:
    Items: P200_Y, Region: P0_REGION
    Now on P200, click on "Drag and Drop" above P200_Y I'll see P100_X and P200_Y.
    This is a bit of an issue if you have a lot of items that are linked to a region on Page 0 but actually belong to another page.
    Is this a bug?
    Thank you,
    Martin Giffy D'Souza
    [http://apex-smb.blogspot.com/]

    Look at the following link:
    Drag and drop - like the builder?

  • HT1473 I am trying to copy videos from my windows based dell into iTunes and they will not coy when I drag and drop nor with they copy when I use the add file command.

    I am trying to copy videos from windows folder into iTunes and it will not copy. I have used drag and drop and the folder sopy comand from iTunes. Anybody got an answer?

    Hi wayneiii,
    If you are having issues adding video files to iTunes on your Windows machine, you may want to verify that they are in a format that iTunes can play. You may find the following article helpful:
    iTunes: Frequently asked questions about viewing and syncing videos
    http://support.apple.com/kb/ht2729
    Regards,
    - Brenden

Maybe you are looking for

  • Video camera output (i.Link or Firewire) to connect to my MacBook Air USB input

    Is there a way to for my video camera output (i.Link or Firewire) to connect to my MacBook Air USB input??? Is there any kind of adapter?? I have many movies I want to edit on my Mac

  • HTML Vs PDF output

    Hi, I have created a report which is running on web. The PDF output looks fine to me as seen during design time but the HTML output is totally weared. The text is not formatted properly etc... Is there any way i can design a report which will look sa

  • Pacman *appears* to be slow?

    Hi, I spent some time with Arch around the 071-release, and although I wanted Arch as the main OS for my small (office-)company, I couldn't find support in the neighbourhood, so I had to go for Debian. I kept hanging around this place and yesterday I

  • Urgent : reg client proxy

    could any one pls provide ABAP code for client proxy with deep structures.Its urgent!!!

  • Where can I find resources for prototyping apps with adobe illustrator (trainings, video, articles)?

    New to prototyping apps and looking to use Adobe Illustrator to do so as most people in our company know it well (compared to Fireworks - the common tool talked about here for prototyping). Does anyone have any good trainings, videos, articles, instr