Problem with drag and drop

Hi! I'm having a problem with getting this code working, basically I want to drag and drop two things onto another the things dissapear then it moves onto a new page, the first item works properly but then the second item wont dissapear and remains stuck to the cursor. Heres the code I'd be greatful of any help.
import flash.events.MouseEvent;
import fl.motion.MotionEvent;
stop();
Back6_btn.addEventListener(MouseEvent.CLICK, onBack6Click)
function onBack6Click(event:MouseEvent):void{
    gotoAndPlay("Bedroom2");
    Forward6_btn.addEventListener(MouseEvent.CLICK, onForward6Click)
function onForward6Click(event:MouseEvent):void{
    gotoAndPlay('Brother bit');
var inGran:Number=0;
Gin.addEventListener(MouseEvent.MOUSE_DOWN, dragOn);
Tonic.addEventListener(MouseEvent.MOUSE_DOWN, dragOn);
function dragOn(event:MouseEvent):void {
    event.target.startDrag(false);
    stage.addEventListener(MouseEvent.MOUSE_UP, dragOff);
function dragOff(event:MouseEvent):void {
    event.target.stopDrag();
    if (event.target.dropTarget!=null&&event.target.dropTarget.parent==Gran) {
        event.target.visible=false;
        inGran++;
    stage.removeEventListener(MouseEvent.MOUSE_UP, dragOff);
function checkPage(e:Event):void {
    if (inGran==2) {
        gotoAndPlay("Bedroom1");

you have some mismatched brackets, change your target properties to currentTarget (and i'm not sure you're dropping onto the correct target) but, try:
import flash.events.MouseEvent;
import fl.motion.MotionEvent;
stop();
Back6_btn.addEventListener(MouseEvent.CLICK, onBack6Click)
function onBack6Click(event:MouseEvent):void{
    gotoAndPlay("Bedroom2");
    Forward6_btn.addEventListener(MouseEvent.CLICK, onForward6Click)
function onForward6Click(event:MouseEvent):void{
    gotoAndPlay('Brother bit');
var inGran:Number=0;
Gin.addEventListener(MouseEvent.MOUSE_DOWN, dragOn);
Tonic.addEventListener(MouseEvent.MOUSE_DOWN, dragOn);
function dragOn(event:MouseEvent):void {
event.currentTarget.parent.addChild(event.currentTarget);
    event.target.startDrag(false);
    stage.addEventListener(MouseEvent.MOUSE_UP, dragOff);
function dragOff(event:MouseEvent):void {
    event.target.stopDrag();
    if (event.target.dropTarget!=null&&event.target.dropTarget.parent==Gran) {
        event.target.visible=false;
        inGran++;
    stage.removeEventListener(MouseEvent.MOUSE_UP, dragOff);
function checkPage(e:Event):void {
    if (inGran==2) {
        gotoAndPlay("Bedroom1");

Similar Messages

  • Problem with Drag and drop in panel dashboard

    Hi
    I am having problem with drag and drop in panel dashboard.
    I will explain what i am doing.
    I am using Oracle three column template in First region i am having a table that showing all customer.
    I drag one record from my table and drop it on customer info (CIF) page on second region it is working fine.
    my CIF page has a dashboard with 6 panel box. i am showing 6 different jsff in 6 panel box.
    I put drop target in each jsff
    <af:dropTarget dropListener="#{backingBeanScope.backing_customerinformation.handleItemDrop}"
    actions="COPY">
    <af:dataFlavor flavorClass="org.apache.myfaces.trinidad.model.RowKeySet"
    discriminant="CustomerSearchDnD"/>
    </af:dropTarget>
    when i put drop target my panel boxes moves only when i drag it to another panel box header not entire part of panel box.
    if i remove the drop target then panel box move normally as the example given on: [http://adfui.us.oracle.com:7778/faces-trunk/faces/visualDesigns/dashboard.jspx?_afrLoop=2021391022520156&_afrWindowMode=0&_afrWindowId=null] but in taht case i am not able to drag and drop my data

    You must be an Oracle employee as you're referring to a component in the upcoming JDeveloper version which has yet been released to the general public. Oracle employee's are, I believe, directed to post on internal Oracle forums.
    CM.

  • Problem with Drag and Drop on a JTree

    I would like to have a JTree with drag and drop support with the following characteristics:
    1) The JTree holds near 100 different kinds of TreeNodes
    2) The drag and drop operation uses TreeNodes as Transferable
    3) The drop operation adds a new TreeNode child on the TreeNode that accepts the drop
    4) There are some rules for a TreeNode to accept the drops by example:
         Type1 can accept Type2
         Type2 can accept Type3
         All other combinations are not allowed
    I am using the following classes to support this behavior
    JTree
    DataFlavor
    DragSourceListener
    DropTarget
    DropTargeListener
    DragSource
    GestureListener
    Transferable
    The question is:
    How to change the cursor shape when the mouse is over a node to show graphically the drop accepting rules.?
    I can not use the the following methods to change the cursor-shape
    DropTargetListener.dragEnter
    And
    DropTargetListener.dragOver
    Case they receive a DropTargetDragEvent witch don�t knows nothing about the TreeNode type dragged.
    I can not create a TreeNode on the method GestureListener.dragGestureRecognized cause this could not work when dragging between two diffents JVM.

    Hello,
    You might want to search this forum for this class : DNDTree.java. It pretty much does the job.

  • Problem with drag and drop on Mac

    Hi, when I run my AIR application on Windows, I'm able to do
    the drag and drop.
    But when I run the application on Mac, it gave me an
    allocation error: unable to allocate region of size <random
    number> after I drag and drop thrice.
    Anybody knows what's the reason?

    Pages does not support the Apple font used for color emoji, so that behavior is normal.
    With what app are you reading the yahoo mail?  There is really no guarantee than any other email service will show the special Apple font involved.
    You should have no problem putting emoji directly into Mail or Text edit via drag drop from the Character Viewer as shown below.
    You should also be able to upload graphics here easily by clicking on the camera icon.  My email is tom at bluesky dot org.

  • Problem with Drag and drop manager

    I am noticing that the sample provided at
    http://livedocs.adobe.com/flex/3/html/help.html?content=dragdrop_7.html is not working when tried on any version of FireFox browser on a Mac OS version 10.6.3.
    So my understanding is that there seems to be some problem with the drag and drop manager in Flex when used on Firefox on a Mac OS version 10.6.3.
    It will be very helpful if you can provide any work around for this issue. We want to implement the drag and drop feature in a website that we are building for one of our clients.

    You must be an Oracle employee as you're referring to a component in the upcoming JDeveloper version which has yet been released to the general public. Oracle employee's are, I believe, directed to post on internal Oracle forums.
    CM.

  • Problem with Drag and Drop (TransferHandler)

    I have a stern problem with the java.swing.TransferHandler. It shows a design weakness, and because of a tiny glitch I am currently not able to finish my task.
    The design weakness is that method importData(JComponent comp, Transferable t) does not pass the dropAction information in the parameter list. The application case in question is a transfer from a JTree to a JTree (might likewise be to/from a JList). The transfer semantics imply that partial success is possible (there are item identity and uniqueness considerations to handle). - I can deal with all detail demands except that I cannot discriminate between COPY and MOVE taking place in the transfer. Also I don't find any possibility to retrieve this information by subclassing TranferHandler or from any other element there.
    Is there any expert who knows a solution?

    I came up with two solutions. One is I modified my application requirements for the time being so the problem disappears. :)
    Second, I had the idea to create a subclass of javax.swing.TransferHandler and copy/override as many methods as necessary to allow for an extra method public boolean importData(JComponent comp, Transferable t, int action) and derive the extra value from a modified method DropHandler.drop(DropTargetDropEvent e) in a copy of the DropHandler.
    Whether this really works, I have not tested.
    As for your answer, Andre_Uhres, I don't find it elaborate enough that it leads to a solution, hence no stars rewarded. You leave it open how to get hold of the DropTarget events which are dealt with privately in javax.swing.TransferHandler.
    I consider the subject closed for my purposes. Thanks very much for your reply!

  • Problem with drag and drop application windows from one workspace to another

    I work with multiple desktops (Spaces) and before I freely dragged the mouse a window from one space to another, now the mouse rests on the edge of space and the application does not become the next space. What am I doing wrong or where this option is set?

    After the publication of the problem has disappeared, the window is dragged. Miracle! )

  • Is it possible to create a tree with drag-and-drop functionality using ajax

    I saw these samples;
    Scott Spendolini's AJAX Select List Demo
    http://htmldb.oracle.com/pls/otn/f?p=33867:1:10730556242433798443
    Building an Ajax Memory Tree by Scott Spendolini
    http://www.oracle.com/technology/pub/articles/spendolini-tree.html
    Carl Backstrom ApEx-AJAX & DHTML examples;
    http://htmldb.oracle.com/pls/otn/f?p=11933:5:8901671725714285254
    Do you think is it possible to create a tree with drag-and-drop functionality using ajax and apex like this sample; http://www.scbr.com/docs/products/dhtmlxTree/
    Thank you,
    Kind regards.
    Tonguç

    Hello,
    Sure you can build it, I just don't think anyone has, you could also use their solution as well in an APEX page it's just a matter of integration.
    Carl

  • How can i get the address with drag and drop from address book into pages?

    I want to creat a letter withe the new pages. Normaly it was possible to put the adress from the adressbook with drag and drop into the letter. So it was possible to create one letter with many different adresses. But now I didn't find this function any more. How to do ist now?
    Withe best regards and I'm sorry for may bad english
    Klaus

    Sounds like you "upgraded" to Pages 5.
    Apple has removed over 90 features from Pages 5.
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5, after Exporting your files to Pages '09, and rate/review it in the App Store, then get back to work.
    Peter

  • SharePoint Server Publishing Infrastructure with drag-and-drop

    Hello,
    When I activated "SharePoint Server Publishing Infrastructure" future, I can no longer use drag-and-drop functionality between two libraries (eg. drag from Document Library to MyDoc library). When I disable it, drag and drop is possible.
    But I need both of this functionalities, because i use Managed navigation. What should I do?
    Thanks in advance,
    Tomaz

    Hi Tomaz,
    According to your description, I could reproduce this issue as:
    1. Create a web application with team site
    2. Create a new library called docA, upload a new document
    3. Then I could move the document to Document library with drag-and-drop feature
    4. Activate SharePoint Server Publishing Infrastructure
    5. I could not move the document from Document library to docA library with drag-and-drop feature
    6. Upload a new document to docA, then also could not move it to Document library with drag-and-drop feature
    Since you also want to use Managed Navigation, you can use Content and Structure feature to move a document from one library to another library. You can do as Site Settings->content and structure under Site Administration->clicking on the library,
    then you can move or copy the document to the destination library.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Possible Bug with Drag-and-Drop Being Published via HTML5 - Getting "Undefined" Error When Dragging Object

    Hello,
    I came up with a way to use drag-and-drop interactions that will take advantage of file input so that I may create a drag-and-drop interaction that uses one draggable object over and over allowing multiple scoring/tracking possibilities.  Example use...is having the draggable object be dynamic in that it randomly changes its text so that a learner can drag a term it's possible classification.........thus allowing the possibility of having many terms easily loaded without having to redo a drag-and-drop interaction for each needed terms/classifications updates/changes.
    My Issue: When using a variable to represent the text for a draggable Smart Shape object, I'm getting the error message "undefined" when, clicking/pressing on the object, as well as during the drag of the object. This issue occurs when publishing the project in an HTML5 format.  Flash interestingly enough seems to work perfect...but we are not interested in publishing via Flash any longer.
    To better help you explore this error message, I've set up a test project so that you can see when and how the "undefined" message shows up during a drag-and-drop interaction.  I've also included the Captivate 8 project file used to make the exploration project I'm sharing in this post.
    Link to Captivate project I created for you all to explore "undefined" error message": http://iti.cscc.edu/drag_and_drop_bug/
    Link to this Captivate 8 Project file: http://iti.cscc.edu/drag_and_drop_bug.cptx
    It's pretty interesting how things react in this demo, please try the following actions to see some interesting happenings:
    Drag the Yellow (or variable drag box) to the drag target.
    Drag Black Hello square to Drag target and click undo or reset - watch the undefined message come up on the Yellow (or variable drag box).
    Drag the Yellow (or variable drag box) to the drag target and then use the undo or reset.
    Move both draggable boxes to the drag target and use the undo and reset buttons...
    Anyhow, I know you all are sharp and will run the demo through its paces.
    I'd really be very honored if anyone help me figure out how I could (when publishing out to HTML5) no longer have the "undefined" error message show up when using drag-and-drop with a variable for shape text. This technique has been well received at the college I work at...and I have many future project requests for using such an idea on a variety of similar interactions. I'd love see a solution or see if this might be a bug Adobe may be able to fix!
    I tried to find a solution to the issue documented here for quite some time, but I was not able to find anyone with this problem much less attempting the idea I'm sharing in the help request -  save the darn "undefined" message that comes up!
    Many thanks in advance for any help and/or direction that you all may be able to provide,
    Paul

    Hello,
    I just wanted to supply a minor update related to my drag-and-drop question/issue stated above:
    I did another test using Captivate 7, and found that the undefined error (publishing as HTML5) does not appear and the variable data remains visible - except the variable data turns very small and does not honor any font size related settings.
    I did go ahead and submit this to Adobe as a possible bug today.
    Thanks again for any help related to this issue.  If the issued documented above is solved, it will allow many amazing things to be done using Captivate's drag-and-drop for both regular type projects as well as interaction development for iBooks! 
    Matter of fact if this issue gets fixed, I'll publish a Blog entry (or video) on way's I've used Captivate's drag-and-drop to create dynamic learning activities for Higher Ed. and for use in iBooks.
    ~ Paul

  • Stacked BarChart with drag and drop

    Hi,
    I have a BarChart with a stacked BarSet that can be drag and
    dropped. The problem is that when I click on a BarSeries in the
    chart to initiate a drag, only that BarSeries is being visually
    dragged. I would like to visually drag all the BarSeries in the
    stacked BarSet.
    This is better explained with a "picture". Suppose I have the
    following stacked mini-chart:
    XXXXXYYYYYYYYYYYYYYZZZZ
    XXXYYYYYYYYYZZZ
    XXXXXXXXXXXXXXXXXXXXXXYYYYYYYZZZ
    XXYYYYYYYYYYYZZZ
    XXXYYYZZZZZZZZZZZZZZZZZZZ
    Here X, Y and Z are BarSeries. When I click on ZZZ to
    initiate a drag, only the ZZZ is visually dragged. I understand
    that this is okay, but in my case I want to see XXXYYYZZZ visually
    dragged.
    How can I do this?
    Cheers,
    Andrej

    "mavdzee" <[email protected]> wrote in
    message
    news:gavo13$lpu$[email protected]..
    > Does anybody know this? How can I select sub-bars in a
    stacked BarSeries
    > in ActionScript? Is this possible?
    At a guess, I'd hide the real bars and make a dragProxy from
    a bitmap
    capture of the entire stack...

  • [ASK] Show Object with Drag and Drop Condition

    Hello guys,
    I just finished making my simple drag and drop quiz which i've already mentioned in the previous thread. But i still have a problem. I've searched through the Internet, but i didn't find any case similar with my case.
    Please take a look at this picture :
    I want to hide the "nextbutton" (D button) then show (unhide) the button with some conditions, here are the conditions :
    If "p=>~q" square dragged on "A" white square && "~q" square dragged on "B" white square && "~p" square dragged on "C" white square then,
    Button D = visible
    else
    Button D = not visible
    How can i do this in actionscript 3.0?
    Any help would be appreciated. Thank you very much.

    I'm sorry, i haven't told you that i've already tried to do it with hitTestObject function, but it doesn't work, the D button never shows up even i dragged the squares on the right spot, here is some of the actionscript :
    Square_4 = pnotq
    Square_5 = notq
    Square_1 = notp
    /* Stop at This Frame
    The Flash timeline will stop/pause at the frame where you insert this code.
    Can also be used to stop/pause the timeline of movieclips.
    stop();
    //Hide and Show Actionscript
    if(Square_4.hitTestObject(Target_2) && Square_5.hitTestObject(Target_1) && Square_1.hitTestObject(Target_3)){
    Next.visible=true;
    } else {
    Next.visible=false;
    //ButtonMode Actionscript
    Square_1.buttonMode = true;
    Square_4.buttonMode = true;
    Square_5.buttonMode = true;
    //Some part of the Drag and Drop Actionscript
    (I made drag and drop for all the squares (1-7))
    var startX:Number;
    var startY:Number;
    Square_4.addEventListener(MouseEvent.MOUSE_DOWN, pickMe);
    Square_4.addEventListener(MouseEvent.MOUSE_UP, dropMe);
    function pickMe(event:MouseEvent):void {
        event.target.startDrag(true);
        startX = event.target.x;
        startY = event.target.y;
    function dropMe(event:MouseEvent):void {
        event.target.stopDrag();
        var myTargetName:String = "target" + event.target.name;
        var myTarget:DisplayObject = getChildByName(myTargetName);
        if (event.target.dropTarget != null && event.target.dropTarget.parent == Target_2){
            event.target.removeEventListener(MouseEvent.MOUSE_DOWN, pickMe);
            event.target.removeEventListener(MouseEvent.MOUSE_UP, dropMe);
            event.target.buttonMode = false;
            event.target.x = Target_2.x;
            event.target.y = Target_2.y;
        } else {
            event.target.x = startX;
            event.target.y = startY;

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

  • Unable to upload a file with Drag and Drop and http

    Hello,
    I am trying to upload a file through the web interface (Netscape 4.7 and IE 5.0). When I click un upload, Via Drag and Drop, a new window is started, but never completes.
    With Netscape, I get a message box: Netscape is unable to locate the server null. Please check the server name and try again.
    With IE 5, I get an error: This page can not be displayed.
    Are there any files I need to edit on the PC side to get this to work?
    Thanks
    Scott
    PS I think you guys are doing a great job with support on iFS.

    WebUI Drag & Drop requires FTP to be running and available.
    Drag & Drop is really just uses the browser built in FTP ability.

Maybe you are looking for