Some MCs does not detect mouse events?

Hi all

I just met a really strange bug with a program I've created. The program allows the user to add forms (currently all squares: SmallThing, MediumThing, and LargeThing) in an area of the screen, and then drag them on by clicking and dragging with the mouse. Pretty simple. Unfortunately, the code seems to be at fault for the smaller forms (they are not THAT small, currently the smallest shape is 32 x 32) which are not at all mouse events. I used the tracing instructions to verify this. I'm having some trouble with the largest and occasionally forms only records not mouse, events, but I can live with that - the main problem with the small forms is not mobile.

All forms are descendants of the same super class, and have the same event listeners added to them when they are created.

Here's the relevant functions in my class of the screen. It's all pretty basic code, so I really don't see what the problem is.

public void AddNewObject(objectNum:int):void
{
var newThing:MovieClip = null;

Switch (objectNum)
{
case 1:
newThing = new SmallThing();
break;

case 2:
newThing = new MediumThing();
break;

case 3:
newThing = new LargeThing();
break;

by default:
trace ("unrecognized type thing");
break;

}

If (newThing! = null)
{
trace ("adding new thing");
newThing.x = 480/2 - newThing.width/2;
newThing.y = 320/2 - newThing.width/2;
addChild (newThing);

newThing.addEventListener (MouseEvent.MOUSE_DOWN, DragObject);
newThing.addEventListener (MouseEvent.MOUSE_UP, StopDrag);
dragableObjects.push (newThing);
}

}

private void DragObject(e:MouseEvent):void
{
trace ("Mouse down on object");
dragTarget = dragableObjects.indexOf (e.currentTarget);

trace ("dragTarget was:" + dragTarget.toString ());

mouseToOrigin.x e.currentTarget.x = - mouseX;
mouseToOrigin.y e.currentTarget.y = - mouseY;

If (! this.willTrigger (Event.ENTER_FRAME))
{
addEventListener (Event.ENTER_FRAME, UpdateDraggedObject);
}
}

private void UpdateDraggedObject(e:Event):void
{
If (dragTarget! = - 1).
{
trace ("sliding object");
dragableObjects [dragTarget] .x = mouseX + mouseToOrigin.x;
dragableObjects [dragTarget] there = mouseY + mouseToOrigin.y;
}
}

private void StopDrag(e:MouseEvent):void
{
trace ("Mouse up on object");
removeEventListener (Event.ENTER_FRAME, UpdateDraggedObject);

dragTarget = - 1;
mouseToOrigin = new focus();
}

It seems that small objects can be covered by other objects (perhaps with alpha set to 0).

Try putting falling object at index 0 and see if they are offenders:

private function onMouseUP(e:MouseEvent):void {
     addChildAt(currentDraggable, 0);
     stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUP);
     stage.removeEventListener(new MouseEvent.MOUSE_MOVE, moveObject);
}

Tags: Adobe Animate

Similar Questions

  • Card reader HP Pavilion dv6 does not detect some SDHC cards

    Hp Pavilion dv6-6104so laptop

    Windows 7-64 bit

    The laptop card reader does not detect some of our SDHC cards. We have updated the driver to the latest version, Realtek PCIE 6.1.7601.90 and BIOS, but it does not yet recognize some of our cards.

    We have six three SanDisk SDHC cards (4, 32 and 32 GB), two Kingston (8 and 8 GB) and an integral (4 GB). The card reader recognizes four of them (4 to 32 GB SanDisk cards and one of the two cards Kingston). What is strange and you may have already noticed is that the card reader recognizes only one of two cards with the same brand and quality!

    On the two cards that don't recognize in our specifications, they work properly in their corresponding cameras and are detected without problem by another reader of cards to laptop of HP Pavilion dv6-3138so, as well as by two netbooks from our two different brands.

    When we connect the camera (a Canon and Sony, both point) to the computer via a cable USB 2.0, the laptop detects the cameras and through them, we can access the cards.

    We bought the laptop less than two weeks in Helsinki, Finland.

    Thank you in advance for your help!

    Hey everybody,

    Use of a high capacity card in a standard card reader location causes this problem. Im going to guess that the cards you ar having problems with are not standard SD cards and SDHC cards. As Naoto said, using a camera as a card reader you workaround this. You can also look in the adapters of SDHC card reader. Here is a good article on SDHC cards: http://goo.gl/lj5Fq

    I hope this helps!
    Sean

  • HF R600. For some reason, my computer does not detect it.

    So, I don't know why, but my computer, windows 8 (I know..) does not detect my camera, the HF R600. It does not appear in the list of connected devices, the transfer utility said that it is not connected, I'm not sure what to do. Also, I felt that I could ask now as well. IM planning to use with LiteCam game software with the camera providing the embedded video, you get to know if a compatible device for it?

    Try this, with connected usb camera, click the play button under the power button on the camera body?

  • My mac does not detect my hard drive after the upgrade. How to solve this problem?

    My mac does not detect my hard drive after upgrading to Mac OS Sierra. How to solve this problem?

    Please provide more detailed information. You can read write an effective communities of Apple support question. Maybe you could open disk utility and take a screen snap so that we can see what you see.

    To post a screenshot

    1. Press command + shift + 4, that will change the cursor to the line of sight.
    2. Hold down the mouse button and the collimator allows you to select the part of the screen you want to capture.
    3. Release the mouse button and the image will be saved on your desktop.
    4. Click on the camera icon in the toolbar of the message forum Editor.
    5. Drag the image on the button select a file and click the Insert button.
  • Does not detect the hdmi cable more (very specific scenario)

    Well then...

    Got a monitor 15-HD to hdmi cable and a mac laptop (13 in the retina).

    So when I got all that I put it all together and it worked. I left because there a little bit, everything is plugged in and did not return for some time, so my mac fell asleep at the time wherever I went. Disconnected everything to relax on the couch. I went back and all plugged together again except that now the mac does not detect the cable. Tried a bunch of things with it. Restart, unplug the unit, detection manually, etc...

    Since the monitor is used and recently purchased cable, I thought time to them to test first. Got a laptop PC and plugged into the cable. The monitor and cable worked.

    Tried to connect my mac to the TV with my ps4′s hdmi since I did that a lot before. Also works.

    The problem is literally the combination between the cable and the mac. Which is a problem since I got the reason was to serve as my mac.

    During my research, I saw that specifically leaving the connected hdmi where sleeps your laptop can spoil it supposed to be... I saw it one time so idk if it's true, but it happened to me... and no, it wasn't really a solution when I came across that. Tried Googling this specific problem, but did not meet anything since my problem seems so specific.

    Fast forward to the next day and tried again now that both had little respite between them. Plugged into the HDMI and my laptop starts fading and return to a black screen. The screen would go black usually and so the laptop screen and the monitor would appear once again. sauf_que this time that there not, he just kept it and the monitor has not changed (Yes) it's). Not wanting to let him do that too long I unplugged and tried a different port with an adapter, I have also, since I did 3 holes I could use this for might as well try them all again. But unfortunately, I don't have it trigger anything again. So I went through another round of troubleshooting to try to make it work, but here I am, trying to see if anyone else has had this problem and solved. I am back to wait another day I guess and just hope. If not idk what to do, except maybe to get another cable? I don't know if this would solve it well.

    Hello Kaida W,.

    Thank you for reaching out to the Apple of community support. I'll do everything I can to help you get your monitor works as expected. Our first step would be to restore your System Management Controller (SMC) that allows to manage systems of different material on your Mac. This article will guide you through reset:

    Reset the management system (SCM) controller on your Mac.

    Try it and tell us how it goes. The entire community is here to help.

    Best regards-

  • Does not detect my HARD drive in the BIOS

    Yesterday, I bought DT01ACA300 of HARD drive and it does not detect.
    I've tried it on two motherboards (different ports and different controllers: AMD, Intel chipset JMicron chipset) with different powers and signal cables (which do not work with my player Samsung HDD and DVD SATA Lite-on), but it won't do no good...

    It seems that the only thing that might have caused it may be the power supply, but I can't check it out because I don't have a spare. I tried to disable most of the unnecessary controllers on MB to lower energy consumption, but it did not help.

    From what I've read on the Internet, it seems that it is not I can do by myself and it is very likely defective drive, but I still have some hope that I can make it work...

    It would be a big problem to return to calm: I'll have to send in another city in the authorized service center so that they would check it, and then only, I can get a replacement (if noone will fly it by then, which can happen...).

    Which machine do you have?

  • Qosmio F10: Driver Installation does not detect the wireless network card

    I wonder if anyone can help before I phone supported again. My motherboard is dead and ASP replaced and recovered my laptop qosmio F10. Since having back, my wireless card did not work.

    Windows detects a "network controller" whenever it starts and gives me the opportunity to install it. I tried to install it by navigating in the 'tools and utilities' records CD rom for folders and subfolders of "Wireless network driver" and it still does not detect the card.

    I also tried to install using the cd rom web gui and selected the 'Pilot wireless network' link and then tried to install it. It opens a dos command prompt and try to install but comes up with the error "failed installation.

    I ran the customer service and they told me to run the qosmio recovery/then recovery of product/recovery of qosmio and again...

    I still don't the card wireless not yet installed. This happened to someone else?

    I tried already shot the drivers from the web, but with no luck... If a representative of customer service with the help of good technical knowledge that would be great, or if someone has encountered the problem too and he had fixed to the give me some advice...

    Thank you very much

    Sean

    Hello

    you see the card wireless as an unknown device in Device Manager? If this is not the case, perhaps that the card was not properly installed after replacing the motherboard.

    Sorry I have no other idea.

    Good bye

  • Re: Hitachi Drive Fitness Test (DFT) does not detect the HDD on Satellite A660

    I have a Toshiba Satellite A660 PSAW3C-047017 with a HARD MK6465GSX Toshiba drive. After experience, some consecutive failures of start-up, I was told on the Toshiba forums to use Drive Fitness Test (DFT of Hitachi).

    I burned the ISO to a CD and booted from it (I must press F12 for boot options and select the optical drive), which is to run successfully. However, it does not detect my drive HARD - the list is empty.

    Is there something I need to do to make visit to DFT?

    I cannot commend this third part software features, but I want to know if you still have these failures to start your portable computer satellite?

    What's the problem?

  • Portege M200 does not detect the Modem PCMCIA card

    I have the Portege M200, when I insert a PCMCIA card (LAN or wireless) the pc detects it ok but if I insert a modem PCMCIA ANY, as a standard 56 k modem, modem card v620 air verizon or a sierra wireless aircard 710, the pc does not detect any, nothing happens when I put it in or out.

    V620 Verizon is the card that I have to make it work as soon as POSSIBLE, others, I used for the test, it seems that modems do not work for some reason any on the PCMCIA.

    any help?

    If the WLAN card manufacturer supplied driver with this card please read manual how to install it on the right track. It is possible that the driver must be installed first.

    Sorry, but my opinion on the laptop PCMCIA port is OK and if you need support try to contact the manufacturer of the card. They should have enough experience with own products.

  • Qosmio G50 does not detect the connected Bluetooth devices

    The qosmio g 50 (windows vista ultimate) detects more devices via bluetooth
    Until two days ago, I pointed out quietly via bluetooth mouse. And then, do not know what is success does not detect any more.

    I did a test to see if it could depend on the PC or the mouse.

    I took the phone with bluetooth, I turned and qosmio, is not detect the phone.
    And the phone does not detect the qosmio via bluetooth.

    What checks can I make on the qosmio while ' I detect devices via bluetooth?

    Tank you

    Hello

    BT has been successfully activated on tis G50?
    Have you used the FN + F8 key secret to switch on the BlueTooth?

    Please check if the FN key works correctly, otherwise, go to the button start-> all programs-> Toshiba-> Flash Cards Support utility and restart the software.

  • LAN card does not detect on Satellite A80?

    my 80 A does not detect the marvell yukon lan Card... He istn even shown in the hardware Manager. so I can't update the drivers...

    don't know what to do, so please help, tia

    TeXec

    Hi TeXec

    Have you seen some extraordinary things in Device Manager? For example yellow exclamation?
    In addition, you can try to change the setting of "Device Config" in the Setup of the System of "The installer of the OS" BIOS to "all devices".

    Good bye

  • The battery does not detect my Satellite A10

    My laptop is old enough, as you can see, and I had some problems with my HARD drive several months ago, so I had to change it (HDD). Now I have a 'FUJITSU MHV2040AH' HARD drive. Since then, my laptop is still able to work using a battery, but it does not detect that.

    It "thinks" that it is still connected to the adapter. And, in addition, he writes that 255% battery life remains. He continues to write, even when it is disconnected from the adapter, and when the battery is finished, the laptop just goes out, without any warning messages.

    However, in fact the battery recharges when the laptop is connected to the adapter.
    What can advise you?

    PS Sorry if my English is not good and there are a few errors. I am from Russia :)

    So no one is able to answer my question? Where are you, supporters? :)

  • w540 does not detect DVD drive

    W540 does not detect the CD / DVD drive and because it takes a long time to start.

    I know that I can put the hard drive to boot first, but now I want to install windows 7 and it does not start.
    I have already installed the latest version of the BIOS but does not solve everything.

    I wonder what's happening?

    Thank for the help that you can give me.

    I discovered why the player start out with reinstalling windows DVD.
    According to the manual, so that the operating system Windows 8 and Windows 8.1 work, Secure Boot function must be activated. Similarly, restarting the OS Optimized Defaults menu must be activated and when this setting is changed, some BIOS settings are changed automatically including the UEFI / Legacy Boot happening to UEFI. We need to change the UEFI / Legacy Boot for both, only then can start the DVD from the drive.

    I thank ColonelONeill for your help.

  • wimdows media playr does not detect my xbox 360___

    wimdows media playr does not detect my xbox 360

    Hello

    1. what version of Media Player do you use?
    2. have you set up media sharing in Windows Media Player?
    3. the Xbox 360 is detected on the computer?

    You may need to configure some settings for this problem.

    If you use Windows Media Player 11, then check out these links for help:

    How to share videos, music and images between your computer and your Xbox 360 console
    http://support.Microsoft.com/kb/925915

    http://Windows.Microsoft.com/en-us/Windows-XP/help/Windows-Media-Player/11/share-media

    http://Windows.Microsoft.com/en-us/Windows-XP/help/Windows-Media-Player/11/stream-Xbox

    http://Windows.Microsoft.com/en-us/Windows-XP/products/Windows-Media-Player/11/Readme

    Kind regards
    Afzal Taher - Microsoft technical support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • AutoPlay does not detect intermittently digital cameras

    Original title: choice of AutoPlay box

    Before that my computer asked for a new hard drive, I could connect my cameras and a box automatically pop up would be for me to choose the program I want to download my photos. Now the box doesn't appear. I have a right-click on the camera in my computer, the properties selected, then events. Here, I can see an option "Question what program to run", but it is faded out and not available for selection. A device to stick on the same port of BSE shows the choice.

    Hi SamanthaAnn,

    1. don't you make changes before the show?

    We recommend that you run the Microsoft AutoPlay Repair Wizard to analyze your computer devices to find defective AutoPlay settings.
    See Autoplay Repair Wizard

    See also AutoPlay intermittently does not detect not removable digital cameras or media

    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • Satellite C50 - B - 11 L - erratic Touchpad

    Hello I have a Tosh C50 - B - 11 L for only 2 weeks (to replace an old Tosh Satellite L300, which was very reliable).I want to throw it away, due to the response of the touchpad. It will freeze or no reagent, erratic, will ignore the taps, etc. Causi

  • Sync module NI 9205 with NOR-9234

    Hello I have a cDAQ-9178 chassis with 4 x accelerometers IEPE PCB 16 absorbent of NOR-9234 (DSA). I have a NOR-9205 I intend to use to acquire the power of 4 problems. The NI - 9234 s are synchronized through their extensions in a single task. I woul

  • Reinstalling Windows XP. Key does not

    I had to reinstall windows on my laptop. Not sure what happened to my cd restore xp but I have a genuine windows xp disk. tried to install this and using the product key from the sticker on my laptop. It comes up saying unauthorized key.  Is this bec

  • Smartphones blackBerry at startup error message

    I have a Bold 9000. I tried to download the ZDNET app and when I tried to run, he said that there was not enough memory, which was not the case (a 15 meg available). Thus, several times I tried to uninstall and reinstall the software. Now, when I boo

  • Not appearing is not in the flow of the CC activity after the installation of modules

    I brought the GuideGuide module.  It appears fine in my modules list, but when I go on install it appearing does not in my activity creative cloud system.I uninstalled the extension manager.  Uninstalled Photoshop CC 2015.  Stop.  Restart Photoshop i