Sound on Page exit

I am trying to figure out a way to play a sound once you
leave the swf of exit the swf. I do not want to create an exit
button with the sound playing once you exit.
It needs to play once you exit the browser window or exit the
page.
Is this possible?

You would need to use ExternalInterface and javascript
You can use JavaScript to detect the onbeforeunload event of
the browser.
Read:
http://www.webreference.com/dhtml/diner/beforeunload/bunload4.html
Once detected you can use the Javascript to call a function
in your Actionscript that will play your sound. Or, you can simply
play a sound directly from the Javascript, whichever you
prefer.

Similar Messages

  • Killing sound on page exit

    I have a .swf that plays audio clips on top of the animation
    in a web page and everything works fine as far as the swf is
    concerned. However, if the user clicks the navigation buttons ON
    THE WEB BROWSER the sound continues to play to completion.
    How do I stop sounds when the user leaves the page?
    Thanks!

    look at the Sound classes events.
    Better yet, look at the events for MovieClip.
    I'm thinking you can define an onUnload event for _root.
    In that method you could manually stop your SOund class.
    Basically you need a way to know when the SWF is being
    "unloaded," or left by the user.
    bh

  • Exporting sounds in Pages document to PC users

    Is it possible to export a Pages document with sound clips embedded, to a PC user?
    I tried exporting as a PDF but even when I opened this on my iMac with Preview or Adobe Reader, the sound clip icon was missing.
    I exported as a Word document (which created the .doc file and a folder with the media files in it) and when I moved these to a PC and tried opening the .doc in Word general formatting was intact and there was an icon for the sound clip, but I couldn't seem to click or double click and get the sounds to play.
    I tried exporting as an HTML and while the sounds would play, the general formatting was lost.
    Any hope of doing this? (My intention would be to email someone with a PC with the document (and perhaps media files) attached.

    Thanks for the reply, Magnus.
    I guess I have to accept this, but one thing that puzzles me about your reply:
    "In theory both Word and PDF should take embedded sounds, but Apple has not implemented the feature"
    This implies it is the Apple software that is the weak link. Yet in a Pages document I can clearly have the imbedded audio. So is it in their implementation of their export features where the audio is stripped out or is it the inability of the 3rd party products I tried (Adobe Reader and Word) to handle what might really be imbedded?

  • Help setting up sounds effect page for ipad

    Hello,
    For the past few years I've maintained a fun webpage (made in DW) that plays sounds on click.  I use it to accent certain moments in my class and sometimes I run several sounds at once to create a mood during stories.  This year our students are using ipad's and this sound page does not work the same way.  It does not play certain sounds, and opens others (wav, mp4 on a separate page) one at a time.  Here is a sample line of code that works on Macbooks, but will not play at all on ipads.
    Here is the code:
      <embed name="CS1345392109055" src="rimshot.mp4" loop="false" autostart="false" hidden="true" width="0" height="0" enablejavascript="true"></embed>
    Found on this page:   http://gr8writers.com/soundtest2.html
    It plays on a laptop, but no sound on an ipad.
    This next sound plays, but opens up a separate page - also not what I need to happen:
    <embed name="CS1345400314623" src="creepyorgan.mp4" loop="False" autostart="False" hidden="True" width="0" height="0 enablejavascript="true"></embed>
    Found on this page:   http://gr8writers.com/soundtest2.html
    What I need to be able to do is have these sounds play on click without opening a separate window.  Thanks if you can help!

    Use an HTML5 doc type with the <audio> player tags.
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 Audio Demo</title>
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    </head>
    <body>
    <p>This works in all modern browsers.
    The .ogg file type supports Mozilla and Gecko browsers.
    MP3 audio is supported by the rest.</p>
    <audio controls>
    <source src="path/yourSong.ogg" type="audio/ogg">
    <source src="path/yourSong.mp3" type="audio/mp3">
    </audio>
    </body>
    </html>
    Nancy O.

  • All tests print out fine, but all other print jobs get caught in printer as the page exits printer

    I have a HP Photosmart D110 printer.  Can't print out anything - except tests - without the page getting chewed up on left corner as it exits the printer.
    JoanP

    Hi you can try the steps on this video
    http://h30460.www3.hp.com/?rf=sitemap&fr_story=0d22534555a7583162469f89904ab9e0345bf9ca&jumpid=reg_R...
    its a general solution but if after this the issue persist contact HP for a warranty replacement just take note on the steps that you performed so you will not have to do them again

  • Sound On Page Enter Stutters A Few Times...

    I made a page transition thing with Tween and added sound. I
    used this script to make it play the tween when I enter any page..
    The problem is that when I enter a page I want the tween to
    start on frame 70. It plays the sound but somtimes it sort of
    sounds like its playing 2 or 3 of the sounds at the same time (
    only for a few milliseconds though. It sort of stutters for the
    first .2 seconds ) then plays through fine. This problem dosnt
    happen on all pages. I made sure i am not playing the sound
    anywhere else at any time when you click on that frame but i cant
    find whats causing it. Also, this dosnt happen every time, if I
    click the home link it will do it, then if I click it again it
    might not... Another problem is sound inconsistency, somtimes when
    I click on a link it plays the sound much louder then it did before
    and this also seems to be on a random basis.
    Also, my tween works fine. If I just play the tween its
    exactly as I want it ( also it plays the tween from frame 70 every
    page but it dosnt stutter on some ).
    And yes i did the "stop();" in the first frame.
    Whats wrong? Thanks

    I sort of know whats going on but i cant fix it. I have the
    motion and the sound all in one tween. For some reason when I put
    the tween onto the frame and remark out my code that says to play
    it. It dosnt play the motion but it STILL plays the sound... So the
    reason its studdering is because its playing the sound when it gets
    to the frame, then its playing it AGAIN when i actually code it to
    play the tween. I searched ALL of my layers and such for anything
    that may be making this sound play but i have no idea why its
    playing. Why is it automatically playing one part of the tween when
    im NOT even calling it? Thanks

  • Sound on page

    Is there a way to imbed a sound file on a page? So that it plays automatically when you go to the page?
    G5 2.3 DP   Mac OS X (10.4.4)   2 x 250Gb internal HD's

    Hi Lawrence Spencer,
    Welcome to Apple Discussions
    I believe you are going to have to turn it into a .mov file in Quicktime and then edit the tags of the file. Here is a past thread that might point you in the right direction.
    I hope that helps,
    Jon
    PS I don't know if all the effort is worth it.

  • How do I turn off the sound effects on Pages 2?

    The chirping sound that the blinking cursor makes is driving me crazy. (The computer emits other sounds as I move the pointer over the document as well.) I've tried turning off my computer speakers, turning down the computer's general volume, all to no avail. I'm new to Pages, and I see no reference to my problem in Apple support materials or the forums. Help would be greatly, greatly appreciated. Thank you!

    Yes, the sound problem is unique to Pages. The sounds stop when I switch to iTunes, Safari, Word, iPhoto, any other simultaneously running program. The sounds on Pages are in sync with the speed of the blinking cursor or of the moving pointer. And when I stop the cursor from blinking by highlighting a phrase in the document, the muted but discernible chirping sound also stops. I hope this description is helpful! Thanks.

  • Scripting the lenght of a page (for smooth scrolling in DPS)

    Hi, folks
    I am quite a layman in this scripting world but I have a question that I would really need answered. It's not so much a question of 'how' but one of 'is this possible with scripting'?
    We want to set up a system where the pages would be automatically created with XML input from a short set of templates so that they end as indesign documents in a given folder.
    We have a very clear idea now on how to do that. But now, I have to take a design decission: Should I try using "one-page articles" with pages of variable lengt depending on the size of the body text frame? (so that they make afterwards smooth scrolling in Adobe DPS)?
    What refrains me from doing that is that body text will be variable in size and lenght. So... I cannot predetermine which length must have the main frame in the pages and, consequently, I cannot predetermine the lenght of the pages (expressed as top margin + body frame length + bottom margin).
    The question for scripting: Is it possible that you may run a script that does this?
    - Text is input into the main body text frame via XML import.
    - Frame is resized so that it fits with content (no more, no less).
    - Page is then resized so that (expressed as top margin + body frame length + bottom margin) it keeps designed proportions.
    I hope what I want is clear enough, because that is the doubt that is stopping me from trying the one long page winding way. Any idea, please?
    Thanks a lot
    Gustavo (Posting from Madrid)

    Hi Gustavo,
    yes you can accomplish what you are describing with InDesign scripting.
    Instead of creating a smooth scrolling page you could even create a frame with scrollable
    content on the template an fill the scrollable content with text.
    That way you will not have empty spots on the page.
    That sounds like an exiting project which combines InDesign, DPS and scripting skills.
    Stefan

  • No sound in full-screen mode.

    When playing a movie or music video in full-screen mode, the sound goes away.  All other sounds play normally, but just the movie/music video sound goes away. The sound returns when exiting full-screen mode. I am on a Mac Mini Server (mid-2011) and play the sound through a Thunderbolt display.

    Thanks, I downloaded Acrobat 8 to try using legecy option but got message that I couldn't open it as it's not compatible with my OS. I can only use version 9 it seems.
    The fact that the file will play makes me think this should be possible so I kept trying.
    I found some success which allows one to see how nice this will be when it works.
    By following the instructions as before I put the play button on the bottom left except by dragging a small marque the button is that small size & doesn't cover the image.. After browsing & choosing the file, click the show advance options button & choose from the "Enable When" menu, " The page containing the content is opened"
    From the "Playback Style" menu choose "In floating window" Click OK & Save.
    When this is opened in Reader you are asked if you want to enter Full Screen Mode, choose yes. In FS Mode the photos start to do their thing, transitioning into each other. The floating window is in upper right partialy covering the photo. The pause sign is displayed as if it is playing but it's not. It never does unless you click the pause sign then click it again to play. One has to wait a while before this will work, maybe it's loading or something. Any way the music starts. By now the slides have ended.
    You can right click the floating window & choose "Close floating window". I it disapears but the music continues to play. One can then tap the left arrow on the keyboard to transition, still in FS Mode. Can also click right arrrow. It looks good. Only not automatic.
    To stop the music before it ends one has to click back to the 1st photo & right click on the small square & choose show floating window, then click the pause button to stop it.
    I think it is a bug. It just doesn't work as it should. How do we got Adobe to fix it?
    It would be so nice to have a cross platform way to share a slideshow with sound.
    If anyone has any better luck plmk.
    Thanks

  • No sound output help

    plz help someone ....
    I have hp g6 2312ax
    there is no sound in my laptop
    I took it to the hp service centre and they said that audio port on mobo is damaged
    motherboard need to be replaced.
    I have two audio device
    1. amd
    2. idt
    is there any way I can get sound output
    This question was solved.
    View Solution.

    Hi legendary92,
    Welcome to the HP Support Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I saw your post regarding the motherboard problems. If the HP service centre has told you that audio port is damaged you will have to replace the motherboard if you want sound. Page 75 of the Maintenance and Service Guide will show you how to replace it. The part number for your motherboard or system board as they are called in notebooks is 683031-501. You can order the part from HP PartsSurfer just search for the part number.
    Thank you,
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • Pages won't "save as"

    Hello, I have looked through this forum and can't find my exact problem so am hoping to get some help.  I intalled the pages app on my iMac at school where I teach elementary math.  I made a graphing document for my fourth graders and tried to "save as".  The only option I see is "save".  When I hit that, it saved it as "untitled" to some random location - it wouldn't let me choose my saving location.  I managed to rename the file, but still will only let me "save" and the screen bleeps like it's saved but I still don't know where it has been saved to without doing a search in finder. 
    THEN, I edited the document to make it suitable for my third graders, but obvioulsy wanted to save it as a different file. Again, no "save as" feature.  I duplicated it and renamed it but it still goes to some random unknown place when I hit the save button. 
    All I want to do it put it in the right place on my computer so I can find it next year.  Where is the "save as" button and why is it not letting me choose my file name and location?
    I do not have a trial version of this software.
    Any help is greatly appreciated.  Thank you!
    Dana

    You need to tell us both what version of Pages and OSX you are using.
    It sounds like Pages 5 on OSX 10.9 Mavericks?
    Hold down the option key and go to the File menu and you will see Save as…
    You need to turn the triangle in the Save dialog box to see more choices where to save.
    Peter

  • Table of Contents become not clickable when I convert Pages to PDF

    Hello,
    I created a document in Pages but the TOC becomes not clickable when I export it to PDF. I tried "Print as PDF", too but didn't work. Is there a fix or workaround? I am working on User Manual for a new system for my company and not many people will be able to use Pages document.
    Thanks!

    What version of Pages?
    Sounds like Pages 5.2.2. They are supposed to have fixed that, but seems you are still having the problem.
    If you are doing a manual you will be far better off using Pages '09.
    Pages 5.2.2 has so many features missing. and is buggy to boot.
    Peter

  • Reader does not remember the last page! Disaster!

    Critical bug detected on: Nokia Lumia 620
    Adobe Reader v10.3
    Description:
    Try open any PDF file, then move pages, exit from reader, then back again in reader.
    Reader must remember last page!
    Please fix this, because it's very important feature in any reader!

    Всё ещё не пофикшено!

  • Beginner needs slideshow with pages and hyperlinks

    I've used Adobe PS, PSE, Fireworks, Dreamweaver, etc. now have cloud.
    All I want to create is a simple SWF the moves a picture from right to left, holds a few seconds so that a person can click the page to go to a linked page, exit, enter two more pages that also hold and link to pages.
    I used to create this slideshow in Powerbullet Presenter (www.powerbullet.com a free swf producer) but the software won't export the finished slideshow properly with 64 bit.
    Surely something this simple could be done somewhere in the Adobe Cloud set of programs.
    I've tried Flash, InDesign, Fireworks. But now I'm frustrated.
    Hope someone can point me in the right direction with words and/or a tutorial.
    thanks in advance!
    C

    Thank you both, John Waller and kglad.
    Bridge was easy, but didn't do the job either.
    I'm looking for a non-asp.net Homepage AdRotator type something to put on my homepage.
    You have a page/photo that you can link a web page to, it rotates to a new page/photo with a new link to web page, and on for however many pages. I don't have ASP.
    My site is www.cara4webshopping.com and the current slideshow is the crippled powerbullet swf output. At this point I'm thinking of finding someone with an XP computer and just doing what I have to do with powerbullet presenter since it does it so easily. <SIGH>  All this big "adobe" software, and an older free program does it easier? faster? <SIGH>
    Please if any one knows Powerbullet Presenter alternative for 64 bit, especially in Adobe, let me know.

Maybe you are looking for