Hittest only working with 1 added child

Ive got this piece of script where i place objects on the stage, to hittest eachother.
Ive got two seperate addchilds: one child must hittest another child
But for some reason it will only hittest with one object from the 2nd addchild :/
this is the addchild for the hittesting objects:
all variables are defined properly
for(var ringteller=0; ringteller<2; ringteller++) {
for(var teller1=1; teller1<17; teller1++) {
    //var ringsegment_mc:Ring_1=new Ring_1();
    var ClassReference:Class = getDefinitionByName("Ring_"+teller1) as Class;
    var ringsegment_mc:MovieClip=new ClassReference();
    ringsegment_mc.addEventListener(Event.ENTER_FRAME,vernietig);
    addChild(ringsegment_mc);
for(var teller2=0; teller2<2; teller2++) {
    var hitte_mc:Hitte=new Hitte();
    Hittes.push(hitte_mc);
    hitte_mc.mousedown=0;
    hitte_mc.addEventListener(Event.ENTER_FRAME, floaten);
    hitte_mc.addEventListener(MouseEvent.MOUSE_DOWN, slepenStart);
    hitte_mc.addEventListener(MouseEvent.MOUSE_UP, slepenStop);
    addChild(hitte_mc);
and this is the code for the slepenStart and vernietig:
function vernietig(evt:Event) {
    for(var teller3:int=1;teller3<Hittes.length;teller3++){
        if (evt.currentTarget.hitTestObject(Hittes[teller3]) ) {
               evt.currentTarget.alpha+= -0.1;
            if (evt.currentTarget.alpha<=0.05) {
                evt.currentTarget.x=evt.currentTarget.y=-200;
                this["segmentenkapot"+evt.currentTarget.kerngroep]+=1;
        if (this["segmentenkapot"+evt.currentTarget.kerngroep] == 16) {
            trace("ring kapot");
function slepenStart (evt:MouseEvent):void {
    evt.currentTarget.startDrag();
    evt.currentTarget.snelheidx=evt.currentTarget.snelheidy=0;
    evt.currentTarget.mousedown=1;
function slepenStop (evt:MouseEvent):void {
    evt.currentTarget.stopDrag();
    evt.currentTarget.snelheidx=4; evt.currentTarget.snelheidy=2;
    evt.currentTarget.mousedown=0;
so: only one instance of the hitte_mc will hittest with the instances of Ring_
what did i miss to fix this :/

i replaced
teller3:int=1;
with
teller3:int=0;
which seems to have done it ^^
that is what you meant, right?
btw: the for loop was only checking for one, instead of the whole array ^^

Similar Messages

  • I'm using iTunes 9 and I recently just bought AirPort Express. I have used it before in the past put the problem I have now is that I cannot select the Express network for my speakers. Does Airport Express only work with iTunes 10 or 11?

    I'm using iTunes 9 and I recently just bought AirPort Express. I have used it before in the past put the problem I have now is that I cannot select the Express network for my speakers. Does Airport Express only work with iTunes 10 or 11?

    Hello Hornet12,
    Indeed, iTunes 10.2 or later will be required to utilize AirPlay.
    Using AirPlay
    http://support.apple.com/kb/HT4437
    AirPlay requirements and capabilities
    To get full AirPlay features, make sure your AirPlay-enabled devices are running the latest software updates. The table below identifies minimum AirPlay requirements and capabilities:
    Stream content from
    Requirement
    Notes
    iPad
    iOS 4.3 or later.1
    From the Videos, iPod, Photos, Music, and YouTube apps on iOS devices, stream videos, music, and photos to an Apple TV (2nd and 3rd generation), or stream music to an AirPort Express or compatible third-party device.
    With iOS 4.3 and later, you can also stream video and audio from a website or a third-party app installed on your iOS device if the developer for the app or website has added AirPlay functionality.
    iPhone (3GS or later)
    iPod touch
    (2nd generation or later)
    Computer
    iTunes 10.2 or later.
    Stream videos and music from your iTunes library to an Apple TV (2nd and 3rd generation), or music to an AirPort Express or compatible third-party device.
    Apple TV
    Apple TV software version 5.1 or later.
    Stream music from your Apple TV to another Apple TV (2nd and 3rd generation), to an AirPort Express or compatible third-party device.
    Cheers,
    Allen

  • I work with a child who is not able to move his neck.  to see the ipad, it has to be placed high above the table (eye level).  he needs access with a mouse - is this possible?

    I work with a child who has physical disability and cannot move his neck.  The ipad needs to be eyelevel in order for him to see it, but he also is not able to raise his hand and would need mouse access...  is this possible?

    I'm sorry but the iPad does not work with a mouse, there is no cursor on the iPad and the iPad was designed as a touch screen device so a mouse will not work.
    I really don't know what to suggest other than this new device, and it might be worth a look. I assume that the child can use his hands for a keyboard.
    http://www.thinkgeek.com/product/e722/

  • I bought this iPhone from Apple Retail Store for the full amount, but  it does not work with my SIM card only works with AT&T

    Hello,
    I have an iPhone 4S 32Gb White AT&T, product part No. MC921LL/A, Serial No. C39GMLPWDTDC
    I bought this iPhone from Apple Retail Store (from Fifth Avenue, NY) for the full amount. Now it does not work with my SIM card only works with AT&T. I restored the phone several times, but I have not received "Congratulations your iPhone has been unlocked". Please activate my iPhone to work with different SIM cards
    Thanks,
    Best Wishes

    When did you buy it?
    Apple did not begin selling an unlocked version of the iPhone 4S in the US until 11/11/11. I believe it went on sale only through the online store at that time. I'm not sure if it's available at retail yet.
    What you purchased was a phone without a contract commitment. It is still locked to AT&T. AT&T will NOT unlock iPhones for any reason.  Return it and get your money back, then use that to purchase an unlocked phone.

  • Can't sign in using any 3rd party email client with my iCloud account on any Mac. Tried every settings, My iCloud only works with Mail.app

    Can't sign in using any 3rd party email client with my iCloud account on any Mac or any other Mac. My iCloud will only work with Mail.app. All the clients I tried work perfectly well as long as I sign in with somebody else's iCloud account. But mine won't work no matter the client (Postbox, Unibox, Airmail...) and no matter the computer.
    I can access my account on iCloud.com, but I can't use email clients without getting error messages prompting me to check my password or login.
    I was able to use those clients in the past but a couple of months ago I got logged out of Airmail and the issue started just like that!
    I tried every possible mail server settings including the following:
    IMAP information for the incoming mail server
    Server name: imap.mail.me.com
    SSL Required: Yes
    If you receive errors when using SSL, try using TLS instead.
    Port: 993
    Username: The name part of your iCloud email address (for example, emilyparker, not [email protected])
    Password: Your iCloud password
    SMTP information for the outgoing mail server
    Server name: smtp.mail.me.com
    SSL Required: Yes
    If you receive errors when using SSL, try using TLS instead.
    Port: 587
    SMTP Authentication Required: Yes
    Username: Your full iCloud email address (for example, [email protected], not emilyparker)
    Password: Your iCloud password

    Those are the correct settings, and they work with any email client that supports Imap.
    Try again.

  • Ipod Classic 160 6th g. doesn't sync w/Imac g5 non intel OS 10.4.11. This is a replacement for same ipod which was stolen recently. That pod worked fine with Itunes 9! Now this pod says it only works with Itunes 10.7. ***!!!! Why has Apple screwed up?

    My ipod classic 160 6th gen. was recently stolen. It had 3000 tunes on it and it synced perfectly with Itunes 9 on my Imac G5 non intel OS 10.4.11. So I recently bought same model and guess what, it doesn't sync at all. Now message says it only works with Itunes 10.7 and up. I certainly cant afford to buy a new intel based Mac and I really dont need a new pc. It feels like Apple has dropped the ball on its long time users and tough luck to you and all the $$$$$$$ spent on downloading songs and buying ipods over the years! I AM SO ANGRY THAT I CANNOT BRING MY MUSIC WITH ME ANYMORE. I dont know if there is any solution to this except being extorted to upgrade to new tech! I have been trying to get answers to this issue but nothing seems to work. Any help would be greatly appreciated. I am not a tech genius so extremely techy solutions will be in vane.

    one more detail, after a restore, when I attempt to reload music to the ipod, if I try and move, say, 20 files, the transfer seems to work as it should but then stalls on the last file.  Eventually, the status will change to "Updates Files on (my ipod)" a and suggests the iPod is syncing  even though I have the auto sync feature turned off.
    This process eventually works itself out, and seems to take longer relative to the number of files I attempt to transfer.   Once done, howver, if I try and eject and dismount the iPod, iTunes stalls with the spinning pinwheel and I am warned that the iPod is syncing again with the spinning candy cane status bar.     Eventually thisd works itself out and the iPod dismounts from iTunes and the desktop and eventually the iPod is free to disconnect.
    Then if I try and play the music I just transfered, the iPod says there is no music loaded.
    Ideas?

  • I am using Windows 7 64-bit on a partitioned hard drive on a MacAir.  The trackpad will only work with a click.  How do I get the full function of tap and scroll?

    I am using Windows 7, 64-bit on a partitioned hard drive on a  2012 MacAir.  The trackpad only works with clicking.  How do I get the full function of tap and scroll? (I have this on a 2011 Mac Pro with 32 bit Windows 7 and it works properly.)

    Windows Control Panel>Boot Camp Control Panel>Trackpad.

  • Boot Camp won't make a Windows XP driver disc, OS X disc only works with Win7

    First time Mac user. Just got a new Macbook Pro.
    I have successfully installed Windows XP on the Mac using Boot Camp. But I need the driver disc. The right mouse button doesn't even work and Windows is impossible to navigate without that. The disc eject button does not work, one has to eject a disc using laborious menus. Very frustrating.
    When I run Boot Camp it only has the option to make a Windows 7 driver disc. I don't see any way to make a driver disc for Windows XP.
    Everywhere I have searched on the Net the information says to put the OS X Leopard disc in the drive when WinXP is running and it will automatically install drivers. When I try that a window comes up saying it only works with Windows 7.
    This web site shows screen shots of a Beta version of Boot Camp that makes Windows XP drivers discs.
    http://www.askdavetaylor.com/how_do_i_install_windows_xp_on_my_mac_using_boot_ca mp_1.html
    How can I make a Windows XP driver disc?
    I really hope Apple didn't discontinue/eliminate the option to make a Windows XP driver disc altogether, forcing everyone to use Windows 7 only...
    Is there a way to install an older version of Boot Camp over the latest version I'm running? Where would I find it?
    Macbook Pro
    OS X 10.6.7
    Boot Camp 3.0.4
    Thank you for your time in helping me on this.

    The retail OS X 10.6.3 DVDs unlike your OEM DVD does have a complete set of drivers for $29 w/o having to deal with questionable bitorrent.
    Microsoft EOL'd XP and Vista SP1.
    Your Mac has Intel Thunderbolt and you don't see Apple doing backward compatibility. You can't run 10.5 on new Mac. So yes it comes with those limitations, but XP is also 20x more vulnerable, IE9 is more secure and XP has not kept up with the latest hardware, besides which I don't see a place or need for a 32-bit OS, any platform today.

  • When trying to install an extension for InDesign CC 2014 I get an error message saying that the extension only works with version 7.0 or greater. My version is 10.0.0.7 x64 Build I was using this extension fine with InDesign CC

    When trying to install an extension for InDesign CC 2014 I get an error message saying that the extension only works with version 7.0 or greater. My version is 10.0.0.7 x64 Build I was using this extension fine with InDesign CCError message with InDesign CC 2014

    Used the 64bit version before CC 2014 as well so don't think that's the issue. Here is the text in the .mxi file if I have missed something:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <macromedia-extension id="PrintUI Tools" name="PrintUI Tools" requires-restart="true" version="3.0.0">
      <author name="PrintUI.com"/>
      <description/>
      <license-agreement/>
      <products>
        <product maxversion="" name="InDesign" primary="true" version="7.0"/>
      </products>
      <files>
        <file destination="" file-type="CSXS" products="" source="PrintUIManagement.zxp"/>
      </files>
      <update url="http://printui.com/public/downloads/updates/printui_tools_update.xml"/>
    </macromedia-extension>

  • I purchased Adobe photoshop elements II and Adobe premiere elements II. They are both on one disc. My computer crasded and I had to reload Windows. I only have one serial number and it only works with photoshop II. The same serial number will not work for

    I purchased Adobe photoshop elements II and Adobe premiere elements II. They are both on one disc. My computer crasded and I had to reload Windows. I only have one serial number and it only works with photoshop II. The same serial number will not work for Premiere. I dont have any other serial numbers. What do I do???

    Static_Unit
    I am getting a bit concerned about what is happening in your situation. Yesterday you posted your question in at least two different forums, one of them being here in the Premiere Elements Forum.
    Don't Have Serial Number for Premiere, Only Photoshop?
    Wherever you posted, the reply was to contact Adobe via its Adobe Chat. It is the only one who can sort out this matter for you.
    In the thread cited above I offered to help you with the difficulties that you were having visualizing the Adobe Chat in its web page. I was waiting for your follow up on that in the above thread. Instead, I find your same question in a new Adobe Premiere Elements Forum thread this afternoon with no refer the prior threads or prior recommendations given you.
    I will also mention again...when you buy the Photoshop Elements and Premiere Elements bundled in one packaging and with installation files for each on the same installation disc, each program has its own serial number. The Photoshop Elements serial number does not work for Premiere Elements and vice versa. The serial numbers are on labels on a box which houses the installation disc envelope(s). So, if you purchased both programs and found the Photoshop Elements serial number, then the Premiere Elements serial number should be in a label right underneath the label with the serial number for Photoshop Elements. I recall writing this in your yesterday's thread on this matter.
    The moderator will no doubt be along shortly to close or delete this thread. So, just in case, please bookmark your yesterday's thread cited above so that we can continue this communication which is trying to help you.
    Thanks.
    ATR

  • I had an iphone 4s and it worked nice with facetime and imessage using my phone number but  it was stolen on December so I buy a new iphone 4s using the same cellphone number  but now imessage and facetime does not work with my number, it only works with

    I had an iphone 4s and it worked nice with facetime and imessage using my phone number but  it was stolen on December so I buy a new iphone 4s using the same cellphone number  but now imessage and facetime does not work with my number, it only works with my apple ID.   Please Help me I speak Spanish so  if my English is not ok  I´m sorry about it.
    Do you think that apple has to   reset in their database of the old serial number attached with my phone number and that’s why I can´t activate imessage and facetime with my number in the new iphone 4s?? 

    I understand all of this Meg; that is why I bought an Iphone; but never expected my phone not even give a at least a 24 or even 12 hours....I work 12 hour shifts and also would expect to have to charge each night but not twice a day or more.  I am not always somewhere I can charge my phone.
    Your points are true; however it doesn't help me......

  • Can I connect my iPad mini to a data projector using a lightning to 30-pin adapter connected to a 30-pin to VGA connector? Or will this only work with a lightning to VGA connector.

    Can I connect my iPad mini to a data projector using a lightning to 30-pin adapter connected to a 30-pin to VGA connector? Or will this only work with a lightning to VGA connector?

    The lightning to 30 pin adapter does not support video as per the item description in the Apple online store:
    http://store.apple.com/us/product/MD823ZM/A/lightning-to-30-pin-adapter
    This adapter lets you connect devices with a Lightning connector to many of your 30-pin accessories.* Supports analog audio output, USB audio, as well as syncing and charging. Video output not supported.
    You will need to the Lightning to VGA adapter directly
    http://store.apple.com/us/product/MD825ZM/A/lightning-to-vga-adapter?fnode=3a
    Or the Lightning Digital AV Adapter
    http://store.apple.com/us/product/MD826ZM/A/lightning-digital-av-adapter
    If the projector supports HDMI input.

  • External monitor only works with clam shell open

    external monitor only works with clam shell open

    Are you using the method in this Apple article? If you do, it should work.
    Mac notebooks: How to use your computer in closed clamshell (display closed) mode with an external display

  • I am from turkey and Iphone4 can be used Turkcell and vodafone(carriers) in turkey but i bought my iphone in usa and it only works with at&t.Is there anything i can do to use my iphone with turkcell or vodafone?

    I am from turkey and Iphone4 can be used Turkcell and vodafone(carriers) in turkey but i bought my iphone in usa and it only works with at&t.Is there anything i can do to use my iphone with turkcell or vodafone?

    No. Return it and get your money back if still within the 30 day return window. All US iPhones are carrier locked and cannot be officially unlocked.

  • Safari is not working and siri only works with the phone not internet related questions.

    I have an Iphone 5 and for about 8 months it worked find, then somewhere along the line I think about the time I upgraded to the latest OS, Safari stopped working.  That is when I hit a link from email or open safari I get the browser window but nothing works, like its been blocked.  Siri of course only works with internal serches, through contacts and such.  My other browsers (crome, oprea and mercury) work fine.  I have been through all the internal settigns I can find, but nothing has worked.  Have cleared history cookes with no suceess.  Any ideas?

    Hello Mike,
    Thank you for providing so much detail about the issue you are experiencing with Safari after upgrading to iOS 7.
    The first thing I recommend is quitting and relaunching the applications on your iPhone:
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    You can find the full article here:
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    If you are still seeing the same issue after quitting and relaunching the apps that are open, I recommend restarting your phone and then resetting if it's still not working:
    Restarting your device
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider.
    Press and hold the Sleep/Wake button until the Apple logo appears.
    Note: Reset your device only if you are unable to restart it.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    You can find the full article here:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    If the issue persists, the last thing I recommend is backing up and restoring your iPhone:
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766
    iTunes: Restoring iOS software
    http://support.apple.com/kb/HT1414
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

Maybe you are looking for

  • Itunes 11.3.8 keeps crashing on launch. Help please.

    Every time I open itunes it crashes I get the "itunes has stopped working" message. I've tried EVERYTHING. unistalling, re-installing nothing seems to work. I also get this information ... Problem signature:   Problem Event Name:          APPCRASH  

  • Rental lock up

    i just downloaded a rental movie, but started the video about half way through the download.  Everything was fine until the movie locked up (froze) and became unresponsive.  Even iTunes became unresponsive.  i had to force quit to even use my Mac. no

  • Netra T1 AC200 Install of Sol 7

    Solaris 8 installs just fine, but Solaris 7 will not boot from cdrom. Have done everything from "boot cdrom" to changing the boot device "setenv boot-device cdrom disk net" Any suggestions? Thanks Chris

  • QPLD question?

    After creating a Query and then creating a report based on a Layout Template, I am having trouble ( later) to know which Layout Template I have used for creating the Report. Is there any way of finding out this information? Thank you Robert

  • JAXB marshalling error..

    Hi, below codes is working properly with normal java app. ( public static void main(String[] args) { ... } ) try {     FileOutputStream fout = new FileOutputStream(new File("C:/workspace/mysearch/data/", name));     JAXBContext ctx = JAXBContext.newI