Drag and Drop 2 objects 1 target
I am fairly new to Flash and trying to create a drag and drop. I have been following the tutorial here (http://monkeyflash.com/tutorials/flash-drag-and-drop/). One change I made to this tutorial was to have the object disappear when it is dropped on the target. Following these directions I was able to successfully build a drag and drop with one object to one target. My question is what if I want to have multiple objects go to the same target? For example in the tutorial what if I added a second square object and wanted both to go to the one square target.
Any help would be greatly appreciated!
As long as the target is still accessible as a target you can drag as many objects to as you want (one at a time). To help do that, when you drop an object on the target and make it disappear, you either need to make that dropped object go away ( removeChild(dropped) ) so that it is not blocking the way or move the target above the dropped object ( addChild(target) ).
Similar Messages
-
How to add text to a drag and drop object
Hi everyone, I am quite a beginner with Flash so do excuse
me. First, I am not sure if what I want to achieve may actually be
impossible with Flash. I presently use MX 2004, but will shortly be
upgrading to CS3. But if you know the answer for MX 2004 that would
be really useful for now.
I am writing a digital fiction story, and I want to create
drag and drop objects. This I have managed to do. But I would like
these drag and drop objects to also reveal text when they are
actually pressed on. I have had no success so far in being able to
achieve the two effects together.
Does anyone know how I can achieve this? If, by chance, you
know the action script that would be great. If you can explain to
me in simple terms how I can achieve this I really would be
grateful.
Thanking you,
MaryThe script I posted would work on the main timeline - not in
the timeline of the clip itself.
So you made a movieclip out of the image and gave it the
instance name "myclip". That's good.
You edited that clip and added a dynamic text box with
instance name "mytext". Be careful not to confuse the "instance"
name of the text box with the "Var:" name. "myclip" should be the
instance name. Also be careful to make sure you uncheck the
"selectable" box. Edit your clip and click on the textbox to select
it and look in the properties panel. There should be a button with
Ab on it. If it is white background (highly likely), click it so it
is not white. If the text is selectable, it will interfere with
your button functions.
While there is nothing wrong with creating nested clips
within your movieclips, unless you plan to target them for
something, there is no benefit. The only thing that needs an
instance name inside the myclip is the textbox (based on what you
are trying to do).
You don't need any actionscript in the movieclip itself. If
you can learn to place all your AS on the root timeline, you will
be well ahead.
If you placed that AS inside the clip, Flash wouldn't know
what to do with it.
Technically you can place the AS inside the clip on the layer
you created but, if you did that, you would need to modify the
script to the following:
this.onPress = function() {
this.mytext.text = "stop pressing so hard";
startDrag(this);
this.onRelease = function() {
this.mytext.text = "";
stopDrag(); -
Rollover text on a drag and drop object
Hi folks, I wondered if someone could help me with this
problem. Last week I was adding text to a drag and drop object on
the press of a button and release of a button. This week, I am
trying to get the drag and drop object to reveal text when the
mouse rolls over it and again when the mouse releases it. I thought
it should be pretty easy to fathom out the script for this, because
I was given a lot of help last week. But I put in the attached
code, and the object does not drag and drop, and neither does it
show any text when the mouse rolls over it and off it.
Can anyone tell me what I am doing wrong?
Thanking you,
MarchanThe script I posted would work on the main timeline - not in
the timeline of the clip itself.
So you made a movieclip out of the image and gave it the
instance name "myclip". That's good.
You edited that clip and added a dynamic text box with
instance name "mytext". Be careful not to confuse the "instance"
name of the text box with the "Var:" name. "myclip" should be the
instance name. Also be careful to make sure you uncheck the
"selectable" box. Edit your clip and click on the textbox to select
it and look in the properties panel. There should be a button with
Ab on it. If it is white background (highly likely), click it so it
is not white. If the text is selectable, it will interfere with
your button functions.
While there is nothing wrong with creating nested clips
within your movieclips, unless you plan to target them for
something, there is no benefit. The only thing that needs an
instance name inside the myclip is the textbox (based on what you
are trying to do).
You don't need any actionscript in the movieclip itself. If
you can learn to place all your AS on the root timeline, you will
be well ahead.
If you placed that AS inside the clip, Flash wouldn't know
what to do with it.
Technically you can place the AS inside the clip on the layer
you created but, if you did that, you would need to modify the
script to the following:
this.onPress = function() {
this.mytext.text = "stop pressing so hard";
startDrag(this);
this.onRelease = function() {
this.mytext.text = "";
stopDrag(); -
Drag and drop to target simple errors, expecting identifier?
im creating a drag and drop. moving a guitarest name to a target e.g draging a movieclip called slash to a dynamic text box called box_slash this is my code and i get 2 stupid errors but have been up all night and cant figure it out!
flash cs5 actionscript 3, is this code for actionscript3 i found the base for it here: http://edutechwiki.unige.ch/en/Flash_drag_and_drop_tutorial any help would be incredible as it for an assignment and im new to flash
var hits = 0;
// Register 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);
// 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.dropTarget will give us the reference to the shape of
// the object over which we dropped the circle.
var target = obj.dropTarget;
// If the target object exists the we ask the test_match function
// to compare moved obj and target where it was dropped.
if (target != null)
test_match(target, obj);
obj.stopDrag();
function test_match(target,obj) {
// test if either one of the four pairs match
if ( (target == box_slash && obj == slash) ||
(target == box_clapton && obj == clapton) ||
(target == box_hendrix && obj == hendrix) || )
// we got a hit
hits = hits+1;
textField.text = "Correct! :)";
// make the object transparent
obj.alpha = 0.5;
// kill its event listeners - object can't be moved anymore
obj.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
obj.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
// Test if we are done
if (hits == 3)
textField.text = "Well Done";
else
textField.text = "wrong! :(";
the errors are: i have highlighted the lines
Scene 1, Layer 'Actions', Frame 1, Line 39
1084: Syntax error: expecting rightparen before leftbrace.
Scene 1, Layer 'Actions', Frame 1, Line 38
1084: Syntax error: expecting identifier before rightparen.Thankyou very much that does get rid of that error now i get
Scene 1, Layer 'Actions', Frame 1, Line 42
1120: Access of undefined property textField.
Scene 1, Layer 'Actions', Frame 1, Line 51
1120: Access of undefined property textField.
Scene 1, Layer 'Actions', Frame 1, Line 56
1120: Access of undefined property textField.
now im sure this is simple but im as im sure you have figured out im a complete noob to flash
textField.text = "Correct! :)";
textField.text = "Well Done";
textField.text = "wrong! :(";
is this something to do with an instance name? -
Hey. A couple of weeks ago Kglad from the forums created some code for me for a drag and drop function. It works great. Unfortunatly im having to extend to more draggable objects. So they will be within another movie clip so i can have them scrolling. After making the scroll, the draggable objects dont register on the droptarget as they are within another movie clip. Below is i think the part of the code that needs to be changed so the draggable objects know where to find the drop target.
Hope that makes sense.
Could anybody help?
Thanks
this.stopDrag();
if(eval(this._droptarget)==droptargetMC){droptargetMC
probably needs to be changed. you could take a long-shot and try:
_parent.droptargetMC
but you'll probably need to see the code that defined droptargetMC and explain where it's defined relative to the location of the stopDrag() code. -
Highlight destination of drag and drop object
If drag an object in a drag and drop interaction to its
destination, is it possible for the destination hotspot to
highlight itself
see screenshot:
http://www.lshtm.ac.uk/dl/programme/sample/highlight.gif
As you can see as I drag object 0.09 to its destination, the
destination site highlights itself to yellow. I want to create a
similar effect in authorware
thanks in advance
JonLook at the Overlapping function - set something to trigger
when that is
true. That may be hard to do when the mouse is down dragging
something...
Erik
webacity wrote:
> If drag an object in a drag and drop interaction to its
destination, is it
> possible for the destination hotspot to highlight itself
> see screenshot: <a target=_blank
class=ftalternatingbarlinklarge
> href="
http://www.lshtm.ac.uk/dl/programme/sample/highlight.gif
> As">
http://www.lshtm.ac.uk/dl/programme/sample/highlight.gif
> As</a> you can see as I drag object 0.09 to its
destination, the destination
> site highlights itself to yellow. I want to create a
similar effect in
> authorware
> thanks in advance
> Jon
>
Erik Lord
http://www.capemedia.net
Adobe Community Expert - Authorware
http://www.adobe.com/communities/experts/
http://www.awaretips.net -
samples, tips, products, faqs, and links!
*Search the A'ware newsgroup archives*
http://groups.google.com/groups?q=macromedia.authorware
*The Blankenship Caveat: Note that direct linking to http
content
through any Authorware icon will likely fail if a proxy
server is present!* -
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? -
Drag and Drop objects in web app
Hi all,
I have a web application in which i have an option to delete the listed items. now i have to place an image of recycle bin on the webpage and to give the utility of delete operation by only dragging the object from list and droping it into recycle bin. How can i do this? Is there any body who have already done this? Any reply will be welcomed.
And guys no reply for my validation and 'scope' questions.
Thanx in advance.http://www.googleisyourfriend.com/search?q=javascript+drag+and+drop&meta=
-
Drag and drop objects in Captivate 4
Hi,
Is it possible to have a user click and drag an object on a slide in captivate 4?
For e.g. - in a matching type-quiz, instead of creating the usual quiz - I want a user to click and place the correct object in the correct box. Can this effect be achieved?
Thanks!With either (or both) of these Drag and Drop widgets, yes: http://www.infosemantics.com.au/dragdrop
-
Drag and drop object in other object
Greetings!
I'm asking myself this question:
I have this graph in my application and a panel.
The graph is draggable. How can I drag and drop the graph
into the panel so that the graph becomes a child of the panel?
Thanks!Jeff Bohrer wrote:
smercurio_fc wrote:
Unlike your other annoyance, this one definitely always annoys me.
Note: The LabVIEW project explorer window isn't the only IDE that does this. Visual Studio does the same thing when you drag and drop a file onto the Solution Explorer window and the target is a folder. So, the behavior is not unique to LabVIEW.
Thought this would be today! Thank YOU
You're quire welcome. I do it all for you.
X wrote
CAR anyone?
I don't think this needs a CAR, since it's not a bug. It just works that way, so there's nothing to fix. Posting an idea would be the better way to handle this. -
Drag and drop objects on swf (AS2)
Hi! This is really driving me crazy.
I'm trying to create a mind mapping online app for thinking maps. See here for an example of thinking maps.
I want to let users create textfields during runtime and drag and drop them. I managed to do this using createTextField and eventListener.
I also want to let users insert a shape (let's say a brace) to the swf and drag them around and resize them using handlers.
Thing is:
1) I can't click and drag a shape whenever textfields are inserted into the swf. On the stage, wherever I click and drag, one of the textfields is sure to move! And the shape does not move! (I put the shape in a movie clip and tried hitTest & put a button behind it).
2) For a particular shape, I want to be able to drag and resize it. To resize, i use _height property or _xscale/_yscale. When i get to resize the shape, i cannot drag it. When I can drag it, I can't resize it.
Sigh.Hi! This is really driving me crazy.
I'm trying to create a mind mapping online app for thinking maps. See here for an example of thinking maps.
I want to let users create textfields during runtime and drag and drop them. I managed to do this using createTextField and eventListener.
I also want to let users insert a shape (let's say a brace) to the swf and drag them around and resize them using handlers.
Thing is:
1) I can't click and drag a shape whenever textfields are inserted into the swf. On the stage, wherever I click and drag, one of the textfields is sure to move! And the shape does not move! (I put the shape in a movie clip and tried hitTest & put a button behind it).
2) For a particular shape, I want to be able to drag and resize it. To resize, i use _height property or _xscale/_yscale. When i get to resize the shape, i cannot drag it. When I can drag it, I can't resize it.
Sigh. -
Drag and Drop objects to the same target
Can any one assist? I have a box that has six labels that can be dropped on targets on the box. I have all this in place but I want to be able to have label 2 drop onto target 2 and 3, and likewise label 3 drop on to target 2 and 3. All others drop onto their specific targets. This is the script so far but ony for matching object to target. Please be gentle, i'm new to this!!
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)
Can anyone assist please?What you could do is have an array assigned to each dragged item that defines the allowed targets for each dragged item and check if the dropTarget is in the array using the indexOf() method.
-
Drag and drop objects to multiple targets
i have tried a lot of time to make my project into a success... However, it never work... i will be very appreciate with your kind help... please
this is the link to my swf... all objects are accepted when i drop it into the plastic bin...
http://megaswf.com/serve/77800/
var startX:Number;
var startY:Number;
var counter:Number = 0;
two.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
two.addEventListener(MouseEvent.MOUSE_UP, dropIt);
one.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
one.addEventListener(MouseEvent.MOUSE_UP, dropIt);
three.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
three.addEventListener(MouseEvent.MOUSE_UP, dropIt);
twotwo.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
twotwo.addEventListener(MouseEvent.MOUSE_UP, dropIt);
oneone.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
oneone.addEventListener(MouseEvent.MOUSE_UP, dropIt);
threethree.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
threethree.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 myPlasticBin:String = "target" + "one" || "oneone" ;
var myPlastic:DisplayObject = getChildByName(myPlasticBin);
if (event.target.dropTarget != null && event.target.dropTarget.parent== myPlastic){
reply_txt.text = "Good Job!";
event.target.removeEventListener(MouseEvent.MOUSE_DOWN, pickUp);
event.target.removeEventListener(MouseEvent.MOUSE_UP, dropIt);
event.target.buttonMode = false;
event.target.visible = false;
event.target.x = myPlastic.x;
event.target.y = myPlastic.y;
counter++;
} else {
reply_txt.text = "Try Again!";
event.target.x = startX;
event.target.y = startY;
if(counter == 6){
reply_txt.text = "Congrats, you're finished!";
three.buttonMode = true;
one.buttonMode = true;
two.buttonMode = true;
threethree.buttonMode = true;
oneone.buttonMode = true;
twotwo.buttonMode = true;yup finally i have done with my problems!!! thanks ^^
-
I starting having an issue with dragging/dropping objects on my screen a few days ago with my Macbook Pro. Say, for instance, there is a document on my desktop that I want to move to another location on my desktop or to a folder...when I left click on the document, a ghost of it appears on my cursor...I can move it around, but I cannot drop it. It takes several hits of the ESC key and clicks of the left mouse button to return the cursor to it's normal state, which also causes the ghost of the object to rush back to the original object icon instead of where I want to drag it. It does not matter if I use the touch pad on the laptop, my wireless house, or my wired mouse, which tells me it is a system issue and not a hardware issue. I am using 10.6.8. I have not voluntarily changed any mouse or desktop settings at all. I also noticed that when I move my cursor to the top left corner, it does not put the computer in a screensaver mode as I have it set up to do. I checked the screen settings and it is still set up to go to the screensaver when I move the cursor to that location. Does anyone know how to fix this?
Please read this whole message before doing anything.
This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find nothing has changed after you complete it.
Enable guest logins and log in as Guest. For instructions, launch the System Preferences application, select “Help” from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
While logged in as Guest, you won’t have access to any of your personal files or settings. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
As Guest, try the action. Same problem?
After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it. -
Hello,
I am new to dreamweaver but have a specific request to create a website with what I can only describe as a 'Dragging' option on objects.
This is shown here on the javascript of this website http://dunnbypaul.net/js_mouse/
Is this possible on dreamweaver and if so please can someone explain to me how?
I would be so ever gratetful,
HannahIf you're asking if Dreamweaver has a magic button or widget that can do all this for you, the answer is no. You need to bring some client-side coding skills to the table.
If you're new to this, start with jQuery -- a very popular coding library with lots of available plugins.
http://jqueryui.com/demos/draggable/
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
Drag and Drop Objects in Applet
Is it possible to select and Drag & Drop Graphical Objects from One Applet in one Browser window to Applet in another Browser window?
Thanks,
VattikutiOhhhhhhhhhhhhhhhhhhhhhhhhhh
thanks a lot Mr. Harrpreeeeeeeeeeeeeeet
Maybe you are looking for
-
I have several questions regarding Final Cut Pro X
I went to the APP Store to check out FCPX and accidentally downloaded it (v. 10.0.3) I didn't freak out too badly as I had planned to buy it eventually, but One Click? Anyhow, the deed is done. Since the application was downloaded, how do I make a ba
-
I would like to be able to print a pdf file from a page in Firefox. I used to be able to do this. Why can't I do this now, and can this feature be turned back on?
-
could anyone help, just baffled, my i phone is literllly dead for no reason. i thought the battery had ran out, thou it had plenty left... i have tried to charge it and no life. also have plugged it in with my computer, again no life or aknowledgemen
-
Hp 500-267c black screen when updating and installing programs
screen goes black and i have to reboot when installing downloaded program or hp update. works fine with windows update. this machine is only 30 days old and seams to have the problem when I got it. At first Ithought it was a bad keyboard but it was'n
-
Dialogfenster "Aktualisierung..." nach Start des Organizers in PSE 5
Hallo, nach Start des Organizers und laden des Katalogs erscheint ein Dialogfenster ohne Cancel-Button. In dem Fenster steht nur "Aktualisierung...". Ein grafischer Balken zeigt den Fortschritt an. Bei 100% schließt das Dialogfenster automatisch und