Play sound the first time only

Hello
I have an As3 simple game with navigation buttons. It starts off with short intro with sound. When the game loads and the player dies it goes to retry screen with button which when is pressed goes back to the game. The problem is that when that happens flash plays the music from the short intro when returning to the game. How Do I stop this from happening. Currently I have no code for the sound. I just added the music directly to the frame with the intro and that's it. So what code do I write for the sound to execute only once?   

Either stretch the music layer out to the entire main timeline and configure that layer to loop only 1 time (thus returning to frame 1 doesn't "change a keyframe"), do not return back to frame 1, or use code to play the sound. If the latter is the choice then there is no shortage of examples of how to play:
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d21.html

Similar Messages

  • Render output has no sound the first time

    So this has been happening more and more frequently lately. It started about a week ago. I'm using AE CS5.5 on a WIndows 7 AMD comp. The first time I render out my project it renders without sound. However if I duplicate the render in the queue without changing any settings, it includes the audio just fine. I'm using the same settings I have been for all my projects for the last 3 months. Quicktime h264 max quality. I always make sure that audio output is checked.
    Also, sometimes I get a black frame at the end of the video file that isn't in the composition. So sometimes I have sound but an annoying black frame, and sometimes I don't have the black frame but I don't have sound either. I am changing NOTHING between each of these renders.
    I have a sneaking suspecion that this may be a hardware issue, but can't be sure.

    Could be simple media cache issues. Purge the caches and see if it makes a difference.
    Mylenium

  • I have Apple O/S 10.6.7 and Firefox 4 and when I play a homemade slideshow/movie from my webgallery it plays correctly the first time, and then play upside down after that, unless I shut down Firefox and then restart it...why?

    I discovered this incompatibility (?) with the help of a Sr. Advisor from Apple. I have uninstalled Firefox and the plist and reinstalled it and the same thing happened. Is there something that I can to do circumvent this problem?

    I discovered this incompatibility (?) with the help of a Sr. Advisor from Apple. I have uninstalled Firefox and the plist and reinstalled it and the same thing happened. Is there something that I can to do circumvent this problem?

  • AutoPlay Only Works the First Time

    Our customer is getting a little annoyed by something happening with their CP4 outputs, and I'm not sure if it's "normal" or something's wrong.
    The .swf/html plays fine the first time through.  However, if a user re-accesses and launches the file again, it plays the first slide, and then jumps to the end.  We've checked our navigation and it seems to be fine (go to next slide). We removed the status flags, thinking there was some sort of cookie being set that identified this module as already been played by the user.  The problem happens whether it's being served up from a web server or played on a local machine.
    I'm taking a big hit on this.  And I don't know where else to look.
    I have to fix this..any suggestions?
    Thanks heaps.

    Hi there
    My guess is that you need to click Project > Table of Contents. Then click Settings... and ensure the Self Paced Learning option is cleared.
    If you find the option is already cleared, you might then investigate the Flash Player version.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Permissions issue only the FIRST time I try to overwrite a file.

    I've a standard user account and I've found overwriting protected files is bugged in Leopard.
    As an example: every time I'm upgrading Camino web browser with the latest nightly build (by dragging the new version from it's disk image, and into the Applications folder) I get a permissions issue the first time only. As usual I am warned I will need to authenticate, then I am warned I will be replacing a file, then the first time only I get told I do not have sufficient privileges on one or more items to continue. The second time I try I am allowed to progress to the authentication window where I enter my admin username and password and the operation completes.
    The same thing happens with other files I'm trying to overwrite that are located in protected folders (I just use Camino as an example because it is a daily occurrence). But it ONLY happens the first time.
    This has persisted through three erases of my brand new iMac's HD and clean installations of Leopard. I have of course run Disk Utility multiple times to repair the HD (no errors found) and repair permissions (just the usual ACL errors every Leopard user faces).

    Hi,
    What's the error message did you get? It would be better to provide a screenshot for your problem.
    Generally speaking, this problem can be caused by third party adds-on of IE. You can try to start IE with no adds-on mode for test.
    Open run, type iexplore -extoff, pess
    Enter.
    If it works properly, please chck which plugin enabled in your browser, try to disable them for test.
    In addition, this can also be caused by IE settings, try to reset IE for test.
    Roger Lu
    TechNet Community Support

  • Wait cursor appears only the first time... unless I don't move the mouse!

    Ah yes, another cursor problem:
    I am setting a wait cursor in my main JFrame when a key-release or a menu item click is detected (the time-consuming action is then triggered in a child JInternalFrame), and so far, it's been working great.
    Then I noticed that the wait cursor only appears the first time the time-consuming action is called (or more precisely, if I never move the mouse, it happens every time as it should, but if I move the mouse, it only happens the first time! Ah, and I noticed I CAN move the mouse but ONLY when it is in the form of the wait cursor!).
    Strangely, I can see the cursor blink briefly when the action is done, precisely when it should be changing back to the default cursor... what gives? If I close the child internal frame and re-open it, I can get the wait cursor again the first time only (again, unless I keep the mouse still, in which case it works great - argh).
    Any ideas would be deeply appreciated!
    Cheers!
    PS - Here's a snippet of how we set the cursor, this is code in our main JFrame, called via either a keypress event or clicking on a menu item - mostly it's stuff that is unrelated, and we simply set the wait cursor as the very first line, so why in the world would it skip that line???? (the rest of the lines do in fact get executed):
    private void refreshMenuItemActionPerformed(java.awt.event.ActionEvent evt) {     doRefreshMenuItemAction(); }
    private void doRefreshMenuItemAction() {
    this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
    JDesktopPane desktop = (JDesktopPane)this.getContentPane().getComponent(0);
    JInternalFrame activeFrame = desktop.getSelectedFrame();
    try {
    if ( activeFrame instanceof IDataDrivenForm ) {
    ((IDataDrivenForm)activeFrame).refresh();
    } catch (Exception ex) {
    ex.printStackTrace();
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

    almost...
    I now see that glasspanes are an answer to that question. I got it to work (almost) using a glasspane (see code snippet below). But what I can't quite grasp now is why this code does not work when I call it from a child (contained) dialog (and possibly internal frames as well)??? When I do so, the dialog freezes (the button I pressed doesn't even release) and the cursor does not change to waiting. This time I'm really not sure where to go next....
    I appreciate anyone who has read this far, and would really be indebted to you for some good advice!
    PS - Here's the nifty code, placed in my main JFrame class. I just substituted "this.setBusy(true);" for every place I was manually setting the WAIT_CURSOR in the past (and of course with matching setBusy(false)):
    public final void setBusy(boolean isBusy)
    Component glassPane = this.getGlassPane();
    Cursor theCursor = isBusy ? Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) : Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR );
    this.setCursor( theCursor );
    glassPane.setCursor( theCursor );
    glassPane.setVisible( isBusy );

  • Songs won't play after the first playing

    I am having a problem whereby songs will not play after the first time they have been played. After I import them into I tunes, I play them once to verify that they have been copied correctly. However several CDs demonstrate the following behavior. After they have successfully played back one time, they no longer work in Itunes. I click them and nothing happens.
    I just tried to re-rip the song from the CD that i used originally to put the song into Tunes and received the following error message: "An error occurred while updating the default player for audio file types. You do not have enough access priveleges for this operation". I am the only user of my computer and have administrator priveleges. I don't know how to remedy the problem that apparently exists. Can anyone help?

    Can you confirm that Copy files to iTunes Music folder when adding to library is checked in the iTunes Edit menu > Preferences > Advanced tab > General sub-tab on your new computer?

  • Mobile Accounts: Sync new accounts first time only.

    When a user logs into a computer for the first time it is set to create a mobile account, however we don't use home directory syncing because the typical size of our 200 users' home directories is over 100Gb which makes syncing home directories not viable.
    It would be very handy, though, to have it sync the first time only at login so that our user directory template is automatically copied over which will save a lot of time setting up new users.
    Accoring to Apple's User Management v10.5 documentation on page 203:
    +"To initially sync local and network homes so that the network home folder replaces the local home folder, choose “Create home with default sync settings."+
    (This refers to Workgroup Manger -> Preferences -> the Mobility pane -> Account Creation -> Creation tab)
    After testing, though, it is quite clear that this does not work - at least on my setup. I can get it to work by going to the Rules tab in the Mobility pane and ticking the sync at login and logout, but this syncs every time on both login and logout, which is not what I want to achieve.
    Any ideas?

    I also mentioned, that some Safari-Extensions I installed on the iMac are missing now on my iMac-Profile. I also mentioned, that some settings for 1Password are reset to default values.

  • Access of network for first time only

    Hi there,
    I have encountered some problems whenever my J2ME application wants to connect to the servlet via the HttpConnection. When i test on the real device, this alert message "Do you wish to access to the network " will always prompt me whenever i want to use the network.
    So when i open the httpConnection 4 times, this alert message will prompt me 4 times.Is there any ways for me to eliminate this prompting? As far as i'm concerned, i know there's this feature in the mobile device that allows the setting of network access to ask for the first time only. But i want to set it in codings.
    Can anybody help me in this matter?Thanks!

    You also need to set your application domain to trusted. Else even if the user sets the permission to always allow ... blah blah blah, the app will still ask every time. You do this by buying a certificate from a TTP.

  • Does Roaming data syncs for the first time when app data are in download and installation process?

    Hi,
    I will store user Id in "HighPriority" Roaming data. When user will install app in another computer (with the same Microsoft Account), app will get user Id from Roaming data. Then I can implement all data sync over my cloud service.
    There are 2 scenarios:
    1. User downloads and installs app in another computer, but roaming data syncs/downloads for the first time only after several minutes -
    It's bad for my app :(
    2. User downloads and installs app in another computer and roaming data syncs/downloads at the same time (then I can get user Id immediately)
    - Its great for my app :)
    Which scenario is real in practice?
    Does Roaming data syncs for the first time when app data are in download and installation process?

    Umm no not that i remember. It just randomly started happening. I reformatted the hard drive for mac (journaled) but it was working fine since i did it until now

  • Delay on playing an instrument (only at the first time)

    Hello,
    I'm new to Mainstage and have the following problem:
    Always I open my concert, there is a small delay in all instruments in all patches. But ONLY at the first time, I play the instrument (hit the key). For the rest of the performance everything works fine ... How can I get rid of that??
    My work-around right now is, to mute the Main Audio at the soundcheck and play every instrument/patch once ... :-(
    Thanks for your support and greets from Germany
    ... Joonas

    Thanks for your answers first of all !
    At the end I found the solution looking at the Note:307167.1 on Metalink:
    Discoverer Plus 10.1.2 Fails with ORA-1017 Error On First Login Attempt Then Works On Second Attempt
    This note is very useful but into the solution the point 3 is not correct !
    3. Modify the servername parameter to indicate the fully qualified servername.domain
    Example:
    An httpd.conf setting of: ServerName my_servername.mydomain.com should match a Discoverer Plus URL like http://my_servername.mydomain.com:7778/discoverer/plus
    I had this problem both with Viewer and Plus...so instead to change the server name parameter (into the Apache/Apache/conf/httpd.conf file) with my complete URL (http://gnvdev.ote.gr:7779/discoverer/plus), I just write my right server name:
    Example
    After the installation of the Discoverer 1og server, into the httpd.conf file it was written automatyically: ServerName gnvdev
    I just modified in ServerName gnvdev.ote.gr and both Viewer and Plus started to work perfectly at the first time.
    I hope that this hint will be useful for you and others in the Discoverer forum !!!
    Best Regards
    Alex

  • For the first time, I downloaded a podcast in the podcast app by clicking on the cloud icon. Now, every single play button for all of my podcast episodes is grayed out. Why can't I play any of my podcasts any more?

    For the first time, I downloaded a podcast in the podcast app by clicking on the cloud icon. Now, every single play button for all of my podcast episodes is grayed out. Why can't I play any of my podcasts any more?

    Greetings Heather,
    After reading your post, it sounds like you are experiencing an error with the Podcasts app. You may want to consider restarting the device first, and then resetting if that does not work. This article provides detailed instructions for Restarting, and Reseting:
    Turn your iOS device off and on (restart) and reset
    How to restart
    Press and hold the Sleep/Wake button on the top of your device until the red slider appears. Then drag the slider to turn your device completely off.
    After the device turns off, press and hold the Sleep/Wake button again until you see the Apple logo.
    How to reset
    You should reset your device as a last resort and only if you can't restart it.
    To reset, press and hold both the Sleep/Wake and Home buttons for at least 10 seconds, until you see the Apple logo.
    Thank you for contributing to Apple Support Communities,
    BobbyD

  • [Solved] DVDs and CDs only work the first time I put them in

    First lets get this straight before it is asked later on down the line. I am a 6 year Linux user and 2 year Arch user. I am currently using xfce4 and thunar as my file manager with thunar-volman installed. This has been a problem for the past year or so. I use my laptop most of the time (also Arch 64 and working like a dream) so I only try fixing it every so often to no avail.
    I can put in a CD or a DVD and play them with VLC. Here's the catch: after I eject the CD/DVD and put in another one I can't play it or find it. The first time I put one in I even get an icon on the desktop. I don't think it's reasonable to have to reboot everytime I want to play another DVD (time wasted by constant rebooting is one of the very long list of reasons I don't use Microshaft products). I'm stumped, I can't be the only one, but my forum searches yield no treasures.
    Last edited by astrozombie (2010-02-03 01:00:15)

    Thanks for trying, however, I posted what I use for a reason. I am using VLC, and I am a minimalist so I don't want a bunch of programs for doing the exact same thing. VLC is the only player for Linux that plays MTS files out of the box, so I'm not interested in switching or adding another.
    Anyways, it's irrelevant because as I said before, thunar mounts it correctly the first time I put in a DVD or CD and displays an icon on the desktop for the disk. Therefore the problem is most likely hal related, since this began about the time we switched to hotplugging, and besides this I love hotplugging so I am also not interested in disabling that (who know what problems I'll introduce for my MAC keyboard and webcam if I do that). Yes I've read the hal and dbus wikis.
    I can even get a USB CD writer to work with xfburn, however it's a relic and I think that's a sorry work around when I have internal drives that, in theory, work just fine. I wonder if it has anything to do with the drives being IDE when I used the SATA install option on the install disk (I did a fresh install last week) since my hard drives are SATA.

  • My AS3 buttons only work the first time

    I have set up my buttons so that are each a movieclip with 'over' and 'out' states/frame labels. They exist on the main timeline. The actionscript controlling them is situated in a frame on the main timeline and the frame holding that actionscript is on the same point within the main timeline where the buttons are introduced. I am using actionscript 3.
    The buttons have been set up so that they navigate to another frame on the same main timeline and on that frame is a movie. The movie dimensions are smaller than the main stage so the buttons are still accessible when each movie is played.
    The problem is my buttons are only working once - by that I mean they go to the correct place when clicked the first time, but when they are clicked again they navigate elsewhere.
    Totally doing my head in trying find a solution and if anyone can help and show me what I'm doing wrong that would be really really helpful. Here's the code I used for the buttons...
    stop();
    function mainBtnOver(event:MouseEvent):void {
    event.target.gotoAndPlay("over");
    function mainBtnOut(event:MouseEvent):void {
    event.target.gotoAndPlay("out");
    ///////// INDIVIDUAL BUTTON CLICK FUNCTIONS
    function mainBtn1Down(event:MouseEvent):void {
    gotoAndPlay("01Movie");
    function mainBtn2Down(event:MouseEvent):void {
    gotoAndPlay("02Movie");
    function mainBtn3Down(event:MouseEvent):void {
    gotoAndPlay("03Movie");
    function mainBtn4Down(event:MouseEvent):void {
    gotoAndPlay("04Movie");
    function mainBtn5Down(event:MouseEvent):void {
    gotoAndPlay("05Movie");
    ////////// Button 1 Listeners
    mainBtn1.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn1.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn1.addEventListener(MouseEvent.CLICK, mainBtn1Down);
    ////////// Button 2 Listeners
    mainBtn2.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn2.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn2.addEventListener(MouseEvent.CLICK, mainBtn2Down);
    ////////// Button 3 Listeners
    mainBtn3.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn3.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn3.addEventListener(MouseEvent.CLICK, mainBtn3Down);
    ////////// Button 4 Listeners
    mainBtn4.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn4.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn4.addEventListener(MouseEvent.CLICK, mainBtn4Down);
    ////////// Button 5 Listeners
    mainBtn5.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn5.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn5.addEventListener(MouseEvent.CLICK, mainBtn5Down);
    I'm sure it's me doing something very stupid - I'm very new to AS3. Any help much appreciated.
    Thanks :-)

    If the frame labels you are going to have movie clips that have your presentation content, you should use gotoAndStop("frameLabel") instead of gotoAndPlay("frameLabel"). There's no need to play the main timeline when you go to and show any of these movie clips. I'm not sure if this is your issue, though... Using your code, I had no problems.
    Also, you can set up your animated buttons in a way that eliminates the need to have your ROLL_OVER and ROLL_OUT events. This isn't necessarily better, but just another method. Although I might use other ways to animate a button, I do like to reduce the code it takes to use the buttons in an interface, and only use CLICK in most cases.

  • Help - Crackled sound using the speakers for the first time after wake up?!

    I've a new white MacBook since Monday.
    The problem is:
    After turning on oder waking up the notebook, I want to play a sound or music. The first time the speakers are used, the sound is very weak and crackled, but after two seconds or so it's ok again.
    The same happens if the first sound is the emptying-sound of the trash or every other sound.
    This happens every time I start the computer.
    Has anyone the same problem?
    Thank you in advance!
    Greetings form Switzerland
    Message was edited by: Dominik Huber

    Many people have experienced this, usually when using auxiliary speakers. It happens with my desktop on booting. It's very normal.
    You might find this workaround useful and effective:
    https://bugs.launchpad.net/ubuntu/source/linux-source-2.6.20/bug/75906

Maybe you are looking for

  • SSD Sloooow boot windows 7

    Hello, Happy new year. I have replaced  my old sata disk with a ssd disk . Intel 520 240 gb. on my  T520. I have a Windows 7 and a minor Linux partition. Dual boot. I have moved the old image  with Arconis True HD. However, there is a HUGE difference

  • Can I connect ADC monitor to new Aluminum iMac?

    Is it possible (with some adapter) to connect an Apple Studio Display with ADC to the Aluminum iMac's Mini-DVI output port?

  • XMP metadata access in Effect plugin

    Hi everyone, I was wondering if there is a way to access file's XMP metadata from the Effect plugin, like you can do in scripting using XMP scripting API?

  • Photos app crashes when migrating data from iphoto

    Every time I open the photos app it crashes and the migration process of the data from iphoto doesn't complete on iPad 3, is there a solutio?.

  • Sound slightly faster as images when exporting from PRE9 to DVD

    Hi, I just finished cutting a film on Premiere elements 9. Everything is fine. I do a final rendering by hitting the return tab. Then I edit my DVD menus. Then I save the project and burn a dvd. So far so good. The dvd looks very nice.... expect when