Sound.stop() doesnt work

following a simple script:
var music:Sound = new music_sound();
music_sound.play();
stop_music.addEventListener(MouseEvent.CLICK, onClickStop);
function onClickStop(e:MouseEvent):void{
music_sound.stop();
the  music_sound is nested in frame one.
but when i test movie i get:
Scene 1, Layer 'meitarim', Frame 1, Line 12
1061: Call to a possibly undefined method stop through a reference with static type Class.
Scene 1, Layer 'meitarim', Frame 1, Line 7
1061: Call to a possibly undefined method play through a reference with static type Class.
why?
thanks in advance
ehud

If you look up the Sound class you will see it does not have a stop() method.  To stop a sound you need to assign a SoundChannel to it and use that to stop it.  Your second error appears to be because you are trying to apply a method to a class, not the instance of it..
var sc:SoundChannel;
var music:Sound = new music_sound();
sc = music.play();
stop_music.addEventListener(MouseEvent.CLICK, onClickStop);
function onClickStop(e:MouseEvent):void{
sc.stop();

Similar Messages

  • My analogue 5.1 Sound System doesnt work on Soundblaster live 24-bit soundcard

    <SPAN>Hello!<SPAN>
    <SPAN>I have a Wavemaster<SPAN>MX-5 5. Surround Sound System with Subwoofer (=<SPAN><SPAN>http://www.hms-media.de/EN/?Tab=Products&Group=3&Product=7<SPAN>) and it doesnt work on the Soundblaster li've 24 bit.<SPAN>
    <SPAN>I have installed all the drivers properly and the card seems to be working ok.... <SPAN>
    <SPAN>But i have a <SPAN>analogue<SPAN> Surround Sound System what must i do to get this working?<SPAN>
    <SPAN>Is it possible to add a converter that can transform; digital to analogue signal? Or can i change some settings >?<SPAN>
    <SPAN>Plzzzzz Help me !!! I love my music :smileyindifferent:<SPAN>
    <SPAN>Greetz Axz:.<SPAN>

    > i have surround sound only when i play *.acc files but with *.mp3 files it doesnt work
    You'll have to enable surround matrix decoding for stereo material. There are several analog encoding standards (Dolby Surround, Dolby ProLogic, Dolby ProLogic II) but Creative's driver doesn't have an official decoder for any of them Instead, they provide their home-grown decoders and call them CMSS or DTS NEO:6. I can only assume they want to dodge Dolby's license payments by not supporting familiar standards. Anyway, you will find the CMSS modes in the driver or, in case of NEO, in their mediasource player. NEO - because it's in a player and not in the driver - is out of reach for other players such as WinAmp or multimedia and TV software.
    If you plan to listen to music only, the Creative CMSS matrix decoders ("upmix") might satisfy you. If you plan to watch movies or watch TV, you will find that, with exception of DTS NEO:6, they are not good at all. A ProLogic II decoder sounds much better. If you are lucky, your player has a software ProLogic decoder. For example, WinDVD has one. Unfortunately, in that case the soundcard's high tech DSP - which you payed $$$ for - will not be used at all.
    An alternati've solution for non-gamers (for movies and music) is to install the kx driver from the kx project at http://kxproject.lugosoft.com/index.php?language=en
    For music, this driver - strangely enough - not only sounds better than Creative's own player, it is also far more configurable. For example, if your center speaker is from a differerent brand than the main speakers, you can put an equalizer before it. Or you can redirect bass from small speakers to larger speakers and not just to the subwoofer, as is the case with Creative's drivers. The options are endless. You can even create totally different configurations for different situations (movie/music/...) and switch on the fly. Other benefits: the driver is very small and very fast, everything happens instantly. However, its user interface is weird and the project lacks documentation. You will need determination on the first day. Afterwards, you will be able to configure your music/movie system to sound far better than with Creative's driver and customize details that simply can not be customized with the official driver. And the best thing: everything will run inside the card's DSP and the computer's CPU is free to do other stuff. Btw, the link above leads you to the last official release. If you read their forum, you will find a more recent beta release from this year.Message Edited by mirko on 0-2-2005 0:22 PM

  • HP Pavilion dm4-2070us Sound stop when put the headphone jack

    Hi
    When I remove or put the headphones jack, the sound stops to work in the speakers and in the headphones. To turn it back, I have to close the player(music, video or sound streamer from the web site) and start it again, but if the headphones is pluged in it works very well, if I remove the jack stop again, it happens in reverse case.
    Could you please tell me the solution for this problem?
    Notebook info
    IDT High Definition Audio CODEC
    Genuine Windows 7 Home Premium 64-Bit  SP1
    Intel(R) Core(TM) i5-2410M
    6GB system memory
    Thanks
    Roberto
    This question was solved.
    View Solution.

    I had the same problem with dm4-2070us and I just finished chatting with HP customer service. The representative asked me to do few things including setting the BIOS to default. I also reinstalled the driver. NOTHING WROKED.
    He told me to do a  complete revovery of the system to factory reset. I didn't want to go that route.
    What I did is downloaded the older driver for dm4-1162us and installed on my dm4-2070 and it fixed the problem. Now the only thing I'm missing is the Dolby sound, about which I don't care that much.
    Hope this help you also.
    Conclusion: It's a software problem. May HP come uo with a new driver to fix it, SOON.
    Thanks.

  • X220i: sound doesn't work when camera is activated

    Hi all,
    I've a weird problem: my sound works well when I'm listening music, video, etc. whith the speakers or an headphone.
    But when I activate the camera (for Skype or Google Hangout), the sound stops to work (while the video image works well).
    When I try to manage the sound (by making the sound test during a videoconference), I got this error message (sorry, it's in French, it means "Impossible to read the test tone"):
    Do you have any idea where the problem comes from?
    Thanks in advance.

    Hi, djiwai91
    If you haven't already, I would recommend trying to update all your drivers and your BIOS to see if that helps. All updates for your system can be found here. After downloading and installing them, test the camera again and see if there are any changes.
    Best of luck,
    Adam
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution!" This will help the rest of the community with similar issues identify the verified solution and benefit from it.

  • Equium A100: Sound driver not working under WinXP

    Hi, when I bought my laptop I had Vista installed on it , I installed win XP but I didn't have any drivers, but I downloaded Toshiba tools & utilities CD wich have all drivers for my lapop, everything works okay only realtek sound driver doesnt work properly when I restart my pc error appears, I made screenshot of it it maybe u can help me with that problem.
    Heres the link to see srceenshot: http://rstheclan.googlepages.com/error.JPG

    Have you installed the two KBs (knowledge bases) from Microsoft before running sound driver setup?
    You could try and download the sound drivers manually and give it a reinstall. Besides this error message, does sound play in Windows?
    Need drivers you can find there: http://eu.computers.toshiba-europe.com (Support & Downloads)
    One more question. What Service Pack do you use? Still SP2 or the all brand new SP3? With the last one, there are sometimes issues with realtek sound drivers.

  • After Service Pack 2 update sound stopped working

    Recently started again with my Satellite laptop. All was good and everything worked perfectly until i download Service pack 2. Ever since doing that the audio has stopped working.
    I'm a bit novice but have tried the following:
    I uninstalled the driver and downloaded the appropriate drivers from the Realtek website. reinstalled but still get the same problem. no error messages but just "Driver is enabled but has not been started" in the properties screen for the sound and device properties.
    Can anyone offer a solution?

    Hi
    Youre right. I have read that on some notebooks the sound doesnt work after XP SP2 installation.
    But the update instillation should help.
    Could you please post you notebook name?
    At this page you will find a list of Windows XP Service Pack 2 supported models:
    http://support.toshiba-tro.de/kb0/FAQ5300V6000DR01.htm

  • Yogurt spilled on my macbook air and now sounds stopped working. Pls help

    Hi!
    So mac and yogurt were inside my bag and the yogurt's lid accidentally opened getting into my mac's charger, usb and headphones port. I tried turning it on and everything seemed fine, sounds and the heaphone port were both working but the usb port wasn't so i just wiped away the yogurt. After wiping everything I could see off, i tried connecting my mac to the power and it's working. Usb port not working tho and the sound stopped working, tried connecting a headset and still not working. Those seem to be the only problems. Right now my mac's open and standing to it's side near the heater to dry. What should I do? :(

    Right now my mac's open and standing to it's side near the heater to dry.
    Yes, everyone tries the "dry it out" method, doesnt work,... when it does 'work' it works for a while until corrosion sets in.   Make a service call.
    Liquid spills, why your MacBook chassis is a one-way valve for spills
    After a substantial spill many people will turn their notebook upside down and shake it, not only does this not work, but it spreads liquid havoc throughout your machine and makes things often as bad as possible.
    The keyboard itself acts like a one way valve in the case of a substantial liquid spill. While liquid pours into the bottom chassis easy, it does not come out easily at all, and in the case of any spill, most of it will not come out by turning it upside down. Disconnect all power and contact Apple for diagnostics and repair.
    Do not attempt to, after a spill, ‘dry out your MacBook’ and test it
    After a spill most people invariably try to “dry out” their notebook by various methods, including hair dryers and otherwise. This both does not work, and after a substantial spill of any magnitude, even if the liquid was water, residue is left behind.
    There are additionally many very tight places inside your notebook where liquids will linger for a very long time, and cause corrosion or worse.
    Immediately unplug your notebook and contact Apple for in shop diagnostics and parts replacement.
    In the case of very minor spills people will “dry out” their notebook and feel success that their notebook is working ok, however invariably in nearly all instances after 4-14 days an error / fault pops up and is usually followed by more.
    In case of a spill, damage estimates are impossible,.....anything can be fixed, without question.......the question is cost.
    contact Apple for in shop diagnostics and cost estimation ....possible parts replacement.  

  • I am locked out of my computer (macbook air) I just got it back from the apple store and they reset it. I put in a new password, and now it doesnt let me log in anymore. Command R doesnt work, all i hear is a sound, but nothing happens.

    I just got it back from the apple store and they reset it (becuase it kept shutting down and not turning back on).
    I put in a new password because i needed to start over from factory settings, but now it doesnt let me log in anymore. (I don't know if this is because it doesnt accpet my password, or I forgot my password in less than 5 minutes, or because when i typed in my new password, i typed it in wrong twice)
    Command R doesnt work, all i hear is a sound, but nothing happens.

    What I don't understand is why it is rejecting a password I am creating.
    Perhaps the password you are creating is too short, or has characters that are not allowed, or is not secure enough because it is a word in a dictionary.
    FileVault may have standards for what it considers an acceptable password. If the password is part of the 128-bit encryption scheme, it might have to be 16 characters, for example. (Don't know if that is true, but it's a possibility.) Check your documentation for password requirements.

  • Regarding Facetime on my Ipad. I get started on a call and after 10 or 15 minutes I cannot hear whom I am talking to. They can still hear me and I still have picture on the screen but my sound stops working.

    Regarding Facetime on my Ipad. I get started on a call and after 10 or 15 minutes I cannot hear whom I am talking to. They can still hear me and I still have picture on the screen but my sound stops working.

    Why can't we use Acrobat Pro for mobile devices? Save a whole lot of headaches!!! Now I have to return this subscription.

  • The sound on my macbook air doesnt work anymore and im unsure why, someone said its a problem with the macbook air. anyone know how to fix it or how much it will cost for apple to fix it??

    from what i have heard this is a common problem. at first my sound occassionally didnt work but now the sound icon in my tool bar at top of screen has gone and there are no settings to get it back. my sound has completely stopped working
    please help
    i need to know what the problem is and if it is able to be fixed, and also how much the repair would cost or if apple would do it even if laptop is out of warranty ??
    thanks

    monique13 wrote:
    from what i have heard this is a common problem. at first my sound occassionally didnt work but now the sound icon in my tool bar at top of screen has gone and there are no settings to get it back. my sound has completely stopped working
    please help
    i need to know what the problem is and if it is able to be fixed, and also how much the repair would cost or if apple would do it even if laptop is out of warranty ??
    thanks
    What generation MacBook Air? You might start here:
    https://discussions.apple.com/thread/1736638?start=0&tstart=0
    Apple will fix it. No pricing without making an appointment with the Genius Bar at the Apple Store. Usually an Authorized Apple Repair Store can do it with a faster turn around time and less expensive pricing.

  • I start running a java program and when i switch users the sound doesnt work

    When I start running a java program or leave a game running and i switch users the sound doesnt work. I have been searching around the web and nobody seems to have an answer. This just recently started to happen. Please if anyone has any ideas that would be much appreciated and the problem is my computer its almost brand new. And my computer is completely up to date.

    Sony Mobile team has a separate community which can be found here.
    If my post answers your question, please click on "Accept as Solution"

  • My sound stopped working on my HP dv6-1280us

    Its only a couple of months old but my sound stopped working.  I don't know much about laptops but here is what I do know.
    It stopped working around 10 days ago.  At first there was no sound but I could move the volume up and down with the quicklaunch pad and the mute button would go from red to blue when touched.  I checked to make sure nothing was muted and everything seemed to be fine.
    I googled the problem and it said to do a system restoration back before it stopped working.  I tried several times and it went through the process but then when it rebooted it said that it didn't work and that none of the settings have worked.
    Then a couple of hours ago I noticed the mute button is now red and won't change to blue the volume slider is not responding to touch either.
    Then I saw a post on here that said to go to system recovery and reinstall the sound drived (IDT High Definition CODEC) and I did and it said it did but it didn't fix the problem.
    I am lost and would love some help if anyone has any ideas?  please?
    Thanks
    Amy
    This question was solved.
    View Solution.

    I got some help from a friend and her advice worked.  I thought I would post this for others having trouble
    Well I guess you could try this it would not hurt. Assuming you use Windows that is.
    Go to run and type services.msc when the box pops up scroll down to Windows Audio and double click. Make sure that the service is started.

  • Itunes sound stops working after 20 mins on videos bought from iTunes store.

    On every video i've bought from the iTunes store the sound cuts out after approx 20 mins. I'm on windows 8.0 (completely up-to-date with all drivers up-to-date too) with the latest iTunes (11.1.3.8) and Quicktime (with enhancements switched off). PC is a quad core i7 with 16GB of memory with windows running on an SSD and my iTunes content on another internal HD (not an SSD). iTunes library is approx 24000 songs and 30 videos. i'm watching on a full HD monitor with external speakers and the PC is authorised to play iTunes content.
    I've worked my way through all the iTunes support items around video chopping (which was happening too - now fixed) and audio issues but nothing helps e.g. I've switched off iTunes match and home sharing, switched off any audio enhancements in iTunes and my sound card (which is a Via chipset on my motherboard), switched the bit rate to 16 bit/44.1k on windows and itunes, uninstalled and re-installed iTunes etc, etc.
    I did have an Apple TV on my network but I've disconnected it in case the sound was being routed to it after a period of time. This hasn't made any difference.
    Has anyone had this issue and managed to fix it?
    Thanks

    Myself as well, have been having this same problem, around 20 minutes into any movie I open up in my itunes library, the sound stops playing.   I have yet to find any fix for the problem, although I have a thought that it is probably something to do with the buffering.  My songs play just fine, all day long, but any movie only plays for 20 minutes and then the sound goes out.   Additionally, I had another issue that kept popping up an error message everytime I tried to open Itunes, this was finally fixed via copy paste a corruptted (spelling) .dll file.  The only "workaround" for this issue, that I have found, is to open the movie in QuickTime, even though I am not really excited about the QuickTime player.  If anyone finds a better solution, please drop a line. thank you in advance.

  • I just got a new macbook pro (my other one stopped working). I am trying to sync the music on my iphone to my new mac's itunes library. I've clicked sync in iTunes but it doesnt work. how can i do this?

    I just got a new macbook pro (my other one stopped working). I am trying to sync the music on my iphone to my new mac's itunes library. I've clicked sync in iTunes but it doesnt work. how can i do this? I don't want it to delete everything from my phone or old computer.

    hstarkeyy wrote:
    I don't want it to delete everything from my phone or old computer.
    You don't need to delete anything from your phone or you old computer.
    Copy the entire /Music/iTunes/ folder from old computer or backup to /Music/ on new computer.
    If you cannot use the old computer or don't have a backup...
    -> Recovering your iTunes library from your iPod or iOS device
    Then immediately make a backup of your new computer.
    Get an external drive and plug it in and use -> Time Machine

  • MiniDP to HDMI: Sound stopped working

    Hi everyone,
    I have a Macbook Pro and a Mini Display Port to HDMI cable and the sound output just stopped working. I used it last night and it worked perfectly. Now it recognizes that it's connected to my TV, and the display is fine, but when I go to System Prefs > Sound > Output and choose the TV, nothing happens (the sounds stops on my laptop, but nothing comes out from the TV). I've tried it with two different TVs (and I've used it with both of them multiple times before), but nothing worked. I'm planning to try it out with a friend's Macbook Pro to see if there's any difference, but in the meantime, any ideas?

    I have found a workaround. I seems like if I unplugg the headphone jack, which is normally connected to my stereo, I can select HDMI as sound output in system preferences. It really makes no sense, I hope they fix this in the next release.
    /Johan

Maybe you are looking for

  • Prompted to sing in iCloud and iMessages every time i turn on Mac Book Pro

    In the last few weeks, every time I turn on my Mac Book Pro, I get a pop up asking me to sign into iCloud and I messages. After doing so, I go to my Messages-Preferences and Accounts to ensure my iMessages is active and it is not so I have to re-ente

  • PO not displaying in VL10B

    Hi, We make a Stock Transfer Purchase Order of Non-Valuated Material. But when are going for making Delivery for it through VL10B, it is not displaying there. Please tell me why not displaying there. Regards..

  • TextFields / labels in Applet...Urgent help needed please!!

    I have been trying for days to add labels and textFields to my applet and can only manage to display one. My assignment instructions suggest I use makeTextField method and call the setEditable method from the makeTextField method to avoid repetition

  • A chart in Numbers causing crashes

    A chart in Numbers is causing Numbers to slow down & stutter when it is seleced or edited.  The memory is eventually depleted and Numbers crashes.  I'm using Numbers 2008 1.0.3.  This chart is pulling info from formulas in a large table.  That table

  • How do I convert a PDF fo InDesign CC 2014?

    I see that I can export to Microsoft programs or .rtf but I do not see anywhere to convert to InDesign. Thanks