Hello! Can someone please help me with my optimized code?

var enemy1Array:Array = new Array();

var shotA:Array = [];

var shotB:Array = [];

var pity: int = 4;

var damage1:int = 2;

for (var f1:int = numChildren - 1; f1 > = 0; f1-)

{

var child1:DisplayObject = getChildAt (f1);

If (child1.name.indexOf ("enemy") > - 1).

{

enemy1Array.push (MovieClip (child1));

MovieClip (child1) .hitPoints = 4;

MovieClip (child1) .gotoAndStop (+ MovieClip (child1) .hitPoints);

}

}

stage.addEventListener (Event.ENTER_FRAME, gameloop);

function gameloop(event:Event):void

{

for (var i: int = shotA.length - 1; i > = 0; i--)

{

shotA [i] .x += 20;

for (var enemy1Array.length - 1; q = q:int > = 0; q-)

{

If (enemy1Array .hitTestPoint [q] (shotA [i] .x, shotA [i] there - 30))

{

enemy1Array [q] .hitPoints = damage;

If (enemy1Array .hitPoints [q] < = 0)

{

enemy1Array [q].parent.removeChild (enemy1Array [q]);

enemy1Array.splice (q, 1);

}

}

}

}

for (var b:int = shotB.length - 1; b > = 0; b-)

{

shotB [b] .x += 20;

for (var qb:int = enemy1Array.length - 1; qb > = 0; qb-)

{

If (enemy1Array [qb] .hitTestPoint (shotB [b].x, shotB [b]there-30))

{

enemy1Array [qb] .hitPoints = damage1;

If (enemy1Array .hitPoints [qb] < = 0)

{

enemy1Array [QB].parent.removeChild (enemy1Array [QB]);

enemy1Array.splice(QB,1);

}

}

}

}

}

No, which seems ok.

If these objects bitmaps do not change, you will get a significant advantage by activating their cacheAsBitmap property.

Tags: Adobe Animate

Similar Questions

  • Can someone please help me with a free upgrade from Windows XP to Windows 7?

    Student in need.

    I am a student in the second half of the school. Finance did not allow me to buy a laptop with Windows 7, and most of the things necessary for research and written research documents you must have at least window7. Please, can someone help me with a free upgrade for Windows XP? That's all I have for now. Please, I beg you!

    You can get a student to the operating system for much less than the retail. Discover your college store, they generally available.

  • Can someone PLEASE help me with this Div, it drives me crazy

    I'm putting several divs classes within a div id area As you can see in the figure below, instead of the div 'a' scroll to the right in the box of "buttons", he's going down, despite the fact that the box of "buttons" is 400pixels wide, more than enough space to accommodate it.

    Is someone can you please tell me what is the problem with the code? I want just the class "button b" div inside the ID of the div "buttons" box, next to 'one button '.

    Any help is greatly appreciated.

    PS: Yes, I tried image previewed in the browser (I put two images in the each div box class which were 200pixels in width and height)

    Thank you.

    DISPLAY HTML AND DESIGN:

    http://i1006.Photobucket.com/albums/af186/RC20087765/HTMLDesignView.jpg?t=1293134259

    CSS AND DESIGN VIEW

    http://i1006.Photobucket.com/albums/af186/RC20087765/CSSDesignView.jpg?t=1293134282

    Try

    #buttons {}

    Width: 400 PX;

    }

    .one {width: 200px; float: left ;}}

    .b {width: 200px; float: left ;}}

    GRAMPS

  • My computer is saying, 'you can be a victim of software counterfeiting ". Can someone please help me with this?

    My grandmother gave me her old computer a few months ago and now it says I could be victim software counterfeiting... Please help me to solve this

    Thank you

    For help, see Genuine Microsoft software web page.

  • Can someone please help me with a problem of printer :(

    Hello. We have a Windows 7 PC and a HP Deskjet 3520 printer. Just bought the printer 2 weeks and it was working fine but now it will not print jobs off the computer! Everything seems to be connected very well and I ran a test print to the printer and it looked good. Only thing I can think of that might have caused the problem is that we had 2 power cuts in half an hour / an hour yesterday so am wondering now is just a coincidence, or it caused the problem. I would be grateful to anyone who helps. Very frustrating.

    Most often when a device does not work, it is because the driver has been corrupted.  Re-install a new copy should help

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly? SignedIn = 1

  • HP Pavilion g6: can someone please help me with administrator password or power on please?

    Help me please...

    "System or power on password administrator password"

    Entry 3 passwords incorrect then said...

    "System disabled" [63357967]

    @GeneDg

    Enter 72035369

    Kind regards

    DP - K

  • Hello, I have version Adobe Acrobat 11. I have complete documents and send them to customers. However, when customers open the documents on their side, they are empty. The filled information are missing. Can you please help me with this problem?

    Hello, I have version Adobe Acrobat 11. I have complete documents and send them to customers. However, when customers open the documents on their side, they are empty. The filled information are missing. Can you please help me with this problem?

    Why are publish you again? You must first answer the question I ask in your original thread.

  • I think that my system of basic windows files have been changed and currupted can someone please help!

    I get major errors that led me to think my windows files have been modified and currupted I just can't install microsoft updates they download, but I'm unable to install, I'm unable to use the Disk Defragmenter and disk scan as it said my system is already in use. I am also unable to use my acer factory restore settings because it loads but never finishes running can someone please help! I am not in a position to buy or pay for a new cd of windows so that I can make a new clean instalation as I can't afford it can someone please help!

    Download of updates of work but the installation of updates arnt working
    installation of games arnt working cd - I get errors
    disk defragment simply does not work I click top but nothing happnens - perhaps sumthing to do with priviliages admin, but I am the administrator.
    Scan disk does not work as it says system is already used but works if I put it to run at reboot
    MY acer DEFAULT factory restore setting does not work it loads but never short - that led me to believe I have no control over my privliages of basic windows system, but I am the adminsitror.

    I already had major problems when WIndows would break and stops working when you start up, I managed to solve this problem in safe mode and disabling some start up programs to check the malware was eventually attached to my system using windows scanner and malwarebytes defnder, I managed, but it seems that it is undetectable.

    I am unable to afford a new cd for a new clean instalation of windows, I think I need. can someone please

    Hello

    There is no Windows Vista downloads available from Microsoft.

    You can contact Acer and ask them to send you a set of recovery disks.

    They should do this for a small fee.

    http://us-store.Acer.com/RCD/

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    It comes to the use of the partition Recovery of Acer to restore factory settings.

    http://Acer.custhelp.com/app/answers/detail/A_ID/2631

    Note: During the process, all data stored on your computer will be overwritten. This means that all of your files, such as e-mail and photos, will be deleted. Therefore, we recommend making a backup of all data before starting the recovery process.

    To start the system recovery:

    1. Restart the computer.
    2. When the Acer logo appears on the screen, press the left Alt and F10 keys.
    3. If you are prompted with a Microsoft Windows splash screen, press the Enter key.
    4. After that the Acer eRecovery Management application is loaded, select your type of restore.
    5. Read the review and then click Next when you are ready.
    6. Click Next to start the restore process. It may take 10 minutes up to an hour fom anywhere to restore.
    7. Once the restore is complete, your computer will restart. After the reboot it will load Windows and start the installation of your software and drivers. Your computer will restart several times during this process. Once they are all completed, your computer will be like it was when you bought it first.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Some manufacturers have more available Vista recovery disks.

    If this happens or the recovery Partition is damaged, you may need to try this instead:

    You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.

    Other manufacturers recovery DVDs are should not be used for this purpose.

    And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

  • I have an error message after an update, WindowsUpdate_0000737D""WindowsUpdate_dt000, can someone please help, my computer installs updates whenever I stop. "

    I have an error message after an update, WindowsUpdate_0000737D""WindowsUpdate_dt000, can someone please help, my computer installs updates whenever I stop. "

    @cinziac (who has not declared his complete version of Windows):

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy. If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    ~ Robear Dyer (PA bear); MS MVP (that is to say, mail, security, Windows & Update Services) since 2002. DISCLAIMER: I do not represent nor don't work for Microsoft

  • Can someone please help to get the drivers/utilities on my Sony laptop to my bluetooth stack?

    Toshiba bluetooth stack, Sony & Windows 7

    "To continue or not to continue the reinstallation of the Toshibas enigma -" Toshiba bluetooth stack "-on a Windows 7 Pro upgrade Vista Pro.

    After a clean install, I lost my beautiful environment of Bluetooth on my laptop Sony vgn-bx51-vn in 2005 (a laptop that is like finding teeth of chicken on the Sony site).  I did a smart thing to keep the "Toshiba" Bluetooth file when I finally removed the windows.old folder after the re-installation.  Only smart because it allowed me to compare models with a pilot of 'original' newly downloaded and files utility (including msi files) Sony - the result was that there are a lot of files that is different.

    They newly installed drivers grumble horribly subject knowing incompatabilities with Win 7 (which is just a skin on top of Vista... or so I thought) and refuse to carry you.  They subsequently take you to Toshiba where you end by abandon the search for any useful help in spite of being a good faith user - no?

    Cut to the Chase.  Can someone please help to get the drivers/utilities on my Sony notebook by hook or crook.  NB. I hope just to aspire to the use of Bluetooth for something useful someday but am also irritated by the cul-de-sac which is software policy.

    Thank you very much - I.

    Ok.

    I mentioned that I had 2 problems - no Wifi and no BT.

    Wifi driver here http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=2259&DwnldID=20790&ProductFamily=Wireless+Networking&ProductLine=Intel%C2%AE+Centrino%C2%AE+Wi-Fi+Products&ProductProduct=Intel%C2%AE+PRO%2fWireless+3945ABG+Network+Connectioneng#help

    And here's the fix for BT http://mikescloset.blogspot.co.uk/2011/12/dell-toshiba-bluetooth-350-and-windows.html

    Credit to Mike for the intelligent correction.

  • can someone please help, unable to update or restore error-1

    can someone please help I'm unable to update or restore my iphone 5 c due to an error (- 1).

    It is usually a hardware error and you will need to get it repaired. You can also get the same message if the iPhone was jailbroken.

  • Can someone please help me solve my requirement

    Hi guys can you please help me to meet my needs.

    Here are my requirements:

    The bottom of mycompany site Web should appear as a footer (Center).

    And above the footer, my name should be displayed on the right (savvy to the right of the screen)

    Please see the image

    I want that my screen should look like the picture above.

    I wrote code like this:

    HorizontalFieldManager nameHfm = new HorizontalFieldManager(Field.FIELD_RIGHT);            LabelField nameLabel = new LabelField("Developed by me");            nameHfm .add(nameLabel );HorizontalFieldManager  footerHfm = new HorizontalFieldManager(Field.FIELD_HCENTER);LabelField myCompany = new LabelField("MyCompany.com");footerHfm.add(myCompany);VerticalFieldManager nameAndFooterVhm = new VerticalFieldManager();            nameAndFooterVhm.add(nameHfm);            nameAndFooterVhm.add(footerHfm);            screen.setStatus(nameAndFooterVhm); // here screen is instance of the class which extends MainScreen
    

    But the above code responds to my needs. Two labels are visible but not like I want to.

    Can someone please help me solve my requirement.

    Thank you

    Maury.

    Try this:

            HorizontalFieldManager nameHfm = new HorizontalFieldManager()
            {
                //customize if needed
            };
            LabelField nameLabel = new LabelField("Developed by me" , Field.USE_ALL_WIDTH | DrawStyle.RIGHT);
            nameHfm .add(nameLabel );
            HorizontalFieldManager  footerHfm = new HorizontalFieldManager()
            {
                //customize if needed
            };
            LabelField myCompany = new LabelField("MyCompany.com", Field.USE_ALL_WIDTH | DrawStyle.HCENTER);
            footerHfm.add(myCompany);
            VerticalFieldManager nameAndFooterVhm = new VerticalFieldManager()
            {
                //customize if needed
            };
            nameAndFooterVhm.add(nameHfm);
            nameAndFooterVhm.add(footerHfm);
            this.setStatus(nameAndFooterVhm);
    

    Concerning

    Bika

  • Could someone please help me with a problem I'm having with my update s/ie window?

    I was trying to find a way to get help with my concern about internet/window update of. 99% of the time when I'm in train to get updated window or check the mails on yahoo and a few other sites, my page is immediately closed. I tried to delete the cookies and files and restarted and system restore and reset my IE as well. Nothing works, and I know that I need some updates (would be nice to be able to check my email yahoo also).

    This is what happens in detail:

    I type in the Web site window update and as soon as he gets it closes immediately. When I type in the website of yahoo and then click check mail it closes immediately. There were a few other sites, but these are the 2 most important for me. I have no error code and no warning, just boom that it is gone and everytime I try to bring everything back up, it closes. I did everything I could and I am at a loss.

    Could someone please help me if I can get things and finally be happy and not so stressed. This happened for some time now. I tried to contact technical support, but I can't ever get a straight when clicking we answer contact as normal websites don't. So I try here.

    Please help me solve this problem... also I "think" I have IE 8? could be 7, but I think that 8. I can't because it messes up my computer.

    Thanks, I look forward to talk to someone soon then.

    Catt

    You probably have a nasty malware infection.

    In case you are unable to solve this problem with the suggestions of others, I think you should choose interactive free aid to this page:
  • I can not access google, but I can access all the other sites. I have this problem in all browsers. Can someone please help?

    Hello.

    I can't access google in any browser ( Chrome, Explorer,Firefox). It just does not load. But i don't have any problem with any other sites. Actually i could even access google just yesterday.
    

    I tried to delete the cookies, anti-malware software installed, I deleted the cache, I erased the history etc... Basically, I tried everything that was suggested on previous questions, but nothing helps.

    I would really appreciate if someone could help me.
    Thank you.

    INDY1391:

    Your problem is solved? If you have not already the case, please mark this thread as solved by the solution of marking.

    This will help other users experience similar problems helps to find faster and more efficiently.

  • Can someone please help me remove my credit card information? Or at least stop the automatic renewal? !!!

    Hello

    Can someone help me remove my billing information (the link is broken on customer support)? Or stop the automatic renewal?

    Adobe never expected to be so meri practices subscription; It's really, really bad taste.

    Hi Thomas,

    Please reach out to support by chat/call for payment and billing related queries.

    Contact the customer service

    * Be sure to stay connected with your Adobe ID before accessing the link above *.

    Kind regards

    Sheena

Maybe you are looking for

  • Satellite A350 - what is Wireless Manager?

    I put this here instead of the instance wireless cos I thought that people with knowledge of the real system can better know. I have an A350 and it installed with this wireless Manager that runs at startup, there always a no entry sign on it when I l

  • Need drivers for Satellite M70

    Hello I have a satellite M70 and my laptop crashed. I don't have a recovery CD. Then I bought Windows XP Professional and try to install it again. Windows XP was not able to install some HW like the wireless 2200 BG, display... Do you know where I ca

  • Scanner HP Scanjet 5590 digital flatbed disappears as a device

    Why this unit does not disappear as a device? Reinstalling and downloading software are tedious and not fun. You said in your description, is it compatible XP and Vista. Hmmmmmmmmmmmmm. very interesting this problem has not been resolved. Gives me re

  • Sound on toshiba satellite problem

    I have windows 7 toshiba satellite may whenever I listen to a music every few seconds just a few disturbances in a sound...I tried to install the new drivers, and that did not helpI don't no what is the problem and I hope someone could help me

  • Change the default time for Win 7

    Hello How can I change the default behavior of the stop command in Windows 7 so that whenever I have shut down my computer, it stops after say, 'x' minutes instead of close immediately. I came across a registry setting "WaitToKillServiceTimeOut", but