hitTestObject works for a mc but not for the other

Hi - I've given instance names to two movieclips for 'bee' and 'energy '. When I sling the 'ball' upward and it hits the bee runs all the code but when I sling and hit energy, nothing happens. Thanks for any help.

function onMyEnterFrame(evt:Event):void

{

Bee.x += 1;

If (bee.hitTestObject (energy))

{

trace ("Energy");

beeHit = true;

Energy.Visible = false;

Power.x = energy.x

Power.y = energy.y

this.addChild (power);

}

If (bee.hitTestObject (ball) & & beeHit == false)

{

trace ("Gotcha");

beeHit = true;

Bee.Visible = false;

pop_mc.x = bee.x

pop_mc.y = bee.y

this.addChild (pop_mc);

}

}

You might be experienciung some confusion with your names in the coding.  I don't see anywhere where the ball is checked to a hitTest with energy... the first conditional tests if bee hit energy, no ball.

Tags: Adobe Animate

Similar Questions

  • Executable work on a laptop, but not on the other

    Hi all

    I have a project of labview in which the main program calls the second program, I use the shared variable to share information between these programmes and made an executable file, the problem I am facing is that works execuatble on the machine where it is made, but on another machine. Y at - it no problem using variables shared in the executables. ? Please let me know.

    Thank you

    Ankit


  • I have an overlay in the "Develop" Module but not in the other modules. What can I do?

    I have an overlay in the "Develop" Module but not in the other modules. What can I do?

    The GPU acceleration works on some computers and not on others. If everything works properly with disabled GPU acceleration should be the parameter, you must use. The function does not in Lightroom automatically faster. I don't have a dedicated in my computer graphics. But I understand that the main advantage of having the GPU acceleration for users who have monitors high resolution.

  • where can I find the Vijaya police? I have it in CS5 in a PC, but not in the other.

    where can I find the Vijaya police? I have it in CS5 on a PC but not on the other. How can I get? Thank you

    Vijaya is a typeface that was designed for Microsoft and came with Windows 7 and 8. https://www.Microsoft.com/typography/fonts/family.aspx?FID=386

    It has nothing to do with Adobe products.

  • RAISE_APPLICATION_ERROR work on A schema, but not on the diagram B

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
    PL/SQL Release 10.2.0.5.0 - Production
    CORE Production 10.2.0.5.0
    AMT for Linux: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production

    Hi, I'm working on this link: http://kamranagayev.com/2009/10/04/block-developers-from-using-toad-and-other-tools-on-production-databases/
    CONNECT / AS SYSDBA;
     
    CREATE OR REPLACE TRIGGER block_tools_from_prod
      AFTER LOGON ON DATABASE
    DECLARE
      v_prog sys.v_$session.program%TYPE;
    BEGIN
      SELECT program INTO v_prog
        FROM sys.v_$session
      WHERE  audsid = USERENV('SESSIONID')
        AND  audsid != 0  -- Don't Check SYS Connections
        AND  ROWNUM = 1;  -- Parallel processes will have the same AUDSID's
     
      IF UPPER(v_prog) LIKE '%TOAD%' OR UPPER(v_prog) LIKE '%T.O.A.D%' OR -- Toad
         UPPER(v_prog) LIKE '%SQLNAV%' OR     -- SQL Navigator
         UPPER(v_prog) LIKE '%PLSQLDEV%' OR -- PLSQL Developer
         UPPER(v_prog) LIKE '%BUSOBJ%' OR   -- Business Objects
         UPPER(v_prog) LIKE '%EXCEL%'       -- MS-Excel plug-in
      THEN
         RAISE_APPLICATION_ERROR(-20000, 'Development tools are not allowed here.');
      END IF;
    END;
    /
    The problem is that RAISE_APPLICATION_ERROR (-20000, "Development tools are not allowed here.");
    are you working on a scheme A, but not on the schema B. thanks in advance.

    infotools wrote:
    for the USER sys, she also success.

    Any user who has the privilege of the ADMINISTRATION DATABASE TRIGGERS you connect successfully even if the trigger generates an error. This is to avoid a bug in your trigger to prevent the ADMINISTRATOR to connect to the difficulty of the trigger. If user B in your example received this privilege, the logon trigger will do nothing.

    As has been pointed out, it is trivial to work around - there is very little logic to try to limit what a user can use the tool. I can always find another client tool to use (for example, SQL or SQL Developer * more). And I can always change my client tool to send a different program to the database name.

    Justin

  • Can connect to Skype with a single account, but not with the other

    I am able to connect to Skype with my own login but not with the credentials of my friend on his pc. I can however connect with her details as well as mine on my pc?

    You need to upgrade your Internet Explorer to the latest version of IE8 for Windows XP.

    http://filehippo.com/download_internet_explorer_xp/

  • HP ePrint only works for the main e-mail address, does NOT work for the other email address

    I have several e-mail addresses configured in the list of authorized sender, but it seems to work only for e-mail messages sent from the e-mail address (main) of the owner. I get a confirmation email when I use other e-mail addresses, saying that "labor received ePrint" but no dice.

    What gives?

    Thank you

    P

    Hi panchuparayil,

    Thank you for the update.

    Please start with the update of the printer by getting the latest Firmware and updates given that a firmware update available.  After completing the update of the firmware, please restart the printer.  Once the printer has been restarted, please try to send another email to the address of electronic mail of the ePrint printer.

  • Tween alpha works fine in preview, but not in the swf file

    I was wondering if anyone could offer some suggestions. I have a few words written in text mode static I made a graphic symbol. On the timeline, I used the motion tween and classic Tween to create change aplha from 0% to 100%.  I made sure that I have enoough to space on my calendar (10 images).

    Aplha interpolation works fine in preview, however when I export the swf file the aplha interpolation doesn't work anymore? I tried to break the text, flash of reboot, restart my computer and similar proposals for other items such as:

    I was able to fix this by checking the box 'use bitmap caching DURATION' in Blend in the properties panel for the MovieClip in question.

    I am currently using Flash CS5 on an imac. Would be grateful for any suggestions, that I do not understand how something that worked very well, has suddenly stopped working? Bug?

    Thanks in advance

    Stace

    Create a new fla and duplicate your efforts with your tween alpha of your text.  any problem?

  • Query works well in an environment, but not in the other environment

    Hello

    I have a question that I am trying to run in two different environments.

    Test: - Oracle Database 11 g Release 11.2.0.1.0 - 64 bit Production
    Prod: - Oracle Database 11 g Release 11.2.0.1.0 - 64 bit Production

    Now the query runs fine in one environment and fails in the other environment.
    It gives following error.


    ORA-01861: literal does not match the format string
    01861 00000 - "literal does not format string.

    The query is too long and contains CHAR-DATE and DATE-CHAR conversions.

    The same query works very well on the TEST environment and the PROD environment.

    Any help related to it would be appreciated.

    Thank you
    Mahesh

    MaheshGx wrote:
    Hello

    I have a question that I am trying to run in two different environments.

    Test: - Oracle Database 11 g Release 11.2.0.1.0 - 64 bit Production
    Prod: - Oracle Database 11 g Release 11.2.0.1.0 - 64 bit Production

    Now the query runs fine in one environment and fails in the other environment.
    It gives following error.

    ORA-01861: literal does not match the format string
    01861 00000 - "literal does not format string.

    The query is too long and contains CHAR-DATE and DATE-CHAR conversions.

    The same query works very well on the TEST environment and the PROD environment.

    Any help related to it would be appreciated.

    Thank you
    Mahesh

    This is called a bug. One caused by the person who developed the code. They relied on an implicit conversion between strings and dates when
    production quality code will always use the function to_char and to_date with a format mask.

  • why there are gaps in the product on this catalogue page, but not on the other catalogues?

    dapper5. BusinessCatalyst.com

    There are strange empty spaces on this page http://dapper5.businesscatalyst.com/polo-style-shirts

    Any ideas what could happen.  Other pages are ok http://dapper5.businesscatalyst.com/greg-norman-collection

    This is the html code for the overall layout module:

    < div id = "sidebar" >

    < div class = "box" >

    < div class = "main topic" >

    Catalogues of < h2 > < / h2 >

    < / div >

    < div class = "categories" >

    {module_cataloguelistdump-1}

    < / div >

    < / div >

    < div class = "box" >

    < div class = "main topic" >

    Recommended < H2 > < / h2 >

    < / div >

    < div class = "product list" > {Default module_productfeaturelist, recommended, 4, true} < / div >

    < / div >

    < / div >

    < div id = "content" >

    < div class = "webshop-header" >

    < div class = "bread crumbs" >

    {module_menu, 1211169}

    {tag_cataloguebreadcrumbs}

    < / div >

    < div class = "webshop-nav" >

    {module_menu, 1211155}

    < / div >

    < / div >

    < div class = "webshop-block" >

    < div class = "product list" > {tag_productlist, 4, true} < / div >

    < / div >

    < / div >

    Thank you

    Hi there, because you have no defined height on your objects.

    If you notice that one working has the names of product on two lines, on the one that does not work there is a on a single line and so shorter in height, then the others.

  • display problem in bridge on a computer but not on the other

    Hello

    I'm having a problem with tif and psd (and I see now, it's on some jpg) images display correctly on my desktop XP SP3. The thumbnail looks ok, but the preview image appeared wrinkled,

    and none of the original image is noticeable.

    I use extended PSCS4. I looked on my laptop Vista Ultimate SP2, and for the same program images display properly.

    The Adobe programs on the desktop are up-to-date.

    The images in question on the desktop appear well in Photoshop or IrfanViewer. I copied on them to the laptop and to the bridge on the laptop it seems in good condition.

    I'm assuming that somewhere, Adobe Bridge has got corrupted on the desktop.

    Is it possible to cleanly reinstall just bridge?

    Thanks to the one who is kind and wise enough to advise

    in Bridge, go to Edition-> Preferences-> advanced, and then select make software to use

  • Our addon works under Firefox versions but not under the version of ESR

    We develop a Firefox addon for browser automation. The addon works with any version of the standard Firefox, while under Firefox ESR version 38.2, the addon does not communicate with Firefox while the addon is marked enabled in all: addons
    What can make the difference between Firefox and Firefox ESR of point of view addons?
    Thanks in advance.

    Hi, there should not be a difference in this sense, but please post answers your question in the addon mozilla forums where you will get probably better all questions MARRED extension development: https://discourse.mozilla-community.org/c/add-ons

  • loadMovie working in Flash Player, but not in the online validation

    I built a website

    use of Dreamweaver and Flash. This page:

    http://www.tonystubbs.com/print.html

    has a link under 'print' says "catalog." We're supposed to to load a swf file when you click it. It works when I view it in Flash Player, but when I import into Dreamweaver and the poster, it does not work.

    It is probably a problem with the file/geotargeting since you seem to be loading the swf file into the html page in a separate folder.  When you do this, all files that load the swf file should be targeted as if the swf is in the same folder as the html file.  So if your another swf is also in the folder images, then when you specify to load it into the Flash file you include the images folder in the path.

  • HP printer works on line printer, but not on the documents from the computer

    Desktop HP 1000 prints from online sites but ignore the lines when printing under Vista (works)

    Hi Jsinger, hope you had a great weekend!

    I recommend to remove the ink cartridges and performing a power reset the printer. Unplug the power cord from the printer and the power outlet, then wait 60 seconds. After 60 seconds, plug back in the printer. Make sure that you connect the printer directly to a wall outlet. Make sure to bypass any surge protector or power bar.

    I also recommend the continuation of the procedure described in this document on the problems of quality Print to the HP Deskjet 1000

    Please hold me!

  • SWF works fine in IE but not in the QT COM flash drive

    Hi all

    I am writing a QT application that needs to display a SWF file. I finished and tried to display an example of SWF (a.swf) file downloaded from the internet and the result was OK.

    Now, I started writing my own SWF (b.swf) using ActionScript 3 file and compiled with MXMLC. But b.swf couldn't be displayed in my QT application.

    What is strange, is that both a.swf b.swf could be displayed in IE.

    Could anyone guess what the reason would be, please?  Thanks in advance.

    Problem solved. What happened was that my image was not large enough to be seen in a small window, so it seems as if the image did not load at all.

  • Mouse freezing on the administrator account, but not on the other 8 portable computer user accounts windows

    Hi I have a Toshiba laptop, it's only a few months. This is the second time I had this problem the first time I had to delete the user account and to set up a new.

    I was on the laptop and all of a sudden the mouse wouldn't move. I pressed the Start button of windows and door to the top of the start screen. I was able to move with the keyboard, but the mouse did not work. So I pressed CTRL + ALT + DELETE and disconnected.
    When I clicked on one my friends login it worked fine no problems with the mouse so I logged in my own but the mouse is still stuck.
    I restarted my laptop and check the updates, but my laptop is fully updated.
    I have not used my account for a few days and I just connected again and the mouse worked. I opened an excel file and started working on it for about ten minutes when the mouse froze again. I am now logged in on my friends account and it works fine.
    Any ideas? I don't really want again to delete my account!

    Nothing extraordinary. I do not use many standard only apps provided with the operating system. I upgraded to 8.1 after posting the question, it seems to have done the trick... for now... If all goes well!

Maybe you are looking for