Stop drag and drop in end... and show the end

Hi.
I use the next code for drag and drop. I move item1 for bin1, item2 for bin2 but when i move the item3 for the correct bin3... the solution  everything disappears...
How i can stop the end?
item1.objName = "circle";
item1.initX = item1.x;
item1.initY = item1.y;
item1.val = 0;
item2.objName = "rectangle";
item2.initX = item2.x;
item2.initY = item2.y;
item2.val = 0;
item3.objName = "triangle";
item3.initX = item3.x;
item3.initY = item3.y;
item3.val = 0;
bin1.shape.alpha = 0;
bin2.shape.alpha = 0;
bin3.shape.alpha = 0;
item1.buttonMode = true;
item2.buttonMode = true;
item3.buttonMode = true;
item1.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
item1.addEventListener(MouseEvent.MOUSE_UP, mouseRelease);
item2.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
item2.addEventListener(MouseEvent.MOUSE_UP, mouseRelease);
item3.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
item3.addEventListener(MouseEvent.MOUSE_UP, mouseRelease);
//Mouse Events
function mousePress(event:MouseEvent):void {
          var item:MovieClip = MovieClip(event.target);
          item.startDrag();
          item.scaleX = item.scaleY = .95;
          var topPos:uint = this.numChildren - 1;
          this.setChildIndex(item, topPos);
          ilabel.itemName_txt.text = item.objName;
function mouseRelease(event:MouseEvent):void {
          var item:MovieClip = MovieClip(event.target);
          item.stopDrag();
          switch (item.objName) {
case "circle" :
                    if (bin1.hitTestObject(item)){
                    updateShape(item, bin1);
            else{
                    ilabel.info_txt.text ="WRONG!";
                    item.scaleX = item.scaleY = 1
break;
case "rectangle" :
                    if (bin2.hitTestObject(item)) {
                    updateShape(item, bin2);
                    else{
                    ilabel.info_txt.text ="WRONG!";
                    item.scaleX = item.scaleY = 1
break;
  case "triangle" :
if (bin3.hitTestObject(item)){
                    updateShape(item, bin3);
                    else{
                    ilabel.info_txt.text ="WRONG!";
                    item.scaleX = item.scaleY = 1
break;
  default :;
function updateShape(item:MovieClip, bin:MovieClip):void {
          ilabel.itemName_txt.text = "";
          item.scaleX = item.scaleY = 1;
          item.visible = false;
          ilabel.info_txt.text ="CORRECT!";
          bin.shape.alpha = 1;
          item.val = 1;
          resetShapes();
function resetShapes(){
          if((item1.val == 1)&& (item2.val == 1) && (item3.val == 1)){
                    item1.x = item1.initX;
                    item1.y = item1.initY;
                    item2.x = item2.initX;
                    item2.y = item2.initY;
                    item3.x = item3.initX;
                    item3.y = item3.initY;
                    bin1.shape.alpha = 0;
                    bin2.shape.alpha = 0;
                    bin3.shape.alpha = 0;
                    item1.visible = true;
                    item2.visible = true;
                    item3.visible = true;
                    item1.val = 0;
                    item2.val = 0;
                    item3.val = 0;

i need
bin1.shape.alpha = 0;
bin2.shape.alpha = 0;
bin3.shape.alpha = 0;
for the start.
properly when I put the first ... all OK.
properly when I put the second ... all OK.
the problem is when I correctly put the third ... everything back to start automatically but I do not want.
someone can help me

Similar Messages

  • Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?

    Hi, Im not a frequent forum poster, as most of my questions can be found already answered on them!
    This is a question Ive had for a long time and it amazes me that no-one else seems to ask it. I check at each OS upgrade but its never there...
    Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?
    I was able to do this years ago in MS Outlook, and utilized it all the time when I needed to push things back, now I have to open the event and select an new date in the drop-down calendar for each & every event I want to move to a new month at the end of the month.
    If its definitely not possible, how to you ask apple to consider including it - it doesnt seem like a particularly difficult task.
    Thankyou
    Andrew.

    Andrew,
    Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?
    No, but you can use cut/paste. Cut (⌘X) the event, then click on the week where you want to move the event, and Paste (⌘V).
    If you have a suggestion for Apple to change that method use: Apple - Mac OS X - Feedback.

  • Getting a stop  symbol while dragging and dropping in IE9 and IE8

    Hello,
    I have implemented the drag and drop of row in a table. The functionality is working fine but in IE 8 and IE9 when I drag and drop the row over another row it is showing a stop sign, though in-spite of that stop symbol the drag and drop is working fine. I am using jdev 11.1.1.6
    Thanks
    Tarun

    Hi,
    The cursor is under the control of the drag and drop framework during drag and drop operations. So if the behavior is normal on FF and /or Chrome and you have a support contract, please file a service request asking the analysts to look at your test case. Alternatively you can try and set.
    If you don't have a support contract (still we are interested to get this issue checked), please send a test case to myself (mention your OS and the exact IE versions - you find that in the Help / About). In the latter case zip the workspace, rename the zip to unzip and use the mail address in my OTN profile.
    Frank
    Disclaimer: Bugs I file flagged "internal" and not visible outside of Oracle. In addition I don't track bugs to provide status updates.

  • When moving a file using drag and drop, as I hover over the destination folder it no longer opens, so I can't drop the file into the folder.  Why?

    When moving a file using drag and drop, as I hover over the destination folder it no longer opens, so I can't drop the file into the folder.  Why?  I have a heirarchical embedded folder structure under \Documents.  Usually, as I drag the file to be moved over the various folders, they will blink twice, then expand/open to reveal contents (in Finder).  Now, when the file to be moved is held (hovering) over the destination folder, it will not blink or expand, so there's no place to drop the file.  If I release the mouse button, the file image disappears, showing that it is "going back to the place it came from", a.k.a. was not moved.  This just started happening.  I noticed it after upgrading to Mavericks.  Is this a bug or could anything else be causing this?

    As of today, Apple Support discovered during a remote support session with me that the same thing happens on their own system.  It is isolated to "Column View"; the Icon and List views in Finder behave correctly.  Issue is being escalated to engineering, and Apple will call to report status in a couple days.  In all likelihood, this is a bug that will need to be addressed in a future update.

  • I can't drag and drop or cut and paste all of a sudden! Help

    I can't drap and drop or cut and paste all of a sudden.  I updated my windows suite and ditched the old stuff.  The next day no drag, drop, cut and paste.
    <Email Edited By Host>

    *FireFTP: https://addons.mozilla.org/firefox/addon/fireftp/

  • I have 2 auxillary disk drives for my MacBokk Pro. Time Machine uses one for backup and I use the other for storage, but I am unable to create a new folder or drag and drop files or folders to the aux drive.

    I am unable to create a new folder on either of my auxillary disk drives.  I can access the files and folders that were there when I transferred one of the drives from a PC.  Time machine uses one for backup and I want to use the other to store photos which are large files.  An help would be appreciated.

    Thanks for the reply.  If I reformat the drive will I be able to access the files on it from the MAC.  I do not share the drive with a PC.  The files were originally created on a PC which I no longer use.  I do want to continue to access the files put there by the PC.  I would like to not have to copy them over to the MAC hard drive just to use them.  The second aux drive is new and works fine because it was formatted by the MAC.  I can drag and drop files there and work with just as if they were on the internal drive.

  • I recently Updated my phone and my front camera stopped working its pitch black but still shows the icons on the screen but when i get off the app and get back on and flip the camera to my face view it works fine

    I recently Updated my phone and my front camera stopped working its pitch black but still shows the icons on the screen but when i get off the app and get back on and flip the camera to my face view it works fine

    Hi there Fgonzalez2015,
    You may find the camera troubleshooting steps in the article below helpful.
    Get help with the camera on your iPhone, iPad, or iPod touch
    You see a closed lens or black screen
    If you see a closed lens or black screen when you open the Camera app, try these steps:
    Make sure that there’s nothing blocking the camera lens. If you’re using a case, try removing it.
    Force the app to close, then open the Camera app again.
    Restart your device, then open the Camera app again.
    If your device has a front and rear camera, try both cameras by tapping the camera swap icon . If you see the closed lens or black screen on only one camera, take your device to an Apple Retail Store or Authorized Service Provider for more help.
    -Griff W.  

  • Can't drag and drop nor copy  and past with iMac with OS 10.8.1.

    Can't drag and drop nor copy and past with iMac with OS 10.8.1.  Not with iTunes, MS Word, nor Pages.  No where.  Reboot or relogging in helps for about an hour.  Hard reset worked for a short time. Per Apple support, most likely will reinstall the operation system.  Just wondered if anybody else has run into this.  Did a disk scan, and that was fine.  And did rebooting, holding down CMD+OPT+R, and P..  Deleted all the start up programs.  Checked the internet, no solutions there.  So it all appears to be OS redo time. 

    Do you subscribe to MLB.tv, and if so, did you install the NextDef plug in? If so, read this…
    https://discussions.apple.com/message/19185556#19185556
    I removed the NextDef plug in over 24 hours ago, restarted and haven't had a single issue with drag and drop or cut and paste since.

  • Can't Drag and Drop, or cut and paste

    Weirdest thing - all of a sudden I can't drag and drop, or cut and paste. I fixed permissions, deleted varied preference files and rebooted, reset the permissions on /tmp, etc. and still no go.
    Any suggested avenues to find what the possible problem is, and how to solve (short of reinstalling)?

    On the left side of the browser at the top of the iPhoto window you will see two symbols. The top one looks like a sheet of paper with the corner folded down, the bottom looks like multiple sheets/cards. If you click on the top symbol, you will view thumbnails of the pages in the book; the bottom gives you photos. At the bottom left of the window, there are two buttons above the word "view". Clicking on one button versus the other changes the window to view either one or two pages. This also affects whether or not the pages are locked together in the browser. When you are in page view, you can drag and drop pages in the browser to create the order you wish.
    I hope this helps.

  • Drag and Drop between JTree and Labels in 2 different panes

    Hi,
    I am using JDK 1.4.1 and am trying to implement Drag n Drop between a JTree and JLabels with ImageIcons, both on different panes.
    I got the DnD working fine on the tree. but i cant get to drag and drop the label from the other pane, on the Jtree as a node. I am getting confused with the DataFlavors, and also wonder if there is something else that i have to do for DnD between 2 panes. Can someone give me any leads on this, please? The Panes I am talking about are splitpanes.
    thanks,
    Sri.

    hey thanks Dennis!! I was hoping you would respond to my question, as I have seen a lot of your replies. yes, the example you gave would be helpful. but i am trying to implement this in 1.4.1, with the new drag and drop in swing. and i am getting confused wiht theh data flavors etc.
    my problem at hand is :
    I have a tree on the left pane. i can drag and drop the nodes on the tree itself. (i already did that...no problem). I have Jlabels with imageicons (actually wrapper classes with labels and imageicons) on the right pane. i have to be able to drag these labels to the tree such that they form a node.
    I have one class the NodeSelection class which extends TransferHandler and implements Transferable. i was able to do DnD for the tree using this. I customized the importData method in this.I thought that i can just use the same class to create the transferhandler and transferable, and just use a different implementation for the importData method if the data being dragged is from the label.
    well, my thoughts and ideas were ok...but i can implement it...so they must be wrong ;-)
    Can u please suggest another way to do this. I have a deadline to meet and am stuck here :-( any suggestions or tips or hints would be very helpful and appreciated!!
    Thanks,
    Sri.

  • Drag and Drop Apps to and from Dock, doesn't work for one account?

    Hi there,
    I have 2 accounts on my Macbook, one of them is my main account which is admin and nothing is wrong with it. The second account though is also admin but I cannot drag and drop applications to and from the dock. I can open the program, hold left click down till it pops up with options and in which you can untick Keep in Dock. Which would be fine but as soon as the computer restarts or I log out then in again, the application reappears. Any help or ideas would be much appreciated.
    Note that I have deleted both plist files from library/preferences and I have also enabled parental controls and ticked the allow users to modify the dock option. I also tried downloading Onyx and setting it up through there but it was a no go. Anyway, if anyone has any idea then that would be awesome.
    Cheers

    TheArtieChoke wrote:
     The second account though is also admin but I cannot drag and drop applications to and from the dock.
    Ok, you can drag applications from your Applications and Utilities Folders to make a "alias" (aka shortcut) in the Dock, but if you drag the icon off and drop it, it "poof's" away as your deleting the alias. The program itself isn't in the Dock at all at any time.
    TheArtieChoke wrote:
    I can open the program, hold left click down till it pops up with options and in which you can untick Keep in Dock. Which would be fine but as soon as the computer restarts or I log out then in again, the application reappears.
    Right, when you run a program from where ever, it places a alias icon in the Dock, which you then right click and choose to keep the alias in the Dock which survives reboots and logouts/in as normal.
    If you right click and choose "open at log-in" the program will automatically run when you restart or log back into the account.
    TheArtieChoke wrote:
    Note that I have deleted both plist files from library/preferences and I have also enabled parental controls and ticked the allow users to modify the dock option. I also tried downloading Onyx and setting it up through there but it was a no go. Anyway, if anyone has any idea then that would be awesome.
    I don't see any problem, other than your not knowing the icons in the Dock are aliases.
    You should set the same user controls and preferences on the second admin as the first and your problems should disappear.
    OnyX is a great program, I recommend it highly, but I don't see it fixing your problem in this case. Unless there is something your not being clear on.

  • I can't copy iPhoto to my external hard drive. It will not allow me to drag and drop or copy and paste., I can't copy iPhoto to my external hard drive. It will not allow me to drag and drop or copy and paste.

    I can't copy iPhoto to my external hard drive. It will not allow me to drag and drop or copy and paste., I can't copy iPhoto to my external hard drive. It will not allow me to drag and drop or copy and paste.

    NTFS is your problem.
    iPhoto needs to have the Library sitting on disk formatted Mac OS Extended (Journaled). Users with the Library sitting on disks otherwise formatted regularly report issues including, but not limited to, importing, exporting, saving edits and sharing the photos.
    See this article
    http://support.apple.com/kb/TS5168
    for more. Note also the comment:
    “Additionally, storing the iPhoto library on a network rather than locally on your computer can also lead to poor performance or data loss.”

  • Drag n Drop between JButton and third party Java object

    Hi!
    I want to implement drag n drop(however it is not drag n drop in its real sense) between JButton(s) placed in a JToolBar and third party Java Object i.e. Netbeans Visual Library API's Scene class that is actually like a Canvas in drawing Apps. The Scene class itself is not a JComponent (it extends directly from java.lang.Object), rather we invoke createView method on the Scene object to get a JComponent that could be used any where(probably in a JScrollPane).
    What i want is that when my user drags a JButton to the Scene's view it appears similarly as something is being dragged But in actaul that JButton should'nt be dragged or dropped Rather when user releases the mouse button to drop the item i could use my custom code to do something(actually add a Widget(a graphical item) to the Scene object).
    How could this be achieved..?
    thanks in advance,
    regards.

    The problem with UNIX and more specially with X is thare wasn't common drag'n'drop interface. Now there is XDND (X Drag'n'drop) protocol but it might not be implemented on each X server or may not be used by each X application.
    I don't know if GNOME use XDND and/or if Java implementations for UNIX support that protocol. However you can check some other projects like:
    http://java-gnome.sourceforge.net/
    http://gnome-gcj.sourceforge.net/
    which provide external bindings of gnome libraries to java.

  • My touch pad is no longer responding to hard press downs for drag and drop or copy and paste

    my touch pad is no longer responding to hard press downs for drag and drop or copy and paste ability

    may be a totally stupid question, but how can I tell?

  • Trying to burn a playlist in itunes and i get this message at the end 'The attempt to burn a disc failed. An nknown error occurred (4450)'.  This is with a new Dell laptop running windows 8. The playlist was 17 songs from cd's and itunes.  Any ideas?

    Trying to burn a playlist in itunes and i get this message at the end 'The attempt to burn a disc failed. An nknown error occurred (4450)'.  This is with a new Dell laptop running windows 8. The playlist was 17 songs from cd's and itunes.  Any ideas?

    try this...
    This is how I managed to fix the problem...and I hope this helps others in the similar situation.
    I tried with another program..latest version of Nero, and this was also stopping at the 'initialising' stage. I was now lost! I thought the last resort is to give Evesham (My PC manufacturer) a buzz. They were very helpfull. Basically go into 'Control Panel', 'System', and click on the Hardware tab, then 'Device Manager'. Uninstall everything in the DVD/CDRom Drives. Then uninstall everything under the catagory IDE ATA/Atapi disk controllers. This is where my problem was, as I only had one IDE channel here. You should have 4 or 5! Reboot your machine, and everything will automatically re-load. I tried burning using Nero and it worked. Then the big test was iTunes. It worked 1st time!
    I asked why the IDE channels have dissappearred, and he said sometimes uninstalling Programmes occasionally removes them.
    I hope this will help others who are having problems to burn stuff on iTunes.

  • HT4623 I have an iPod with iOS 4.2.1 and would like to up date version 5. The pc I normally sync with has XP operating system. So I can't up date to iTunes 10. And my iPod doesn't show the software update button shown in the article. What can I do?

    I have an iPod with iOS 4.2.1 and would like to up date to version 5. The pc I normally sync with has XP operating system. So I can't up date to iTunes 10. And my iPod doesn't show the software update button shown in the article. What can I do?

    You cannot update it if you can't get the latest version of iTunes. Actually, the latest version of iTunes will run in XP if you have Service Pack 2. Also, you posted in the iPad forum, and your profile shows you have an iPad, but in your post, you say it is an iPod. Is it an iPad or an iPod?

Maybe you are looking for

  • My mac mini won't open Pages

    Every time I try and open pages on my mac mini. When I try and open it It lets me choose the style of page I want then says there has been an error. What do I do? (I just got my first mac)

  • Logical System,Business System

    Hi Gurus, What is Logical System? n What is Business System? Wt is the Difference betweent these two?Can you explain me in detial. thanks in advacne.

  • Problems with motion media

    I have a 1.2ghz G4 ibook with 256 built-in RAM. No matter if I have one or 3 applications running, Windows Media Player is choppy and cuts out. So is Shockwave & Flash. Even Quicktime loads choppily. My internet connection is solid, and the problem p

  • Mouse jumping or not responding

    I have the original bluetooth mouse that came with my iMac, this was pre mighty mouse. The problem I'm having is that the mouse sometimes does not respond or the cursor jumps around when I'm using it. It has never done this before but started about 2

  • Rating in Collaboration

    Hi All             I need to select the highest rated document in the room and also want to pick the user of that document. If it’s possible, what are all the steps I need to do? And where the rating value is stored? Helpful answer will appreciate. r