Loop for does not run correctly

I have a code for a RPG combat system where, when you press the button of the menu attack, the code goes through all children of stages determines which are related to the class enemy and then adds an event listener for each of them.

function targetParse (): void {}

for (var i: uint = 0; i < stage.numChildren; i ++) {}

enemy of the var: Object = stage.getChildAt (i);

trace ("identified enemy")

If (the enemy's enemy) {}

trace ("the enemy")

enemy.addEventListener (MouseEvent.MOUSE_OVER, arrowControl);

trace ("added listener")

}

else {}

}

}

All these tracing instructions are for debugging. It arrives at "the enemy identified" but doesn't seem to be running the if statement.

I think that's probably my syntax.

I got it today.

function targetParse (): void {}

menu.Alpha = 0.5

menu.attackBtn.removeEventListener (MouseEvent.CLICK, tourJoueur);

for (var i: uint = 0; i< numchildren;="">

enemy of the var: Object = getChildAt (i);

If (the enemy's enemy) {}

enemy.addEventListener (MouseEvent.MOUSE_OVER, arrowControl);

trace ("enemy" + i);

}

}

}

The enemy variable should be redefined every time, it used to be above the loop for. It now works like a charm.

Tags: Adobe Animate

Similar Questions

  • I installed Acrobat 8 Professional 32-bit version and my computer is 64-bit, the program does not run correctly and I want to uninstall the 32-bit version and re-install the 64-bit version, I can't find the download of US feed for Acrobat 8 Professional,

    I installed Acrobat 8 Professional 32-bit version and my computer is 64-bit, the program does not run correctly and I want to uninstall the 32-bit version and re-install the 64-bit version, I can't find US downloading feed for Acrobat Professional 8, any suggestions

    Hello

    Please see below the link to download: -.

    https://helpx.Adobe.com/Acrobat/KB/Acrobat-8-9-product-downloads.html

  • PFR() does not run correctly

    Hi all

    I'm trying to view records on table on custom area on page stocked.

    When I write more code in ProcessRequest()
    Then it works fine but when I write the same code in PFR()
    by clicking on the GO button and then his does not work
    It does not appear any folder

    even I checked the ID of GO button
    OAApplicationModule am = pageContext.getRootApplicationModule();
         
         OAViewObject v = (OAViewObject)am.findViewObject("xxUnApproveVO");
    
            if(v==null)
                v = (OAViewObject)am.createViewObject("xxUnApproveVO","xxx.oracle.apps.irc.vacancy.server.xxUnApproveVO");
                v.executeQuery();

    GAC

    Please let us know of the NCB to * Get request: *.

    Kind regards
    GYAN

  • Stand-alone labview application (.exe file) does not run correctly

    Hi all

    I'm doing a labview application only to run on another computer (I never did this before).

    I went through the tools-> build application prompts and was able to build an exe file.

    the program is supposed to control a power meter and measures of power, then save them in a text file.

    When I run the exe, on the same computer, I compiled the exe, the program generates a text file to save data to, but he cannot communicate with the electricity meter.

    There are a few screws Sub and a dll file that are used to communicate with the electricity meter. Would it be possible that I am not say labview to correctly

    include these files when I create an executable?

    What are some common problems that arise when building stand alone applications that could be cause of my problems?

    And no one knows of any good tutorials on building applications stand alone in labview, other than the help files OR?

    Thanks for your help,

    Also, if you used the VISA, include the runtime with your Installer.

  • A scheduled script does not run correctly

    I have a .vbs script that I want to run every day. The script must be running a 3rd party application that will back up a SQL Server Express database to a flat file of data archiving and restore if necessary. If I click on the script, that it works perfectly, but if I set the script part it works; the part where it creates the backup directory, but I can't get the actual backup to occur.

    I went back to the software company. They said that if the script works by double click, it must be a windows problem.

    I use this on SBS 2008 SP2, which is X 64. I have SQL Server Express 2005 and 2008 on the server. What troubleshooting can I do. I'm a little weak on vbs programming so I have nothing pre programmed to write in Event Viewer. I also had a colleague change the script runs in PowerShell, but I encounter the same problem there.

    Hello

    The question that you are running in suitable for the forum on the link below:

    http://social.technet.Microsoft.com/forums/en-us/category/SQLServer

    It will be useful.

  • I run the program "TuneUp utilities" and I recently received a notification of the statement that "the BHDrvx64device does not work correctly.

    I run the program "TuneUp utilities" and I recently received a notification of the statement that "the BHDrvx64device does not work correctly" program proposed to update the driver, but there is no provision in any of the dialog boxes.  Windows Help and support says: help for this program was created in Windows Help format, which depends on a feature that is not included in this version of Windows. However, you can download a program that will allow you to view help created in the Windows Help format. All this brought me here, please, how to fix this?

    The last thing you want to do is install and run any third tuneup/Optimizer program.

    In the worst cases of such utilities can cause system failure or program, uninstall it, having restored firstly of the changes he could do.

  • Hello I use adobe reader in android mobile and do not run correctly does not touch NOT open turns on the edge of the cell phone android. The importance of the issue is 5.6. what I can do... ??

    Hello I use adobe reader in android mobile and do not run correctly does not touch NOT open turns on the edge of the cell phone android. The importance of the issue is 5.6. what I can do... ??

    [TWO double message deleteds... post the same question more than once is confusing... MOD]

    [This is an open forum, not a direct line to Adobe support... you have to wait a response]

    Thank you for your information, but the last update was solved the

    problem... Thank you...!!!

  • I have an Apple computer, use the browsers Firefox and Safari, use Comcast for my email. Lately, when the Firefox, my email does not work correctly. Why?

    I have an Apple computer, use the browsers Safari and Firefox. I use Apple mail and Comcast to my email. Lately, in the case of Firefox, my email does not work correctly. I get a message "your server license has expired. While usually, I can access my emails, I can't delete the unwanted emails. This problem will not occur when I use Safari and Apple mail. Is this a problem of Firefox or Comcast? Do you know what license is expired?

    Hello

    Many issues of the site can be caused by corrupted cookies or cache. To try to solve these problems, the first step is to clear cookies and cache.
    Note: This will be you temporarily disconnect all sites, you're connected to.
    To clear the cache and cookies to do the following:

    1. Go to Firefox > history > clear recent history or (if no Firefox button is displayed) go to tools > clear recent history.
    2. Under "Time range to clear", select "all".
    3. Now, click the arrow next to details to toggle the active details list.
    4. In the list of details, see the Cache and Cookies and uncheck everything.
    5. Now click the clear now button.

    More information can be found in article to clear your cache, history, and other personal information in Firefox .

    This solve your problems? Please report to us!

    Thank you.

  • Firefox seems to have recently developed seemingly random usually do not remember bookmarks, particularly when the pc does not stop correctly. Thank you

    Firefox seems to have recently developed seemingly random usually do not remember bookmarks, particularly when the pc does not stop correctly. Thank you

    If Firefox detects that the places.sqlite database is corrupted then Firefox can create a new database file and import bookmarks from a JSON backup that does not contain the most recent bookmarks (a new JSON backup is created when you run Firefox for the first time on a day), then you may lose the bookmarks in such a case.

    You can check for problems with the database places.sqlite file in the Firefox profile folder.

  • My iMac does not start correctly. Instead, I just a gray screen. Safe mode starts, it's ok. No problem. So I ask what next step can I try? Thank you very much

    My iMac does not start correctly. Instead, I have a gray white screen. Safe mode starts, it's ok. No problem. But not in safe mode, only grey screen again.  So I ask what next step can I try? Thank you very much and sorry for my bad English.

    Reinstall El Capitan without erasing the drive

    Make sure that you have a current backup before continuing.

    HD recovery start:

    Restart the computer after the ring, press in and hold the COMMAND and R keys until the menu screen to appear.

    Repair

    When the recovery menu appears, select disk utility and press the continue button. Disk utility charges and select Macintosh HD entry indented from the list on the left.  Click the first aid tab in the toolbar... If disk utility reports any errors that have been corrected, then re-run first aid until no errors are reported. Wait until the operation is complete, then quit disk utility and return to the main menu. Select restart from the Apple menu.

    Reinstall OS X: Select reinstall OS X and click on the continue button.

    Note : You will need an active Internet connection. I suggest to use Ethernet if possible because it's three times faster than Wi - Fi and more reliable.

    In the future please post in the appropriate forum. Your question is not related to the developers forum. I will take care of moved it.

  • Satellite U300 - Windows does not start correctly

    My U300 Vista Home run came in a boot loop: Windows can not start correctly and makes me want to use repair system, which failed and just makes me want to stop the computer again.

    I've tried without success, but failure mode it no more. I have a product recovery CD, but the system does not start from him. When I studied at the start, I saw that the BIOS does not detect the optical drive.

    Help please! Thank you.

    Hi nonprofit.

    You could try to load the default settings in the BIOS. Maybe it will be reconigze the CD/DVD drive again.

    Otherwise I think that it of necessary to replace the defective drive. Then, you would be able to use the Toshiba recovery disc again. This will restore factory in a few minutes.

  • My Phlinxtogo game does not work correctly

    Original title: "C:\Program Files (x 86) \Pogo Games\Phlinx Go\PhlinxToGo.exe" __My Phlinxtogo game does not work correctly ".

    \Pogo Games\Phlinx to Go\PhlinxToGo.exe

    Hello
     
    1. what operating system is installed on your computer?
    2. What is the exact error message you get?
    3. what happens when you try to run the game?
    4. has been the work of game much earlier?
     
    There is currently no information on the compatibility of Phlinxtogo with Windows 7.
     
    However, you can perform two or three steps and check if it helps.
     
    Step 1:
     
    Once the Phlinxtogo game is downloaded, right click on the .exe file and run as administrator.
     
    Step 2:
     
    If this does not help, run the game in Windows compatibility mode and check.
     
    If none of the suggestions work, I'm afraid you must contact the manufacturer of game for a better support.

    Aziz Nadeem - Microsoft

    [If this post was helpful, please click the button "Vote as helpful" (green triangle). If it can help solve your problem, click on the button 'Propose as answer' or 'mark as answer '. [By proposing / marking a post as answer or useful you help others find the answer more quickly.]

  • Webcam USB 2.0 on my laptop with windows vista error device does not work correctly

    Original title:

    I just plugged a usb2.0 webcam on my laptop with windows vista. It is loaded ok, but the device manager says that the device does not work correctly. Any ideas please.

    I just got a webcam via ebay and plugged into my laptop. I'm working on windows vista. He finds and load device software right away, no problem. But I can't work. go into my device manager it tells me that the device does not work correctly. Any ideas please.

    Hi Matthew,

    The first thing I would try is to connect the webcam to another computer to make sure that the webcam is not defective.

    Now, check out these links and return to the State of the question.

    When hardware installed in or attached to a computer doesn't work properly, it is often because of a driver problem.

    Here are a few common problems with drivers and the means to solve them.

    See the following link for more information:

    Tips for solving common driver problems

    Also check out the following link and run the fixit available.

    Hardware devices do not work or are not detected in Windows

    The fixit diagnose and solve problems with the equipment. (USB) Keyboard and mouse are not detected by the Manager of devices or when they do not work.

  • Control Panel does not work correctly.

    original title: salvation

    Hello

    My Control Panel in windows vista 64 bit does not work correctly, when I want to use functions such as catering or to uninstall a program or changing the State of account it just an error message like missing a file on each of them has its own error message, is it possible that I can restore the control panel to its previous state I tried windows restore, but it doesn't work.

    Hello

    Run the sfc/scannow command.

    http://support.Microsoft.com/kb/929833

    Use the (SFC.exe) System File Checker tool to determine which file is causing the problem and then replace the file. To do this, follow these steps:

    1. Open an elevated command prompt. To do this, click Start, click principally madeprograms,Accessories, right-clickguest, and then clickrun as administrator. If you are prompted for an administrator password or a confirmation, type the password, or clickallow.
    2. Type the following command and press ENTER:
      sfc/scannow

      The sfc/scannow command analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions

    If SFC detects the main problems it can't fix you may need to borrow a Microsoft dvd vista not an acer, HP etc. recovery disk and do a repair installation

    read the below tutorial on how to perform a repair installation

    http://www.Vistax64.com/tutorials/88236-repair-install-Vista.html

  • Desktop computer does not load correctly

    We can no longer switch uses profiles without having to reprocess the computer because the Office does not load correctly.  When we switch between profiles of uses without reformulate the computer, we get an error message indicating that "your office is not load correctly... loaded in safe mode.

    This start happening a few weeks ago.  This problem occurs every time that we move from user profiles or log out, and then move the user profiles.  We have to reprocess the computer on the desk in order to load successfully.

    All that we can do to fix this?

    If this problem was not more than 15 days ago, and if you remember the date when you did not have this problem, please do a system restore. Choose the date when there was no problem that your restore date.
    If this does not work, please do a check of the filesystem (sfc/scannow)

    Procedures for system restore:
    Start button > Search box, type system restore > press the Enter key > uac prompt > click on choose a different restore point > next > select dates as your restore point, until the click > next > finish
    To sit and wait. The machine restarts when it's done

    File system (sfc/scannow) check how to:
    Start button > Search box type cmd > look up, do a RIGHT click on cmd.exe > click on Run As Administrator > in this window cmd black and white, type at the prompt flashing sfc/scannow > press the ENTER key.
    Note: there is a space between 'sfc' and ' / '.
    To sit and wait. It will take time.
    When finished, exit the cmd window.
    Reboot (restart your computer)

    t-4-2

Maybe you are looking for

  • Can I get the CD of Vista updates?

    Hello My question is if it's possible in any case to receive a CD with updates for Vista?The last time I reinstalled my computer, I spent two days to be updated. It was boring. I think I saw somewhere on the Windows site you can order a CD with updat

  • Media buttons do not work in Satellite P300-21st using Win 7

    Hello After the turning off my laptop, last week, the buttons of media suddenly stopped working.The strange thing is that they are flashing all the time, even when the laptop is turned off. I downloaded the toshiba Web site VAP (although the version

  • OfficeJet 6500: Officejet 6500 not printing not

    My Officejet 6500 will not print. It is in an error state. I loaded the new driver, uninstalled and installed the printer. He was going well until I installed Windows 10.  Someone at - it ideas?

  • wrongly changed Subvi

    Hello guys,. I was using NI_PtbyPt.lvlib: PtbyPt.vi of queue data I changed her inputs, outpus and also wiring and realized later that now all the other data queue changed too. How to reset to original settings? Thank you. ABSIAS

  • Pavilion 15-m213sl: missing drivers, part II

    Hi, I recently formatted a 15-n213sl Pavilion and I reinstalled Windows 8.1 (64-bit).There are the following devices with missing drivers in Device Manager:ACPI\HPQ6001\3 & 11583659 & 0ACPI\HPQ6007\3 & 11583659 & 0\VEN_10EC&DEV_5227&SUBSYS_2166103C&R