Need clarification on drag n drop

I need a small clarification on the following requirement.
User has setup and data entry module. In the setup module, user has the option to select what are the text boxes to be displayed in the data entry screen. After submission, he will get all these fileds when he goes to data entry screen.
My question is that is it possible to drag and drop the text box to a particular position (may be right, left, middle, top of the screen, bottom of the screen) in the browser during setup?

is dColors() the only place you're using stopDrag()?  if so, what's the following show:
function dColors(event:MouseEvent):void {
event.target.stopDrag();
trace("dropped",event.target.name,event.currentTarget.name);
var matchingTargetName:String = "target" + event.target.name;
var matchingTarget:DisplayObject = getChildByName(matchingTargetName);
trace(event.target.dropTarget.parent.name,event.currentTarget.dropTarget.parent.name,event .currentTarget.dropTarget.name,"=+",matchingTargetName);
if (event.target.dropTarget != null && event.target.dropTarget.parent == matchingTarget){
event.target.removeEventListener(MouseEvent.MOUSE_DOWN, uColors);
event.target.removeEventListener(MouseEvent.MOUSE_UP, dColors);
event.target.buttonMode = false;
event.target.x = matchingTarget.x;
event.target.y = matchingTarget.y;
  score_s = score_s += 100;
  ScoreS.text = score_s.toString();
} else {
event.target.x = objectsoriginalX;
event.target.y = objectsoriginalY;

Similar Messages

  • I need to implement Drag N Drop between two tables which saves both records

    I need to implement Drag N Drop between two tables which saves both records in a third page, by using drag n drop.

    check this video http://baigsorcl.blogspot.com/2011/01/drag-and-drop-collection-in-oracle-adf.html

  • Need help with drag and drop game, Urgent!

    Hi I have created a drag and drop game, the drag and drop is
    working alright however once the right word has been placed in the
    box, and moves on to the next question the previous correct answer
    stays where it was placed, how can i get it to snap back to its
    original location? Also when the right word is draged in to the the
    white box i want it to snap into place in that box so it fits in
    there.
    Also if you have any other thoughts and advice on how i can
    improve on this please email me thanx
    Can someone please help, my .fla file can be found here:
    http://www.freshlemon.co.uk/timeline.fla
    http://www.freshlemon.co.uk/timeline.fla.zip
    thanx

    tellTarget is ancient
    I forget what it even used to do??? hahaha
    seriously, just put in the instance name and what you want it
    to do:
    tellTarget("movieclip"){
    play();
    is now just
    movieclip.play();

  • Newby to Flash -- need help with Drag and Drop

    I have been trying to create a drag and drop in Flash where I have five different places for an instance of a mc to be dropped. I want to be able to drop only three instances to each place and these three instances are specific to one of the five "drop places".  I also want the mc instance to go back to its original position if it is not dropped on the right place.  I've got the actionscript working to drag and drop the mc instances on the "drop places"  but I cannot figure out how to do the if statements so that if it doesn't match the correct drop place it will go back to its original position.
    Here's some of my code:
    Analyze1_mc.objName = "Analyze1";
    Analyze1_mc.val = 1;
    Design1_mc.objName = "Design1";
    Design1_mc.val = 4;
    Analyze1_mc.buttonMode = true; // sets mouse pointer to hand
    Design1_mc.buttonMode = true;
    Analyze1_mc.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag);
    Analyze1_mc.addEventListener(MouseEvent.MOUSE_UP, fl_ReleaseToDrop);
    Design1_mc.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag);
    Design1_mc.addEventListener(MouseEvent.MOUSE_UP, fl_ReleaseToDrop);
    var originalPosition:Point;
    function returnToOriginalPosition(): void
              originalPosition = new Point(x,y)
              x = originalPosition.x;
              y = originalPosition.y;
    // function to drag item clicked
    function fl_ClickToDrag(event:MouseEvent):void
              event.currentTarget.startDrag();
              event.target.parent.addChild(event.target);
    function fl_ReleaseToDrop(event:MouseEvent):void
              var target:MovieClip = event.currentTarget as MovieClip;
              var item:MovieClip = MovieClip(event.target);
              item.stopDrag();
    if (event.target.hitTestObject(AnalyzeTarget_mc)  && (event.target.val == 1)) {
                                            trace ("Analyze1");
                                            event.target.x = AnalyzeTarget_mc.x + 42;
                                            event.target.y = AnalyzeTarget_mc.y + 5;
                                            updateItem(Analyze1_mc);
                                  } else {
                                            returnToOriginalPosition();
    if (event.target.hitTestObject(DesignTarget_mc) && (event.target.val == 4)) {
                                            trace ("Design1");
                                            event.target.x = DesignTarget_mc.x + 42;
                                            event.target.y = DesignTarget_mc.y + 5;
                                            updateItem(Design1_mc);
                                  } else {
                                            returnToOriginalPosition();
    function updateItem(item:MovieClip):void {
              buttonMode = false;
              removeEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag);
    I put the trace in to check the function -- and I do get the output when the mc instance is dropped on the right place -- but there is no return to original position if the instance is dropped in the wrong spot and there is no update to the mc instance. 
    Any help would be greatly appreciated. Thanks!

    That line you speak of is merely declaring a variable, nothing is being assigned to it.
    One way of assigning the original position data to each object is to just assign it like follows:
    Analyze1_mc.originalX = Analyze1_mc.x;
    Analyze1_mc.originalY = Analyze1_mc.y;
    etc...
    Another way to do it with less code is to assign it generically just before you start dragging each of them...
    function fl_ClickToDrag(event:MouseEvent):void
              event.currentTarget.originalX = event.currentTarget.x;
              event.currentTarget.originalY = event.currentTarget.y;
              event.currentTarget.startDrag();
              event.target.parent.addChild(event.target);
    One thing I noticed in your code earlier is that you switch between using event.currentTarget and event.target.  If you want to be sure that the object your code is targetiing is the object that has the listener assigned to it (your movieclips) stick with using currentTarget.   target can end up pointing to something inside that object instead of the object itself.  In the following lines...
              var target:MovieClip = event.currentTarget as MovieClip;
              var item:MovieClip = MovieClip(event.target);
    You could very well be assigning target and item as being the same object.  I don't think that is what you want.  You might wanting to have one of them be the object you drop it on, which would be the dropTarget, not the target

  • Need conceptual help for a simple drag n drop game

    As anyone who saw my previous thread knows, I'm trying to make an educational app prototype (I'm new to Flash, this is for a Masters in education) to help students learn IPA symbols (phonetics). I have successfully made a section where the students click on symbols to hear the corresponding audio and listen to explanations.
    For the final part of the prototype, I have to create some kind of instructional game. My idea is to have 12 circles, each one playing an audio file of a vowel sound (this I know how to do). The students will have to click the circles to listen and then drag and drop them to the correct IPA symbol. Flash would then give feedback on correct/incorrect answers and a score. Maybe all of this is against the clock, needing a timer.
    So, I need to learn drag and drop. What else to I need to learn so that one drop position is considered "correct", the others are considered "incorrect" and a score is given at the end? And maybe a timer?)
    Any conceptual help gratefully received!!
    Darren

    Cheers for the reply.
    Yes, I have heard of this Google you speak of The thing is, sometimes as a beginner you can't see the wood for the trees and I find mountains of info when I search, it's hard to know which direction to do in. As for drag & drop I had already found good tutorials on that, it's more the other concepts that need to be employed that I would like information on.
    I'll look into the getTomer() function, sounds just what I need.
    As for the scoring correct/incorrect answers, i found a wonderful example on flashkit.com, which would basically solve all my problems if I learn how to adapt it. The trouble is it was made in Flash 7, I'm on CS4.
    How many changes would I need to make to the code to turn it into AS3?
    Cheers everyone
    Darren
    (EDIT: I pasted the code and now it looks weird. I used SQL syntax highlighting on this page, maybe somebody could tell me how to past code and get it looking correct?)
    myAnswers = [[1, 1], [2, 2], [3, 5], [4, 4]];
    function doDrop(dragSprite, numTargets) {
         for (i=1; i<numTargets+1; i++) {
              if (_root[dragSprite].hitTest("_root.q"+i)) {
                   if (_root["q"+i]._currentframe<>2) {
                        _root[dragSprite]._x = _root["q"+i]._x+5;
                        _root[dragSprite]._y = _root["q"+i]._y+2;
                        _root["q"+i].gotoAndStop(2);
                   } else {
                        _root[dragSprite]._x = _root[dragSprite].stx;
                        _root[dragSprite]._y = _root[dragSprite].sty;
    function clearDrop(dragSprite, numTargets) {
         for (i=1; i<numTargets+1; i++) {
              if (_root[dragSprite].hitTest("_root.q"+i)) {
                   if (_root["q"+i]._currentframe == 2) {
                        _root["q"+i].gotoAndStop(1);
                        break;

  • Drag and drop pdf files to Acrobat plug-in dialog

    Hi guys,
    I have an Acrobat plug-in application based on ASDK7 use MFC, it has a UI dialog could make user add files to the dialog.
    Now, I need to implement drag and drop files to the dialog.
    But the file is simply opened by Acrobat always when I drag&drop files.
    Drag&drop works fine in simple MFC project in Windows 7.
    Is there need any settings in Acrobat preference?
    Or how can I stealing drag acceptance from Acrobat App class in code?
    Thanks a lot!

    But Acrobat 9 also cannot work on my Windows XP enviroment.
    I also tried Acrobat 10 on Windows 7, not worked too.
    Thanks for your concerns. Regarding "I would recommend that you submit a formal support case with our Developer Support folks.", what should I do?

  • Drag and Drop UI Items vb net

    Hi everybody.
    This is my question:
    I need to use drag and drop onto an item, i really don't have any idea how to do this, if anybody can tell me something i'll be very thankful.
    I'm working with visual basic .net and SBO 2007

    Victor,
    Currently you do not have access to the Drag & Drop functionality of SAP Business One using the SAP Business One SDK.
    Apologies,
    Eddy

  • Drag-n-Drop problem in DataGrid with custom ItemRenderer

    Hi,
    I am trying to use a DataGrid to set the ordering of a group
    of images.
    I want to do this with a DataGrid which will show me some
    properties of
    the images in different columns including a thumbnail of the
    image. The
    problem is when I use any custom renderer for any column, the
    draging is
    not working. It works fine when I don't use any ItemRenderer.
    My code looks something like this:
    <mx:DataGrid dragEnabled= "true" dropEnabled= "true"
    dragMoveEnabled= "true">
    <mx:columns>
    <mx:DataGridColumn headerText="Thumb" itemRenderer=
    "component. GridImageRenderer"/>
    <mx:DataGridColumn headerText="Current name" width="100"
    itemRenderer= "component. NameRenderer" />
    <mx:DataGridColumn headerText="New name" width="150"
    dataField="nameNew" />
    </mx:columns>
    </mx:DataGrid>
    Can anyone please give me any clue how to fix this?
    Regards,
    ~ Arif

    Hello again, BinaryDigit.
    I thought we need to apply Drag n drop API for this case.
    Without wasting too much time,
    I tried out as your source code from the previous reply,,,
    Instead of getting it clearly, I got another Confusion... (pardon me)
    Let me clarify this with the examples given,
    I try to adopt previous source code
    and it was this detail;
    1) Taking the X and Y coordinate (from the mouseEvent) Plus jLabel1 coordinate (both X and Y).
    2) Positioning a Coordinate taken to JLabel1
    3) Passing the Coordinate taken to jLabelX, and jLabelY.
    The problem found was;
    if we make 3rd become comments, now the jLabel1
    could works!
    I mean, jLabel1 could be dragged to another Coordinate (by dragging it to another location)
    But,
    if we un-comments the 3rd source code,
    The effect would be no movement of the jLabel1.
    BinaryDigit, is this related to the layout you mentioned before?
    Correct, DarrylBurke! :D
    I thought also the same thing,
    but setLocation() give me another Confusion....
    the coordinate seems taking its basement as a reference.
    I mean, the jLabel Coordinate's is referenced
    from the panel where the jLabel is attached to,
    rather than the Coordinate's of the base jFrame (main base -what should I call this?)
    Sorry, the Details number three (3) is my preference, Since I wanted to see the X, Y movements also.

  • Drag and drop the text and image

    Hi,
    I need help in drag and drop text and image.
    I am able to drag and drop the text and image in doc but  i want to drag the text in text frame and image in image frame only.
    For this how to get textframe id or is there any other way to do this. Pls help me if anyone know how to do this one.
    Thanks
    Arun

    This thread is pretty old, but this can help anyone in the future:
    To handle a drop in InDesign, you have to implement your own custom CDragDropTargetFlavorHelper. You can find a working example in SDK Sample. Take a look at BasicDragDrop.sdk project in the SDK.

  • Create drag n drop area in AC4

    Hey guy!
    I've installed AC4 and viewed some tutorial, but I can't find any solution for create drag and drop area.
    Type
    Cost (USD)
    Beef
    200
    Chicken
    100
    TOTAL
    For example: When I want to create above table in Excel and I want user can interactive with this table to select all cell which have value to calculate sum? Can I create interactive area and user may drag and drop in this area? It's very important to me because I want user can calculate everything in Excel, drag any thing (like Table, AP DIV, Form Element) in Dreamweaver or Drag form element in Netbeans.
    Best regard.

    Hello again, BinaryDigit.
    I thought we need to apply Drag n drop API for this case.
    Without wasting too much time,
    I tried out as your source code from the previous reply,,,
    Instead of getting it clearly, I got another Confusion... (pardon me)
    Let me clarify this with the examples given,
    I try to adopt previous source code
    and it was this detail;
    1) Taking the X and Y coordinate (from the mouseEvent) Plus jLabel1 coordinate (both X and Y).
    2) Positioning a Coordinate taken to JLabel1
    3) Passing the Coordinate taken to jLabelX, and jLabelY.
    The problem found was;
    if we make 3rd become comments, now the jLabel1
    could works!
    I mean, jLabel1 could be dragged to another Coordinate (by dragging it to another location)
    But,
    if we un-comments the 3rd source code,
    The effect would be no movement of the jLabel1.
    BinaryDigit, is this related to the layout you mentioned before?
    Correct, DarrylBurke! :D
    I thought also the same thing,
    but setLocation() give me another Confusion....
    the coordinate seems taking its basement as a reference.
    I mean, the jLabel Coordinate's is referenced
    from the panel where the jLabel is attached to,
    rather than the Coordinate's of the base jFrame (main base -what should I call this?)
    Sorry, the Details number three (3) is my preference, Since I wanted to see the X, Y movements also.

  • Drag n Drop Explaination In Confused Mode Detected

    Forgive me if I'm wrong.
    But I'm currently still trying to understand about the concept of drag n drop dealing with Swing component.
    For the aim objective which I concerned is just to get understand how
    to make one and more Swing component to be draggable and could be dropped into another location within
    a single JFrame. Well, that's the 1st aim.
    And yet, these lines make me confused.
    >
    The Transferable object
    The java.awt.datatransfer.StringSelection class works well for transfers within the same JVM but suffers from a ClassCastException when used in inter-JVM cases. To solve this problem, you'll have to provide a custom Transferable object.
    >
    I'm using one single computer that has JRE installed on it, and the explanation said "within the same JVM", something like there's another JVM.
    ESpecially, the Inner-JVM what's that topics anyway?
    any one could lead me the way out?
    still trying to read and re read again...
    Where did I got this line anyway?
    Here:

    Hello again, BinaryDigit.
    I thought we need to apply Drag n drop API for this case.
    Without wasting too much time,
    I tried out as your source code from the previous reply,,,
    Instead of getting it clearly, I got another Confusion... (pardon me)
    Let me clarify this with the examples given,
    I try to adopt previous source code
    and it was this detail;
    1) Taking the X and Y coordinate (from the mouseEvent) Plus jLabel1 coordinate (both X and Y).
    2) Positioning a Coordinate taken to JLabel1
    3) Passing the Coordinate taken to jLabelX, and jLabelY.
    The problem found was;
    if we make 3rd become comments, now the jLabel1
    could works!
    I mean, jLabel1 could be dragged to another Coordinate (by dragging it to another location)
    But,
    if we un-comments the 3rd source code,
    The effect would be no movement of the jLabel1.
    BinaryDigit, is this related to the layout you mentioned before?
    Correct, DarrylBurke! :D
    I thought also the same thing,
    but setLocation() give me another Confusion....
    the coordinate seems taking its basement as a reference.
    I mean, the jLabel Coordinate's is referenced
    from the panel where the jLabel is attached to,
    rather than the Coordinate's of the base jFrame (main base -what should I call this?)
    Sorry, the Details number three (3) is my preference, Since I wanted to see the X, Y movements also.

  • Can shared actions reset with drag and drop?

    I'm currently creating an interactive module where the learner will need to drag and drop grey squares to the correct area on the screen.  If you see my picture below, I have a possible 20 grey squares needing to be dragged and dropped for each terminal that's on the lower right of the screen capture. I've created a shared action that shows different wires moving for each of the 20 grey squares moving from the upper image to the lower right image of the screen.  This is painstakingly time consuming, but worth the effect.  The problem I have stems from the drag and drop's "reset" button.  The "reset" button helps set the grey squares that are my drag sources to their original positions, but it does not reset the shared actions that correspond to the movement of each grey square.  Is there any way I can reset not only the drag sources, but also the shared actions associated with the drag sources?  Any help is truly appreciated. 

    This article might be useful: http://coenraets.org/blog/2007/06/air-to-desktop-drag-and-drop-two-simple-utility-classes/

  • Manually adding drag and drop

    Hi guys , obviously Im a newbie to flex...what I am doing is
    putting together a multipl file uploader so far so good but I now
    need to add drag and drop functionality and just stuck!
    1. so I am listening for drag enter and once a file or
    file(s) have been dragged over my target(datagrid) I will like to
    check the file type to ensure its of *.pdf else show and alert.
    2. I need to listen for drag drop or mouseUp and update my
    datagrid accordingly even extracting the file details from at this
    stage is baffling...pls find my code attached :(

    > Does that mean then there is some runtime introspection happening to see if the object's class is castable?
    The runtime understands what types are compatible with what other types. As a similar example that doesn't involve casting, you can assign a Button instance to a variable of type DisplayObject, but you can't assign it to a varible of type int. I believe it throws a TypeError when there is a type compatibility. But I don't think introspection is the right term for what is going on; I'd call it strict runtime type awareness.
    Gordon Smith
    Adobe Flex SDK Team

  • How do I drag-and-drop my Web Bookmarks Folder to a external flash drive? I need to move them from one Mac to another Mac.

    '''Moving Firefox URL Bookmarks from one Mac to another'''
    How do I drag-and-drop my web 'Bookmarks Toolbar' folder from one Mac to an external USB zip drive. Unable to network both Macs and use the migration feature. Must do this manually. Thanks!

    Hi RMcMullen,
    You should look at the [[Backing up your information]] Knowledge Base article. It will give you all the information you need to back up everything so you won't lose a thing.
    Hopefully this helps!

  • I just purchased Time Capsule today.  I ONLY want to use it as an external drive.  I do not need it for Time Machine. I can see the TC in my finder, but when I click on a file or video to drag and drop, I get message that TC can't be modified. Help please

    I just purchased Time Capsule today.  I ONLY want to use it as an external drive.  I do not need it for Time Machine. I need to free up room on my computer. As of now, I can't even load updates. I can see the TC in my finder, but when I click on a file or video to drag and drop, I get message that TC can't be modified. Help please!

    I agree with Kappy.. passing files and especially via wireless is slow as slow.
    Just need to be sure your TC is the new AC model??
    And the OS on the computer is Lion?
    Have you completed the setup of the TC via the utility? You do still need to get internet via the TC so it has to be plugged into the main router..
    Give us the full picture of the network.
    Then we can help you get into it.. whether you should put your files on it is another question.

Maybe you are looking for

  • Wireles sync not found in options for any of the "syncable" modules

    When syncing, I get a message that my Outlook calendar can't be synced because Wireless is turned on.  Help tells me " On your BlackBerry® device, in the Calendar application, Contacts application, Tasks application, or MemoPad, press the Menu key >

  • Video chats get only 1 frame per second on my friend's macbook.

    Hi. My friend has a macbook, and whenever she video chats anyone, the video will only change 1 frame per second after 10 seconds in the video chat. Like the first 10 seconds, she`ll get 30fps but then after 10 - 15 seconds, it'll go down to 1 fps. It

  • Blu-Ray Capabilities

    I just bought Toast 9 for my MacBook Pro. A big idea is to be able to burn High Definition Video DVDs, such as Blu-Ray. Will a newer MacBook Pro (purchased new late-November 2007) burn High-Definition DVD? Blu-Ray? If not, what do I need to do to get

  • Dbconsole won't start in FC7

    Hi there, I am running oracle 11g on FC7 x86. Fresh install with all updates installed. I can get the listener up and running. That was not running, as it had the wrong FQDN. so I: $ vi /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora a

  • Trying to get a jpeg to play as a video file for 13 mins

    I have a pic from iphoto that I have exported to 60 secs. Whats the easiest way to make this 13 mins? doesn't look I can copy and paste in Itunes. I know there has to be a simple way of doing this. I have logic studio and of course everything that co