Adding sound to buttons causes then not to work.

I have a flash project with 3 buttons in each frame 1 button is the correct answer and two are not
here is the code
import flash.events.Event;
btnA.addEventListener(MouseEvent.CLICK, checkCorrectness);
btnB.addEventListener(MouseEvent.CLICK, checkCorrectness);
btnC.addEventListener(MouseEvent.CLICK, checkCorrectness);
function checkCorrectness(e: Event): void {
  if (e.target == btnA) {
  if (correctA) {
  totalscore++;
  } else if (e.target == btnB) {
  if (correctB) {
  totalscore++;
  } else if (e.target == btnC) {
  if (correctC) {
  totalscore++;
  score.text = totalscore;
  if (totalscore == 18) {
  gotoAndStop(21);
  return;
  nextFrame();
stop();
var totalscore = 0;
var correctA:Boolean = false;
var correctB:Boolean = false;
var correctC:Boolean = false;
score.text=totalscore;
each frame has this code below with the correct answer changing from frame to frame
correctA = true;
correctB = false;
correctC = false;
all works fine but now I have to use sound in the buttons so I duplicated a button and changed the name of one button to "true" and the original I changed to "false".
I added  in each of the two new button names a sound effect ( sound 1 for button true and sound 2 for button false)
So the frame list looks like this
frame 1
correctA = true;
correctB = false;
correctC = false;
button name 1 true instance name btnA
button name  2 false instance name btnB
button name 3 false instance name btnC
frame 2
correctA = false;
correctB = true;
correctC = false;
button name 1 false instance name btnA
button name 2 true instance name btnB
button name 3 false instance name btnC
according to this each correct button would trigger sound1 telly the score and move to the next frame
and each incorrect button would also tally the score and move to the next frame.
Not all selections are making the frame move nor the score tally.
any help.
ALL OF THIS WORK FINE WITHOUT THE SOUND AND THE BUTON NAMES CHANGED. SO THE RESULT IS I ONLY HAVE A WORKING FILE BUT WITHOUT THE SOUNDS FOR EACH BUTTON.
R

Great works like a charm, one thing though. Every time I click the Incorrect button button I hear that audio twice . I checked the actual mp3 and it just one sound.
Heres the code you gave me
var correctSound:CorrectSound=new CorrectSound();  // assign this class
var incorrectSound:IncorrectSound=new IncorrectSound();  "  "
function checkCorrectness(e: Event): void {
  if (e.target == btnA) {
  if (correctA) {
  totalscore++;
soundF(true);
  }else{
soundF(false);
  } else if (e.target == btnB) {
  if (correctB) {
  totalscore++;
soundF(true);
  }else{
soundF(false);
  } else if (e.target == btnC) {
  if (correctC) {
  totalscore++;
soundF(true);
  }else{
soundF(false);
  score.text = totalscore;
  if (totalscore == 18) {
  gotoAndStop(21);
  return;
  nextFrame();
function soundF(b:Boolean):void{
if(b){
correctSound.play();
} else {
incorrectSound.play();

Similar Messages

  • When trying to update to 4.0.1 it locks up when checking for updates do plug-in. This causing Firefox not to work. Why?

    When trying to update to 4.0.1 it locks up when checking for updates to plug-in. This causing Firefox not to work. Why?
    I am running windows 7. I have tryed uninstalling and reinstalling and every time it locks up at the same point, when it is checking for updates to plug-ins. I have run troublt shooting and it tels me :Incompatible Application. Why??

    Create a new profile as a test to check if your current profile is causing the problems.
    See:
    * [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting: Make a new profile]]
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins"
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See:
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • With Windows Vista, the most recent Itunes update 1/30/2014 has caused Itunes not to work, with a Mscvr80.dll not found error. Uninstalled all Apple programs, and installed fresh Itunes. Same problem. Tried to reinstall using an older install exe nogo

    Recent ITunes update has caused ITunes not to work. Tried uninstalling all Apple products and reinstalling fresh. Still doesn't work. Tried reinstalling from an old install.exe. Install went nicely but program won't start as it says it can't open the library file.

    Now that I have no way of accessing any of the products I have purchased from ITunes, I will most certainly never use ITunes again for any reason. Why throw good money after bad?  I will use another MP3 player that is not as cumbersome or proprietary.
    Lesson learned.

  • My itunes button seems to not be working. Every time I open the app, it closes and goes back to my homescreen

    My itunes button seems to not be working. Every time I open the app, it closes and goes back to my home screen.

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Go to Settings>iTunes and App Stores and sign out and sign back in.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

  • Adding Signal Processing vi to application causes exe not to work

    I am having a problem with building an exe that I hope someone can help me with.
    I have a LV2010 (10.0.1) project that I a build into an exe. This has worked fine and the exe works as it should.
    My problem starts when I add a vi.lib (Extract Single Tone Information) vi to the code to calculate the detected frequency of a vibration signal. I can run the application in Labview without any problems.
    When I try to build the executable I get an error:
    This is the full error message: 
    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:
    Error 1502 occurred at AB_Source_VI.lvclass:Close_Reference.vi -> AB_Build.lvclassave.vi -> AB_Build.lvclass:Copy_Files.vi -> AB_Application.lvclass:Copy_Files.vi -> AB_EXE.lvclass:Copy_Files.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Engine_Build.vi -> AB_Build_Invoke.vi -> AB_Build_Invoke.vi.ProxyCaller
    Possible reason(s):
    LabVIEW: Cannot save a bad VI without its block diagram.
    After searching through the message boards I found that I could enable debugging in the Build Specifications and that would allow LV to compile the exe without error:
    But the next problem is that the exe cannot run:
    I am stuck now. The exe does not run on my development machine. Am I missing some dll files that are needed because of the Extract Singal Tone Information.vi?
    Any ideas would be greatly appreciated.
    Thank you.

    I have managed to fix this problem.
    I am posting my solution here for anyone that might run into something similar.
    It turned out to be a strange problem to solve.
    first I tried to create an executable using only the Basic Single Tone Measurement.vi as suggested. This I could build and run without any problem.
    This showed that the vi was not the problem but rather something in my project.
    Next I tried various ways to build the project with the Basic Single Tone Measurement.vi placed at different locations in the project. But nothing worked.
    What finally resolved this problem was that I deleted a subvi that had originally contained an fft vi inside a true/false statement that was wired to a constant (to disable it). Even though the fft vi had been long since deleted and the conditional statement as well then for some reason the project would not build correctly when I placed the Basic Single Tone Measurement.vi anywhere in it.
    To summarize. I deleted a subvi that had previously contained a vi to calculate the fft and eigen frequency and placed the Basic Single Tone Measurement.vi in the top vi. This solved the issue and I could build and run the exe without any problems.

  • Skype 7.6 causing Chrome not to work

    A few days ago, Skype updated automatically to the latest version (7.6). Since then, I have been experiencing awful issues with Chrome and with Skype itself. --ISSUES WITH CHROME--If Skype is running, any page I load on Chrome won't appear, no matter if it is among my favourites or if I type in the web address myself. Chrome does reach the website, which means the search engine works, but it either doesn't show the page, which means I see Chrome's black background (...the one you see when you're reading PDFs on Chrome for instance) or it shows the actual page for half a second and then it goes back to the said black background. Refreshing the page won't work either. Plus the Adblock Chrome extension keeps crashing. How do I know it's Skype's fault? Because as soon as I quit Skype 7.6 everything goes back to normal! --ISSUES WITH SKYPE--As if this wasn't enough, Skype 7.6 has been having terrible issues also in terms of functionality. As soon as I start running the program, it looks as if it is working, but then, as soon as I start a conversation, the page won't move and I can't see what I've written and what other people have written. Names and conversations only appear (in bits and pieces) if I pass my mouse over them...it's as if Skype was constantly stalling. As of now, Skype is not usable and it's even causing issues to my Chrome.  Any help will be greatly appreciated.

    Try to reset all Internet Explorer settings: http://support.microsoft.com/kb/923737 Next reset LAN settings: Open Internet Explorer. Go to Tools -> Internet Options -> Connections -> LAN settings. Make sure that the only option selected is “Automatically detect settings”. Next clear all Temporary Internet Files: Open Internet Explorer -> Tools -> Internet Options -> General. In the section “Browsing history” press the “Settings” button and in the next window the “View files” button. Delete all files from the Temporary Internet Files folder.

  • Guide and Info buttons on remote not longer working?

    The Guide and Info buttons on my remote do not seem to be working any longer, like they've been remapped. Could anything have changed with my FIOS box via download?

    Sounds like you may have an error in your code causing something to fail?
    Without more info, it's pretty much impossible to help, other than giving generalities.
    Run your page through the validator at http://validator.w3.org to clean up any html errors. If the problem persists, post a link to your page in the forum so we can take a look at what's going on, as Ben suggests.
    Another thing to look for is multiple calls to jQuery libraries, especially different versions of jQuery libraries. That will cause your scripts to fail more often than not. Usually, you can keep the newest version's link and delete the older one and everything will come back, but sometimes scripts will conflict due to issues like using the same variables or function names and there's no good way to fix it, short of rewriting one of them.

  • 10.1.2.3 patch causes webutil not to work.

    I had 10.1.2.2 Developer Suite working with webutil. Then we applied the 10.1.2.3 patch. Now webutil does not work. I read metalink and it said to use jacob_1.10.1.zip. I did that. I also got the frmwebutil from webutil.2.2.zip. I signed both jacob.jar and frmwebutil.jar. I also overwrote the jacob.dll with the new jacob.dll. I recompiled a previously working webutil form. When I run the form I get this... Remember, this all worked before I applied the patch.
    Reading certificates from 141303 http://dxmooisaf:8889/forms/java/frmall.jar | C:\Documents and Settings\mreichman\Application Data\Sun\Java\Deployment\cache\6.0\63\f488f7f-7d1a1920.idx
    Reading certificates from 141303 http://dxmooisaf:8889/forms/java/frmall.jar | C:\Documents and Settings\mreichman\Application Data\Sun\Java\Deployment\cache\6.0\63\f488f7f-7d1a1920.idx
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.3
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.3
    Reading certificates from 141303 http://dxmooisaf:8889/forms/java/frmall.jar | C:\Documents and Settings\mreichman\Application Data\Sun\Java\Deployment\cache\6.0\63\f488f7f-7d1a1920.idx
    java.lang.ClassNotFoundException: oracle.forms.webutil.clientInfo.GetClientInfo
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
    .....

    Ok, let me see if I can clear this up.
    1. First from a patching point of view it doesn't matter if you are using Application Server or Developer Suite 10.1.2. The patches are the same for both.
    2. The base release (complete product) is 10.1.2.0.2. Both 10.1.2.2 and 10.1.2.3 represent patched versions of 10.1.2.0.2. All patches are cumulative so it doesn't matter if you got to 10.1.2.3 by way of .2 or .0.
    3. Patch 9593176 is a Forms Bundle Patch intended to be installed on top of 10.1.2.3 only. Refer to Note 1188127.1 for more information about this patch.
    4. If you patched from .0 directly to .3 and skipped .2, it is important that you refer to Note 1058514.1 in order to address a known issue with said path.
    5. As already noted, applying patch 9593176 does require the use of Jacob 1.10.1 if you plan to use the OLE functionality. However, more important is that this patch also includes a replacement for webutil.pll. It is very important that older versions be removed, including its related PLX file. You then need to generate a new PLX using the new PLL.
    Last but never least, is the original issue...
    ...java.lang.ClassNotFoundException: oracle.forms.webutil.clientInfo.GetClientInfo...This error suggests that either the jar file is not being downloaded or the bean is not being identified in the form. The latter is usually the issue and can be corrected by regenerating the FMX and ensuring that you use the compile_all=yes option when doing so. However, I would first recommend that you address the pll info I mention in #5 first.
    If this doesn't correct the issue, then look closely at the java console and see if you note the frmwebutil.jar files as being downloaded. If not, then it is likely missing from your archive entry or not being picked up for some reason and this is the cause of the problem.
    Michael Ferrante
    Senior Principal Support Engineer
    Forms Global Technical Lead
    Oracle Corporation
    Edited by: Michael Ferrante on Mar 29, 2011 3:48 PM

  • Cloning tool causes keyboard not to work.

    Every time I use the cloning stamp tool to edit a file, sometimes I hear a piano-like sound and my keyboard won't work.  I have a Mac running Yosemite but even before the upgrade it did that.  I'm using Creative Cloud but had CS4 and it did it with those too.  Is it a glitch?  Is anyone else having this issue?
    Under tags there seems to be a 'cloning stamp bug' choice.  Then I'm not crazy!  So, what's the solution?

    Have you done a Forum search yet?
    What do you have to do to resolve the issue at current?
    What have you done for trouble-shooting so far?
    Please read these:
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html
    http://forums.adobe.com/docs/DOC-2325

  • Programs The Cause Quicktime Not To Work.

    Hi,
    I'm running Windows Vista Ultimate x64 SP1 with 2GB DDR2 RAM, 160GB HDD, GeForce 9400 GT, AMD Athlon Dual Core 5400+ 2.80 Ghz Processor.
    Quicktime does not work properly for me, it is jumpy and different colors randomly flash. I have followed other instructions in similar posts but they have had no effect.
    I am going to change to Vista Ultimate x32, but before I do that I am wondering if there is any software or hardware that I may have that would cause QT to do this.
    Regards,
    Ben.

    Yes, I have done that.
    I've tried a few different things and none of them have worked, so I'm thinking it must be some hardware and/or software that is causing this to happen.

  • Mountain Lion causing apps not to work, how can I downgrade to Lion without Time Machine Back-up?

    Since installing Mountain Lion, I have found applications that don't work.  I want to go back to Mountain Lion, unfortunately I had trouble with my Time Machine back up hard drive a couple days after installing Mountain Lion and I don't have any back up to work from.  Tried to go to App Store and redownload Lion from there under purchases, but I got message that said "You can’t upgrade this version of Mac OS X because a newer version is installed."
    I have another mac that I can download the Lion install package to and then drag it over to this computer, so the question is, Will I be able to re-install Lion over the upgraded Mountain Lion without any problems?

    Babowa - By On Screen, I mean it still shows up in the disk utility and reads the following:
    MATSHITA DVD-R   UJ-898:
      Firmware Revision:    HE13
      Interconnect:    ATAPI
      Burn Support:    Yes (Apple Shipping Drive)
      Cache:    1024 KB
      Reads DVD:    Yes
      CD-Write:    -R, -RW
      DVD-Write:    -R, -R DL, -RW, +R, +R DL, +RW
      Write Strategies:    CD-TAO, CD-SAO, DVD-DAO
      Media:    To show the available burn speeds, insert a disc and choose File > Refresh Information
    There are several links here on the support forums with manyyy others having the same problem: https://discussions.apple.com/thread/4150905?start=30&tstart=0

  • Help, Spry Tabbed Panels are causing links not to work

    Here is the page: http://www.spalutions.com
    Here are the trouble spots:
    Menu at very top of page
    Home | Contact Us | Site Map
    Links within the panels
    Email link at the bottom of the content area
    Any help would be greatly appreciated!

    Fascinating.
    The Validator found three important errors you might fix to see if they help resolve the problem:
    at about line 107:
    <div class="editable"div id="contentWrapper">
    at about line 197:
    <div class="editable" div id="footer2"></div>
    and
    id="footer" twice on page
    After you fix these, run the Validator again: http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.spalutions.com%2Findex.html to find any more important issues.
    Then let us know if that helped!
    E. Michael Brandt
    www.divahtml.com
    www.divahtml.com/products/scripts_dreamweaver_extensions.php
    Standards-compliant scripts and Dreamweaver Extensions
    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, et alia

  • JRE 1.5 update causes code not to work

    OK - I need to understand the relationship between the private JRE in the JDK and the public JRE.
    I let the auto-update function update my 1.4.2 JRE to 1.5 and now my application won't run from the command line (although it will still run from inside NetBeans).
    My real confusion is that my classpath specifies the JRE inside the 1.4.2 JDK as tthe one to use.
    Here's my command line:
    java -classpath c:\JavaCode\IrrigationControl\dist\IrrigationControl.jar;c:\JavaCode\freetts-1.2\lib\freetts.jar;c:\OneWireAPI\lib\OneWireAPI.jar;c:\j2sdk1.4.2_06\jre\lib\rt.jar;%classpath% MainProgram.MainProgramWindow
    I am completely confused. any help would be appreciated.
    Peter

    Thanks,
    I am not trying to use 1.4.2.
    I copied this command line from a Java example and never really understood why it is the way it is. I've read the Java books I have and since they try to be platform independent, they are always vauge on the details of building a windows command line.
    Peter

  • Strange bug -- adding one more button OR page causes Form warning to appear

    I'm building a simple interactive document in InDesign CS4 on the Mac, to be exported/delivered as a PDF. There are a few text-based buttons on the Master Page that are set to Go To a Text Anchor on Release. There are 4 buttons of these buttons on the page, and each one leads to a different page in the document, and they all work fine. They are all built the same way.
    I want to export a PDF that opens cleanly in Reader, meaning no unexpected dialog boxes or warning messages appear. Up until this point, my document opens cleanly in Reader.
    However, when I create a FIFTH button (using the exact same method used to create the other buttons), OR I add ANY more pages to my document (which currently stands at 16 pages, but will need to ultimately be upwards of 40), for some reason, opening the PDF in Reader causes Reader to start displaying the large, distracting pink warning message at the top of the page:
    "Please fill out the following form. You cannot save data typed into this form. Please print your completed form if you would like a copy for your records."
    The fifth button I create (from scratch) causes this message to appear.
    Or, if I add another page (using my Master Page, where the buttons are used), this message appears. Even if the fifth button is not created, and I add another page from the Master, this message appears.
    If I add a blank new page (without using the Master Page), the message does NOT appear.
    So, for some reason, adding ONE more button, or referring to the Master Page in the document ONE more time by adding a 17th (or more) pages, seems to kick InDesign/Acrobat Reader into thinking my document is suddenly a form, and causes Reader to display that obnoxious pink message when opening the document.
    I've tried several troubleshooting steps.
    - I've ensured my buttons have unique names.
    - I've tried creating the fifth button from scratch, and also tried creating it from duplicating one of the existing "good" buttons.
    - I've made sure the button has a destination page/Text Anchor to go to.
    - I've opened the PDF in Acrobat Pro 9, and gone through all of the page and buttons in the Forms Manager, and there is nothing out of the ordinary in that view.
    Why is Reader suddenly thinking my document is a form (that "cannot be edited/saved") when I add one more button, or one more page!? It's bizarre, and quite frustrating.
    Thanks for any insights,
    Robbie

    You can use that same workaround with ID CS4 files. You just have to make the PDF and then go into Acrobat to add the security that doesn't allow editing (Acrobat -> Security -> Encrypt with Password) . That gets rid of the warning about the form. Of course if you actually have a form somewhere in your document, you won't be able to use that......

  • First time use of camera does not make a sound but use again then shutter sound can be heard

    when i first usse the camera on my i phone 4s the shutter does noy make a sound.
    when used again then the shutter soound  works.....any ideas/????????????

    so chris...
    It IS in fact "New" as it started a couple of days ago - AND - something indeed has changed = "... updated to iOS 8.1" - BUT - a little unclear about the context of "... when (f)irst released all ok" part? are these two separate statements?  "... updated to iOS 8.1 when it [was] first released" and "all was OK prior that point" and then started misbehaving right after the update? - OR are you saying that when "updated to iOS 8.1 [WHEN IT WAS] first released, all was OK - as in the shutter-snap sound worked fine and THEN suddenly began misbehaving"
    In these forums, it may be to your advantage to try not using IDevice 'texting' practice of being brief... in here, MORE is more better.
    If the update was the beginning of the issue, that may be added to the list of strange things that happen to some and not to others.
    I would suggest a visit to the Genius Bar if one is nearby, but older iPhone may only get you so far if you don't stick by your claim that "everything was fine until I updated my iOS 8 version"
    as I cannot help, I will leave you in this forum and further advice you may get here in Using iPhone (you know that you started the question out in Using Apple Support Communities forum)
    ÇÇÇ

Maybe you are looking for