HELP! Uploading AS3 Game to server, no sound and Spacebar doesn´t work HELP!

Hello, relatively new to AS3 and flash, this is the first time i am publishing anything. We are trying to upload our simple flashgame to our webserver, the game works perfectly fine locally save for one thing. We get an error regarding TLF which says it wont stream or something. So when it gets online, no sounds play and spacebar doesn't work, left and right arrow does work. We have three TLF text fields that are used to update score, lives and show you final score. If i turn these into classical text they stop working.
Things we have tried: Changing default linkage from RLS to Merged into code, changing the text boxes to classical text(they then stop working), made sure the paths are correct(all files are in the same directory including the .swz file)
This is the code from the soundclass:
package 
    import flash.net.URLRequest;
    import flash.media.Sound;
    import flash.media.SoundChannel;
    import flash.events.*;
    public class MySound
        private var bgSound:Sound;
        private var fireSound:Sound;
        private var waterSound:Sound;
        private var earthSound:Sound;
        private var lightSound:Sound;
        private var soundChannel:SoundChannel;
        public function MySound()
            soundChannel = new SoundChannel();
            bgSound = new Sound();
            var req:URLRequest = new URLRequest("BackgroundSound.mp3");
            bgSound.load(req);
            //fire
            fireSound = new Sound();
            var req2:URLRequest = new URLRequest("soundFire.mp3");
            fireSound.load(req2);
            // water
            waterSound = new Sound();
            var req3:URLRequest = new URLRequest("soundWater.mp3");
            waterSound.load(req3);
            // earth
            earthSound = new Sound();
            var req4:URLRequest = new URLRequest("soundEarth.mp3");
            earthSound.load(req4);
            // light
            lightSound = new Sound();
            var req5:URLRequest = new URLRequest("soundLight.mp3");
            lightSound.load(req5);
        public function playBgSound()
            soundChannel = bgSound.play(0, 999999);
        public function stopBgSound()
            soundChannel.stop();
        public function playFireSound()
            fireSound.play();
        public function playWaterSound()
            waterSound.play();
        public function playEarthSound()
            earthSound.play();
        public function playLightSound()
            lightSound.play();
I can somewhat get that sound can bugg out, but why does spacebar stop functioning? ANy help is greatly appreciated as this has to be delivered in twelve hours(published online) for a school assignment.

Also might add publishing it locally in my own browser everything works, as does ofcourse playing it in flash itself. Changing from RLS to merged into code stops the error from coming, but doesn´t fix the problem on the server.
Code from main class related to sound and spacebar:
import flash.display.*;
    import flash.events.*;
    import flash.ui.Keyboard;
    import flash.text.TextField;
    import flash.media.Sound;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    public class main extends MovieClip
        private var fireTimer:Timer; //delay between shots
        private var canFire:Boolean = true;
        private var mySound:MySound;
        private var bulletSpeed:Number = -450;
          public function main()
            //load sounds
            mySound = new MySound();
        private function playGame(event:MouseEvent)
            gotoAndStop(2);
            // initialize
            myLives = 5;
            myHitsNo = 0;
            weaponType = 1;
            mybullets = new Array();
            enemys = new Array();       
            myScoreTxt.text = "Score: " + myHitsNo;
            myLivesTxt.text = "Lives: " + myLives;   
            fireTimer = new Timer(400, 1);
            fireTimer.addEventListener(TimerEvent.TIMER, shootTimerHandler, false, 0, true);
            stage.addEventListener(KeyboardEvent.KEY_DOWN, listenKeyDown);
            stage.addEventListener(Event.ENTER_FRAME, addEnemy);
            stage.addEventListener(Event.ENTER_FRAME, checkCollision);   
            player = new thePlayer(stage.stageWidth-40, spawnPoint2);// stage.stageHeight/2);
            stage.focus = player;
            addChild(player);
            mySound.playBgSound();
public function listenKeyDown(event:KeyboardEvent)  // Controls and weapontype selector
            if (event.keyCode == 37) //left
                player.movethePlayerDown();
            if (event.keyCode == 39) //right
                player.movethePlayerUp();
if (event.keyCode == Keyboard.SPACE) //space
                shootBullet();
                //soundFX.attachSound("Pistol Fire.wav");
                //soundFX.start();

Similar Messages

  • Macbook Pro Retina Display - Sound and video doesn't work at the same time.

    I just bought a macbook pro retina display and tried to watch a movie by connecting my macbook pro via hdmi to my home theater receiver (Onkyo TX-SR309) and into my HDTV (Sony Bravia 42"). My problem is, i don't get sound from the speakers connected to the receiver.
    When i disconnect the HDTV from the receiver (only the receiver is connected to the macbook pro), then sounds will comes out from the speaker.
    Can somebody help me to fix this problem?

    With the HDMI connected and the Onkyo powered on, open system preferences, go to the sound panel, and select the HDMI choice.
    Frank

  • I bought a $15 app GTA Vice City a while ago and I just started using it and it doesn't work. I checked all the requirements and my laptop meets all of them. I also have contacted Rockstar Games and they didn't help. Can I get my money back? Its annoying.

    I bought a $15 app GTA Vice City a while ago and I just started using it and it doesn't work. I checked all the requirements and my laptop meets all of them. I also have contacted Rockstar Games and they didn't help. Can I get my money back? Its frustruating.

    Hi...
    Apple's policy states that, "all sales are final" >  iTUNES STORE - MAC APP STORE - TERMS AND CONDITIONS
    But since you are not getting any help from the developer, you can use the email form to contact Apple and ask for a refund >  Apple - Support - Mac App Store - Contact Support.
    No guarantees.

  • My sounds and audio is not working. it's not in mute. help please

    i need help. my sounds and audio is not working. but it's not in mute button.

    Hi,
    Can you post back with the following details.
    1.  The full Model No. and Product No. of your notebook - see Here for a guide on locating this information.
    2.  The full version of the operating system you are using ( ie Windows 7 64bit ).
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • I Pod Touch Music player stopped working but Sounds and iTunes samples still work?? Help.

    Howdy. My Music player has stopped working, but regular sounds and iTunes samples still work?? Can anyone help.
    Push the orange music button and the player opens, but when I push the play button nothing happens other than the pause icon comes up.
    Both side volume and the onscreen volume read at full.

    -restore ipod to latest ios if problems still happenes then it's a hardware problem nothing like a good old appointment at genuis bar would help.

  • My Mac Pro is not displaying any images for videos or games, it is showing sound and working but nothing else. DVD player is also coming up with an error.

    My Mac Pro is not displaying any images for videos or games, it is showing sound and working but nothing else. DVD player is also coming up with an error. I'm not sure why neither is working, it just suddenly happened. I have done nothing different.

    Lao Bo,
    yes, you can locate and copy a file from your HD to a USB key using UNIX commands. If you know the exact name of the file which you’re trying to locate, try this:
    find / -iname filename -print
    This command will search your entire internal disk for the particular filename. If you know that it’s within a particular user account, then you can save search time with this variation:
    find /Users/username -iname filename -print
    Either variation of this command will print all files found which have the given filename. Presuming that you’re able to identify the correct file, you can copy it to a USB key using the command
    cp -p filename_returned_by_find /Volumes/USB_volume
    If you’re not sure which volume name your USB key has, this command will show you what the possibilities are:
    ls /Volumes
    Please let me know if you have any trouble with these commands.

  • Sound by .MTS doesn't work

    Hi! I don't have experiences with Premiere Pro. I have .MTS file and after import to Premiere, sound doesn't work. When I import .mp4, sound is OK. Is problem in my computer or is common thing that sound in .MTS doesn't work? Thanks for answers.

    I get no audio at all.  I initially copied all files from my camcorder to my drive and tried to import. No sound. Tried to import directly from camcorder - doesn't see it as a drive. Imported files to another location on drive from the camcorder software, still doesn't work.  Tried in elements - works fine.  Came here to forum...tried all these ideas - imported through media browser, bridge...I don't get it.  Even tried to output the file in Elements as an .mpg an import into Pro - it gives me a decompression error.  I have many other video I have been able to open in pro with sound - I just don't understand what I am doing wrong.  I even downloaded the suggested codec on one of your above threads, but I admit I don't know how I'm supposed to use it.  I really need to edit this video in Pro and I'm at a loss.  Thanks for your help thus far

  • When opening the project at a new computer, the sound and picture doesn´t match

    We are editing a documentary and when we open the project at a new computer the sound and clip doesn't match. We have noticed that the problem is that if we have a clip named 0001 on one SD card, it takes the sound from another SD card where the clip also is named 0001. Since we are working with a lot of material and this has happened on almost every one of them, its a huge problem, since we got no time to reimport and redo every clip. Thankful for your help.

    Try batch renaming some of the files.

  • Sound and cam can't work in this old lenovo note book computer model 3000 N100

    Fatory said support window XP and vista ,I allow mircosoft test vista and  window 7 ,everythink can work, but now I install window 7 only ,sound and cam des't work, .I don't know why?How can my notebook sound and cam can work?

    what?
    you are asking about issues in windows on a lanovo laptop in the appletv forum on apples support site?
    is that not a bit like asking for support for a boing 737 on philips discwaster forum ?

  • Hi, I am wondering why my iphone won't send pictures through messages, I have MMS on and I have tried sending it with 3G on aswell and still doesn't work. Someone please help me :)

    Hi, I am wondering why my iphone won't send pictures through messages, I have MMS on and I have tried sending it with 3G on aswell and still doesn't work. Someone please help me :)

    Hey lozza567,
    Thanks for the question. I understand that you are experiencing issues sending MMS messages. The following resource may provide a solution:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Issues with sending and receiving MMS
    You will need these to send and receive MMS:
    - An iPhone 3G or later.
    - iOS 3.1 or later.
    - A cellular data connection. MMS isn't available if you are using only Wi-Fi.
    - A domestic MMS plan from your cellular provider. You may need an international messaging plan to send MMS to an international contact. Contact your carrier for more information.
    - A roaming MMS when using a cellular provider's network different from your billing cellular provider's network. Learn more about roaming and contact your carrier for more information.
    To resolve issues with sending and receiving MMS, follow these steps first
    1. Go to Settings and turn airplane mode off.
    2. Go to Settings > Messages and turn MMS Messaging on.
    3. Go to Settings > Cellular and turn Cellular Data on.
    4. Go to Settings > Cellular and turn Data Roaming on if you are roaming on a cellular provider network different from your billing provider's network.
    5. Verify that you have a cellular data connection in the status bar at the top left of your iPhone.
    6. Go to Settings and turn Wi-Fi off. Open Safari and navigate to www.apple.com to verify that you have a data connection. Turn Wi-Fi back on to continue using Wi-Fi for other features. If your cellular data connection isn't available, follow these steps.
    7. Verify that you can send and receive SMS. If you are unable to send and receive SMS, see the "Issues with sending and receiving SMS" section, above.
    8. MMS may not be available while on a call. Only 3G and faster GSM networks support simultaneous data and voice calls. Learn more about which network your phone supports.
    9. Restart your iPhone.
    10. Tap Settings > General > Reset > Reset Network Settings on your iPhone.
    11. Reseat your SIM card.
    If you are still unable to send or receive MMS, follow these steps
    1. Make sure that the contact trying to message you isn't blocked in Settings > Messages > Blocked.
    2. Go to Settings > Messages and turn on group messaging if you are sending a group message.
    3. Make sure that you are using the area code with the contact's phone number. When sending messages internationally, you also need the contact's international code.
    4. Verify a "Pay as you go" MMS plan has enough available balance. Contact your carrier if unsure of your MMS plan or available balance.
    5. If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    6. If the issue occurs with a specific contact or contacts, delete and re-create the contact from the Contacts application. Create a new message to the newly created contact and try again.
    7. Back up and restore your iPhone as new.
    8. If your carrier has recently ported your phone number, the porting process may not be complete. Contact your carrier to confirm that the porting process is complete.
    9. Contact your carrier to verify that you are provisioned to send SMS and are in an area with cellular coverage.
    10. Contact your carrier to verify that there are no blocks or filters placed on your wireless account preventing you from sending SMS.
    11. Your carrier may require APN settings to be modified to use MMS. Learn more about when you should adjust APN settings.
    Thanks,
    Matt M.

  • My screensaver seems to be freezing and I can't access Safari. I've tried restarting/shutting down and that doesn't work. Any ideas to help?

    My screensaver seems to be freezing and I can't access Safari. I've tried restarting/shutting down and that doesn't work. Any ideas to help?

    Which OS X is installed on your Mac ?
    Click the Apple () menu top left in your screen. From the drop down menu click About This Mac. The version is noted there.
    Troubleshooting advice can depend on that information.

  • Updated iTunes to 10.5, iTunes won't work now! Everytime I open iTunes it just freezes and I can't click on anything. It says to take it out of compatibility mode and still doesn't work! any help??

    Updated iTunes to 10.5, iTunes won't work now! Everytime I open iTunes it just freezes and I can't click on anything. It says to take it out of compatibility mode and still doesn't work! any help??
    Thank you. Nick

    Okay, we'll try the technique from the following post. Be sure to be logged in to your usual user account when doing so. (Otherwise you'll be editing the wrong set of HKEY_CURRENT_USER keys.)
    Re: How do I turn off the compatibility mode for ITunes.
    Does that clear up the compatibility message?

  • Can anyone help me display the calendar list using an iphone4 wit iso 7.1.1?  I have already tried tapping the magnifying glass and that doesn't work.

    Can anyone help me display the calendar list using an iphone4 with iso 7.1.1?  I have already tried tapping the magnifying glass and that doesn't work.

    That icon allows for the calendar month to display with the appts for that month below.  I want to see only the list of appointments without the month displaying.  I use to be able to get that display but since the last update tapping the magnifiying glass doesn't work.

  • My Ipod Froze And It Froze On Pandora And I Can Hear Pandora But I Click The Home Button And It Doesn't Work? Help Me

    My Ipod Froze And It Froze On Pandora And I Can Hear Pandora But I Click The Home Button And It Doesn't Work? Help Me

    Try this:
    1. Close all apps in the Task Bar. Double-click the Home button and hold apps down for a second or two. Tap the minus sign to close app.
    2. Hold the Sleep and Home button down until you see the Apple Logo.

  • The inbox for Mac Mail lists every incoming message twice. When I delete a message it deleted both entries. I have tried the solution in "help" and it doesn't work. Any suggestions?

    The inbox for Mac Mail lists every incoming message twice. When I delete a message it deleted both entries. I have tried the solution in "help" and it doesn't work. Any suggestions?

    I am wondering if anyone is seeing my question? This is my first time and I am not sure if I am communicating correctly. If you are seeing the question above regading deleted messages reappearing please reply so I will at least know I am getting the message out.
    Thank you.

Maybe you are looking for