Hunting the yoyo blue box

Hello world,
As I said in an earlier post, I am ready to do some target shooting. I drew a box, gave it a name, and making it move in a yoyo manner horizontally. What I want to, is the following:
Every time I detect a collision, I will hear a different sound. Instead of my usual bang.mp3, it's going to be bang2. mp3.  But I have a problem about the collision. Is it going to be between my movieclip_1 and my_box, or
boom( the impact hole) and the my_box. I understand the collision thing, but it is still a mystery, like the seasons and the tide of the sea. here the code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
var myTween = new Tween(my_box,"x",Strong.easeInOut,10,600,1,true);
myTween.addEventListener(TweenEvent.MOTION_FINISH, onFinish);
function onFinish(e:TweenEvent):void
e.target.yoyo();
var mySound1:Sound = new Sound();
var myChannel1:SoundChannel = new SoundChannel();
mySound1.load(new URLRequest("bang2.mp3"));
var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
mySound.load(new URLRequest("bang.mp3"));
stage.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
this.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
function fl_MouseClickHandler_2(event:MouseEvent):void
if (movieClip_1.hitBool)
  mySound.play(1,1);
  var boom:Boom=new Boom();
  addChild(boom);
  boom.x = mouseX;// not sure this is what you want form x,y
  boom.y = mouseY;
stage.addChild(movieClip_1);
movieClip_1.mouseEnabled = false;
movieClip_1.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor_2);
function fl_CustomMouseCursor_2(event:Event)
if (movieClip_1.hitTestPoint(stage.mouseX,stage.mouseY))
  movieClip_1.hitBool = true;
else
  movieClip_1.hitBool = false;
movieClip_1.x = stage.mouseX;
movieClip_1.y = stage.mouseY;
Mouse.hide();

Morning
The soccer game was lame. Thank you for helping.
Your answer is  right, but it is redundant. Why create a new function that would conflict with the existing one with its own set of condition? What I did, is
to put the hitTestObject condition in the existing one that has all the action. Here what I did : this way, the trace appears in the output panel.  but when I put a new action like  mySound1.play(1,1);, there is nothing happening when the hitTest occurs. I should be hearing the new sound bang1.mp3.
Why not?
this.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
function fl_MouseClickHandler_2(event:MouseEvent):void
if (movieClip_1.hitBool)
  mySound.play(1,1);
  var boom:Boom=new Boom();
  addChild(boom);
  boom.x = mouseX;// not sure this is what you want form x,y
  boom.y = mouseY;
   if (movieClip_1.hitTestObject(my_box));
   trace("Collision detected!");
   mySound1.play(1,1);

Similar Messages

  • How do I get rid of the Facebook blue box on my Firefox pages???

    How do I get rid of - and why is - the little blue box with Facebook asking me to go through Facebook instead of directly to where I want to go???
    I do not wish to allow Facebook into my life any more than it is now.
    Thank you

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    Do a malware check with some malware scanning programs on the Windows computer.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br /><br />
    *http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    *http://www.superantispyware.com/ - SuperAntispyware
    *http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    *http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    *http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • I keep getting the little blue box with the question mark

    Hi
    I have 10.6.7 system software and my safari is 5.0.4
    I have called apple twice with this problem already but nothing has helped except for short times.
    I have reset safari about one dozen times and when I do I reset the top 7 items and I've emptied the cache in addition just in case. I've also taken my safari preference plist out of my library and trashed it.
    And I've run disk utilities many times and restarted my computer. Each thing I do will solve the problem for a short time, even up to a day or more (or less) but then it comes back. For instance on Facebook maybe 1/8th of the thumbnail images have the little blue boxes with the question marks but most don't. I can't figure it out. Sometimes even the iPAD safari gets them too but my firefox doesn't show them and neither does Safari on my eMac.
    Yesterday the question marks even showed up in ONE mailing on all 3 computers with the question marks in the blue boxes (meaning my iMac, my eMac and my iPad) but then it just all resolved after a few hours. This does sound like possibly a server problem except today it's happening (in Safari again) only on this iMac in Safari (not firefox) and not on the other two devices.
    One more thing, since they changed my radio on the roof for my wireless internet, the 5.8 phone cuts out the internet when I use it. The problem has gotten worse since they changed the radio to the same frequency as the phone, it's a much faster service than the 2.4 radio. I don't know if this is related or not.
    Thank you,
    Martha

    <Contact your ISP.
    Is it possible, Carolyn, that this would mainly and almost always be only affecting the iMac and Safari in the iMac if it were a server issue? Right now Safari has more blue boxes with question marks than ever and the eMac and iPad have none. Firefox on the iMac has none also.
    I should try a direct connection and by pass the router and see if that makes a difference.
    I will contact them tomorrow but I want to get clear in my head first all the facts and possibilities.
    Thanks!
    Martha

  • Suddenly I see the usual blue box with question mark inside mail messages instead of pix

    Suddenly I see the usual blue box with question mark inside mail messages instead of pix.
    That did not happen before.
    It happened only on certain pages with Safari, like the google news feed which did not display pix.
    However, this new mail problem is really disturbing.
    I checked Little Snitch and port 80 is open.
    I checked java pref.
    I am at a loss.
    PLEASE HELP!

    Suddenly I see the usual blue box with question mark inside mail messages instead of pix.
    That indicates that your Mail preferences are setup to not display remote images in email messages. You should check Mail->Preferences->Viewing and make surre the box to 'Display remote images in HTML messages' is checked.
    I checked java pref.
    Java has nothing to do with Mail, or displaying images in it or any browser.

  • What is with the little blue box with the question mark.

    what is with the little blue box with the question mark?

    See '''''cor-el's''''' answer to that question here (only the portion down to the line break): http://support.mozilla.com/en-US/questions/781372?s=resend+&as=s
    <br />
    <br />
    '''Other issues needing your attention'''
    The information submitted with your question indicates that you have out of date plugins with known security and stability issues that should be updated. To see the plugins submitted with your question, click "More system details..." to the right of your original question post. You can also see your plugins from the Firefox menu, Tools > Add-ons > Plugins.<br />
    <br />
    *Next Generation Java Plug-in 1.6.0_17 for Mozilla browsers
    **7 updates behind
    **'''''Security update version 1.6.0_24 released 2011-02-10'''''
    #'''Check your plugin versions''': http://www.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #'''Update the [[Java]] plugin''' to the latest version.
    #*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
    #**'''''Be sure to <u>un-check the Yahoo Toolbar</u> option during the install if you do not want it installed.
    #*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org
    #*Java Test: http://www.java.com/en/download/help/testvm.xml

  • What is the little blue box on the custom layout background . Ll the choices have this and show up in the photo

    i used the custom feature for 1 photo. All the choices have a little blue box on it that shows up in the photo. What is that?

    That is not a standard feature of Firefox.
    '''Reset''' removes all extensions and themes, along with other specific things, as explained in this support article.
    https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems#w_what-does-the-reset-feature-do
    You need to reinstall which extension added that '''F''' to Firefox.
    [https://addons.mozilla.org/en-US/firefox/search/?q=Facebook&appver=33.0&platform=windows Here's a search of Facebook extensions] that are available from the Mozilla Add-ons website.

  • I phone 4 ..in settings the line with carrier (including the little blue box with the telephone symbol) has disappeared so when i insert a sim card the iphone searches for a network but comes up with no service ! has anybody got any ideas ?

    i was sent a new sim card from orange to change to a new contract . when i changed the sim card i noticed the iphone was looking for a signal but could not find one . when i went into settings i noticed that the line which contains carrier and the blue icon with the telephone symbol had disappeared . any idea how i can get it back ?

    Hello, scooterbenny. 
    Thank you for visiting Apple Support Communities.
    Here are the best troubleshooting articles that I would recommend going through when experiencing this issue.
    iPhone: Troubleshooting No Service
    http://support.apple.com/kb/ts4429
    iPhone: Troubleshooting issues making or receiving calls
    https://support.apple.com/kb/TS3406
    Cheers,
    Jason H.

  • I'm trying to load the free trial of Illustrator; I get to the Download page, click the big blue box at the top righthand of the screen, but it asks me to choose an application (?)  What should I choose to open my new trial with?  Thanks.

    Giving Illustrator a try with the free trial offer.  When I go to download Ai, I am asked to choose an application with which to open it--what should I choose?

    Sounds like you maybe trying to download with firefox. In Internet explorer it will automatically switch to the correct application, but with firefox it prompts you instead.
    Scroll down the window and find content manager. That will download the installer. Run the installer, after the installer has finished and the manager runs. Open the manager if it is not already, then from there you can select illustrator. It will install it for you.

  • How can I disable Notification Centre in IOS5 and go back to getting the big blue text message notifications?

    I have Iphone 4S on iOS 5
    I flicked the button in settings to set up Notification Centre, but now I want to disable Notification Centre as the text notification is nowhere near as good as the old 'big blue' text received box.
    1- where do I find button to DISABLE Notification Centre? (I can't find one)
    2- how do I revert back to the old big blue box text notification?
    Thanks

    I've tried literally every option available in "Notifications" to get back the big blue box, but it seems that every option I choose nothing really changes.
    The messages continue to come up with the small box, green Message icon, and the name and Text Message beneath.
    Is there no other way, or some sort of trick, to get the blue box back?
    Thanks!

  • Upgraded to ios6 on my iphone 3gs and email is not displaying images. It has a blue box with a blue question mark inside

    I just upgraded to ios 6 on my iphone 3gs and I noticed on a couple of incoming emails that the images and information are not being displayed. There is a blue square box with a blue question mark inside. I already tried to press the home key and power key to restart. The email still does not display correctly. I went on my laptop to retrieve that same email and I was able to see the graphics and information, so the problem is on the iphone. I received two emails like this, so I'm missing all the important information. I also tried to retrieve my email through the internet browser and I still have the same problem. Any suggestions? Thanks!

    I forgot to mention that I have an Ipad 2 also and I can view the email information on there also. I received an email from Party city and it said to click here to print out the coupon. So I click the coupon and there is the little blue box with the question mark. This is the first time I've seen this happen, as I have printed out the coupons before. Maybe it has to do with the IOS6 update, because this just started to happen right after the update.

  • How to get rid of the main text box in the back of the page AND move things

    I usually work in Adobe Illustrator, Photoshop, and InDesign, but am creating two newsletter templates in Pages for a colleague, since it will be easier for her. But, for the life of me, I can't figure out how to get rid of the main text box in the back of the page that is driving me crazy. I just want a nice blank page that I can do whatever I want with. AND, I can't figure out how to select things so that I can move them, like shapes and text boxes. Some things seem to move fine, then other things just sit there. I am at the end of my rope!!!

    Hi, Dylan. Welcome to Discussions.
    If you're referring to the area where you just start typing when you open a new blank document, you can't get rid of it. But you also don't have to use it. You can insert text boxes and size and position them as you desire. Just be sure they're defined as Fixed on Page. When one is full and you want to continue it to another page (or to the side), click in the blank blue box on the lower right side of the text box. That will create another box and your overflow text will flow into it. Then position it where needed.
    Also, you can create a text box the width of the page and then set it for 2 or more columns.
    When you want to send something to the back and you may want to access it again later, just use the send backward command. If you send it all the way to the back, it will be behind the main text layer (where it will be safe from acvcidental movement) but you will have to click outside the work area and then drag the pointer to the object to select it.
    Hope this helps to get you started.
    Walt

  • How to deactivate blue box auto correct

    I am a very bad speller.
    You need to know this before I start this question.  I am horrid.  Beyond horrid.  I drive everyone crazy with handwritten notes.  You would think auto spell checks would be good for me, but sometimes they are not.  Sometimes I am so off - i mean REALLY OFF - that the auto blue box speller checker fills in the wrong word for me. 
    I don't fault it.  It is doing its best.
    The problem is, it fills it in with what is often the wrong word, and in long documents, I often miss all the words I have to go back and try to correct the auto-corrects attempts to fix my horrid spelling. 
    Does anyone know how to turn off this feature?
    I have gone to System Preferences > Keyboard > Text and unchecked the "Correct spelling automatically" box, and I have restarted the computer, but still, it is auto fix my mistakes, with disastrous results.
    Advice on this matter is greatly appreciated.
    Best regards
    Jim
    PS Please do not suggest that I stop every time, to fix each mistake.  As a writer, you should not interrupt the flow of ideas.  The machine works for the man; not the reverse. 

    Hey hoopsmiller,
    Thanks for the question. If I understand correctly, you want to turn off auto correct in OS X. It looks like you have already done some troubleshooting. I would recommend that you read these articles, they may be helpful in troubleshooting your issue.
    Since you have already tried to turn it off for all apps, you can try individually.
    OS X Yosemite: Check spelling and grammar
    For a specific app: In the app, choose Edit > Spelling and Grammar > Correct Spelling Automatically (it’s off when a checkmark isn’t shown).
    Mac OS X 10.6: Checking spelling and grammar
    If you don’t see the “Spelling and Grammar” command in the Edit menu, the application doesn’t provide the Mac OS X spell-checking feature. Check the application’s preferences or menus to see if it has its own spelling checker.
    Thanks for using Apple Support Communities.
    Have a good one,
    Mario

  • I updated Firefox. Now, I can't get rid of the blue box saying drag drag the icon to the applications folder. Plus another icon to 'eject' firefox opens. Every time I open firefox, they show up. Even Apple Help could not fix it.

    I can close the little blue 'drag' box every time I open Firefox, but that is a hassle, and I know it should not be necessary. When I try to eject the 'peripheral' icon, it says I cannot because Firefox is in use. I have to wait until I close Firefox to be able to eject it off the desktop.
    Mac OS X 3.4 GHz, Intel i7

    Hi dgbakker-
    When you open Firefox and go to the Firefox > About menu, does it say that Firefox is up to date? I've seen at least one other person with this issue, and any more detail would be helpful.

  • Not a question.  A comment actually.  Regarding the persistent blue Autofill popup in Safari.  My wife first shut down the Mac then unplugged it for a few minutes.  On restart, the box was gone.

    Not a question.  A comment actually.  Regarding the persistent blue autofill box that may appear in Safari, my wife shut down the iMac then unplugged it for a few minutes.  On restarting, the box was gone.

    Do you have a question?

  • Is it possible to change the colour of box in script from black to blue

    Hi,
    Is it possible to change the colour of box in script from black to blue  or some other colour and background colour also...if so how....
    Thanks.

    No..
    It is not possible in scripts..
    In scripts u cannot use colors..
    In smartforms u can do that..
    reward if it helps u..
    sai ramesh

Maybe you are looking for

  • In Portal , iView of type WebService Not working.

    hi all , I am working on O4s SP7, I am trying an example where i want to access a web service using EP. i have made the proxy settings that are required.. In system configuration , under Visual Composer i created a new Model from System Template of t

  • Schedule line delivery date of sales ordere in production order-MTO

    We have a Make to order scenario where item in sales order can have mutliple scheule lines on different delviery dates. Ex : sales order 100020  and item no 0010 has schedules with schedule line dates as 10.04.2010----1pcs 20.04.2010---1pcs 03.05.201

  • BackupExec: A timeout occurred waiting for NDMPD.NLM to init

    "Error: 1004 A timeout occurred waiting for NDMPD.NLM to initialize." A very common and well documented issue but every fix I have found has not worked. The list is extensive so I will start by describing the issue, then the environment and finally w

  • ALV Grid works in normal screen but not in modal

    Hi, I'm struggling with an alv control I've created.  I need to have it displayed in a modal dialog window.  It works fine in a "normal" window but when I change the screen to be modal nothing displays. Anyone have any ideas or hit this issue before.

  • Should I learn Fireworks or Builder to Design Flex Apps?

    I need help in making a process decision on how to build Flex Apps going forward. In the past, we have built the concept for our Flex app in Photoshop and sent it over to our development team in India to build. The process has been difficult because