Having problem adding typewriter sound to typewriter code

For the typewriter effect, I'm trying to add a typewriter "click" sound every time this function (within a class) writes a letter:
    private function setLetter(n:Number)
            var correctLetter:String = text.charAt(n);
            var part1:String = text.substr(0, n);
            temp_text = part1 + correctLetter + cursor;
            textfield.htmlText = temp_text;
When I add the lines below, the audio still isn't working (PS. I renamed the Class ID on the .wav file "sound55")
            var my_sound:sound55 = new sound55();
             var my_channel:SoundChannel = new SoundChannel();
             my_channel = my_sound.play();
It now reads
    private function setLetter(n:Number)
            var my_sound:sound55 = new sound55();
            var my_channel:SoundChannel = new SoundChannel();
            my_channel = my_sound.play();
           var correctLetter:String = text.charAt(n);
            var part1:String = text.substr(0, n);
            temp_text = part1 + correctLetter + cursor;
            textfield.htmlText = temp_text;
Can anybody tell me what is wrong with the three lines of audio "code"?

there's nothing wrong with your code assuming that's in a document class and sound55 is the class name of your sound.

Similar Messages

  • After downloading iOS7, I'm having problems with typewriting Korean in the apps such as the Pages and Keynote.

    After downloading iOS7, I'm having problems with typewriting Korean in the apps such as the Pages and Keynote.
    When I type "한글", it should appear as such but it appears as "하 ㄴ 그 ㄹ"

    Report this to apple via
    http://www.apple.com/feedback

  • I am having problem with my sound, after i updated to ios 6, apple please help

    i am having problem with my sound, after i updated to ios 6, i can hear music with headphone only, apple please help

    Try going into your settings and 'reset all settings'
    You will need to retweak your device but it's been said to help with sound issues.

  • After upgrade to ios7, few time i am having problem with my sound/speaker with terroble sound effect like machine or something.but after restart it will be fine.but how this thing can be fix? Because i never had this problem before upgrade to ios7.tq

    After upgrade to ios7, few time i am having problem with my sound/speaker with terroble sound effect like machine or something.but after restart it will be fine.but how this thing can be fix? Because i never had this problem before upgrade to ios7.tq

    Try going into your settings and 'reset all settings'
    You will need to retweak your device but it's been said to help with sound issues.

  • Having problem with Ipod Sound

    I am having a huge problem with the sound for my Ipod. I was recently at a concert and using my car audio conversion in both my Ipod and my girlfriends, when I unplugged it from hers to mine I lost all sound to my Ipod when I plug in my headphones now or when I put the receiver back into the bottom. I have reset and restored it and run the diagnostics check to see if it could be the USB or the headphone Jack. Both are in working order but I am still not getting any sound to my Ipod. Can anyone help me with this problem? My Ipod is my life staple for my morning commuet.

    You can try to following to rule out/fix a software problem:
    - Reset. Nothing will be lost
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory defaults/new iPod
    If still a problem you very likely have a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • Having problems adding packages

    I downloaded the Solaris (Sparc) companion CD's Dependency Package. It contains 14 or so files that I think should be patches. I run "pkgadd -d . " from my directory where they are and it says their are no packages to add.
    http://www.sun.com/software/solaris/freeware/pkgs_download.html#bundle
    Is where I got the package from.
    I have re-downloaded it like 5 times. I am running Solaris 9 on a Ultra 5. I have not had any problems adding packages before. The packages that I am trying to add are in thier own slice and I have a lot of room on my disks.

    I think I am having an ID10T error.
    I didn't realize the paths that I was giving it were incorrect.

  • Having problems with getting sound when I get MSG on my iPad.

    Having trouble w receiving sound when I get a MSG on my iPad. Can't figure out why

    1. Double-click the Home button and swipe Task Bar to the right
    2. Check the volume and mute settings
    http://i1224.photobucket.com/albums/ee374/Diavonex/6d3191ba.jpg

  • Having Problems Adding a Toolbar

    I am having great difficulty in adding a custom toolbar in safe mode. I haven't done extensive research but...
    It's a recent reinstall (it might have only updated as I didn't uninstall first) of Firefox 27.0.
    The support article I was reading suggested that I should be able to gain a custom toolbar by creating one in safe mode as all of my security/privacy add-ons such as Abines MaskMe are disabled there and then restarting. When I manually restarted, all the add-ons were disabled and the custom toolbar which I created was not there. The article suggests that this is not due to my add-ons. Yes, I do have a custom configuration but I wasn't starting it using a private browsing window as I know this interferes with saving the settings. I would like to not take it to a reset but I will do this if you advise. Please help.

    May be your preferences not saved.
    try with new profile, customize the toolbar in normal mode.
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    Profile Backup and Restore
    *http://kb.mozillazine.org/Profile_backup
    *https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • I am having problems with my canon mg2520 trouble code 5,156,69

    My scanner quit working. the printer prints and when doing a manuel scan I can perview the scan but it will not scan the material and place it in a file.
    I am using a Dell Insp. 660s or 6605 desk top computer running windows 7 home premium and service pack 1. My printer/scanner is a Canon mg 2520.
    When attempting to scan i get a code 5,156,69 and message telling me the printer is either not connected or turned off.
    The printer connects just fine and prints with no faults but wont scan.
    I have rebooted the computer and uninstalled the printer. reinstalled the printer and get a message that drivers are not installed. I use the installation disc to reinstall the drivers but get a message that the printer cant be found. How ever the printer still prints just fine.
    I have run tuneup utilities and found a lot of problems and corrected them still have printer but no scanner.
    I red your forums and performed the process for repairing a scanner with trouble code 5,156,61 on a mg2120 and a dell lap top but this also failed. I know this is not the same code I have but the complaint was the same. 

    Hi Toyvo,
    Since reinstalling the printer using the installation CD did not resolve the scanning issue, we can try downloading the latest drivers from the Canon USA website.  The following link will take you to the initial download page for your PIXMA MG2520:
    PIXMA MG2520 Drivers and Software page
    Once on the initial download page for your model, please do the following:
    1.  Verify that your operating system type is selected correctly in the OPERATING SYSTEM field.  If it is not, please select your operating system from the drop-down field. 
    2.  Next, please click on the red arrow next to the "RECOMMENDED FOR YOU" section and click the FULL DRIVER AND SOFTWARE PACKAGE file.  When you do, another page will appear giving details of the file you are about to download will appear. 
    3.  Please scroll down on the Details page and agree to the terms of the disclaimer message to continue with the download process by clicking on the "I AGREE - BEGIN DOWNLOAD" button.  After clicking the "I AGREE - BEGIN DOWNLOAD" button, follow the instructions to download and install the driver.  The time for the download process may vary depending on the speed of your Internet connection and the size of the file being downloaded. 
    Once the new drivers are installed, please restart your computer and attempt to scan. 
    This didn't answer your question or issue? Find more help at Contact Us.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • I am having problem adding internalFrame to a frame

    Hi,
    I am not able to see the internalframe in a frame but my main frame is showing up properly. I have added the internalframe to the desktop.
    can somebody help me out.
    code for the internalframe.
    public void createInternalFrame() { 
    // Use a suitable internal frame constructor.
    JInternalFrame iFrame = new JInternalFrame(
    "Calendar",
    true, // can be resized
    true, // can be closed
    true, // can be maximized
    false); // can be iconified
    // iFrame.setLocation(70, 80);
    iFrame.setSize(300, 200);
    iFrame.setVisible(true);
    desktop.add(iFrame);
    container.add(desktop); //container is the contentpane.
    iFrame.moveToFront();
    // desktop.setOpaque(true);
    iFrame.show();
    // iFrame.validate();
    System.out.println("button 2");
    try { 
    iFrame.setSelected(true);
    } catch (java.beans.PropertyVetoException ex) { 
    System.out.println(
    "Exception while selecting an internal frame");
    }

    The Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html]How to Use Internal Frames has working examples.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • I am having problems adding files to my external hard drive. Can anyone help me?

    I can't add files to my external hard drive from my computer. I keep getting a message saying that the hard drive can't be modified. I've added files to it before, I'm not sure why it's not working now. I looked at the hard drive information and it says that it is set to read only. Does anyone know how to change that or what I should do? Thanks.

    Odd, it seems.  In the Finder "Get Info" display, you are seeing something like this?
    Click the "Details" triangle and then the little padlock, and you should be able to change the permissions.  Click the lock when you are done and close the Info window.

  • Having Problem Adding to drag and drop to move furniture over a floor plan

    I have the code which follows. I need to create floor plans where web visitors can drag and drop furniture onto the floor plan.  I have  three items that work but when I convert any additional items to a symbol and select movie clip and then add more lines to the code, none will work.. How can the code determine that  my movie clip I named "couch" is going to movie clip 4.  Thank you if you can help, Frankie Foster
    Below is my code:
    var numObjects:uint = 3  // assign the total number of movieclips that will be dragged
    for(var i:uint=1; i<=numObjects; i++){
         this["movieClip_"+String(i)].addEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
         this["movieClip_"+String(i)].addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
    var selectedMC:MovieClip;
    movieClip_1.addEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
    movieClip_2.addEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
    movieClip_3.addEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
    movieClip_1.addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
    movieClip_2.addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
    movieClip_3.addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
    function clickToDrag(event:MouseEvent):void
         selectedMC = MovieClip(event.currentTarget);
         selectedMC.startDrag(); 
    function releaseToDrop(event:MouseEvent):void
         event.currentTarget.stopDrag();
    stage.addEventListener(KeyboardEvent.KEY_DOWN, nextQuestion);
    function nextQuestion(event:KeyboardEvent):void {
          //trace(event.keyCode);
          if(event.keyCode == Keyboard.RIGHT)
               selectedMC.rotation += 5;
          if(event.keyCode == Keyboard.LEFT)
               selectedMC.rotation -= 5;

    Your appear to have redundant coding assigning your listeners.  What code are you trying to add/modify to make the couch function like the others?
    this...
    for(var i:uint=1; i<=numObjects; i++){
         this["movieClip_"+String(i)].addEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
         this["movieClip_"+String(i)].addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
    currently does what this also does....
    movieClip_1.addEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
    movieClip_2.addEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
    movieClip_3.addEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
    movieClip_1.addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
    movieClip_2.addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
    movieClip_3.addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);

  • I am having problems with the sounds. Please help I am very worried about my iPad 2

    I tried restarting my iPad so the sounds would go normal but every time it goes to the homepage it's muted. When I receive a mail it's muted, when I am playing a couple of games it's sometimes muted and when I type it's muted. I checked the settings if it was muted but it was turned off. I imported my headphones and most of the apps I can hear but when I type It doesn't make the sounds. Any ideas to fix the sounds?

    Have you got notifications muted ? Only notifications (including games) get muted, so the Music/iPod and Videos apps, and headphones, still get sound.
    Depending on what you've got Settings > General > Use Side Switch To set to (mute or rotation lock), then you can mute notifications by the switch on the right hand side of the iPad, or via the taskbar : double-click the home button; slide from the left; and it's the icon far left; press home again to exit the taskbar. The function that isn't on the side switch is set via the taskbar instead : http://support.apple.com/kb/HT4085

  • I am having problems adding plug ins from Elements 11 to 12.

    When I go to preferences in 12, I check the box additional plugins.  I go out and find the folder and add it and click on OK, I close down Elements and then come back and my plug in is there.  Now I want to add another plug in and when I follow same scheme it eliminates the previous plug in that I added.  It is only allowing me one plug in.  What am I doing wrong?   thanks.

    You want to put all your plug-ins under the same parent folder, then point PSE to that parent folder.

  • I'm having problems adding friends! How do I do so?

    I wanted to add a gmail, and hotmail friend the other day,
    and I followed the instructions by pressing the + button, and adding a buddy.
    Then a pop up came telling me to add names etc, and then to add the account, giving me the option of adding either an AIM or .Mac account!
    How do I add gmail or hotmail accounts? There is no option there where it says I can do so!
    Help!
    PS.
    I have a MacBook, which I got about a month ago.

    You need to do the bits in these three Jabber Links http://www.ralphjohns.co.uk/page5.html#_jabber
    10:23 PM Monday; March 3, 2008

Maybe you are looking for

  • Backened documents are not getting updated in Classic Scenario

    Hi, We are using SRM 7.0 version and we are working on classic scenario where the shopping cart - RFX - Contract are created in SRM and the PO - GR - IR are created in ECC. The blackened documents which are created in ECC PO - GR and IR these documen

  • REG : Logic to define the default purchaser in Purchase org

    Hi SRM Gurus, Need your help and suggestion in one issue. In Standard system default Operational purchaser information responsible for processing shopping cart is not available. The requirement is to determine the Default Operational Purchaser, as in

  • Why does it take so long for FCPX to render video for the various Apple Devices?

    It took 12 hours from FCP X to share 1 hour of video for iPad. It took over an hour to share a 3 min. video from FCP X via the new Compressor for iPad. It takes appreciably less time if I choose the DVD option (which now gives an error message in FCP

  • 6.0 wont load, not sure how to get iTunes back :(

    Unfortunately, my iTunes was supposed to just update to 6.0, but it erased the old version, and I have no iTunes now at all, not sure if my music is still there either. How do I load an iTunes that works? Please help

  • Having problem with typing chinese in OS X Lion

    After installing OS X Lion, I am having problem with typing traditional chinese in my own account. Everytime I switch to traditional chinese the computer become extremely slow and the finally freezed. However, when I am using visitor account, I can t