How do I stop sound from playing when I leave frame?

I have designed a website for an advertising agency using
Flash and ActionScript 3. In the portfolio page, I have several TV
commercials that are available to play. What I need is 1) when the
user leaves the TV ad page, I want the tv commercial to quit
playing (right now, it continues even though the user has moved on
to other pages). and 2) If the user selects a different TV
commercial without first stopping the original one, the sound for
both of the them plays at the same time. I am using the flv
playback component. The video appears to stop, but the sound
doesn't. My TV commercials are external flv files.
I have also made a page for radio ads and I just used play,
pause and stop buttons to control the sound. This page does the
same thing. The sound continues when you move on to another page in
the site. My sound files are also all external sound files.
All of my pages are just individual frames in a main
timeline. Each page has a frame label.
If this is not clear, here is the link to my site:
http://www.hammockads.com
I would appreciate any help anyone can give me with this. I
have tried for weeks now, to solve this problem and I just don't
know enough actionscript or flash to figure it out. I've only been
working with this for a few months.

I have my website set up so that the portfolio page occupies
one frame of my timeline. Inside that frame, I have a movie clip
which contains the additional pages of the portfolio section. The
additional pages show examples of the print ads, radio ads, tv ads,
web sites that my client has created. Each of these additional
pages is also one frame of the timeline (this time inside the
portfolio movie clip). When the user clicks a link in the website,
it just takes them to another frame on my timeline.
The entire website is one swf file and each of the pages is
located on one frame of the timeline (either on the main timeline
or inside a movie clip timeline.)
In the tv ads page, I have a button for each of the tv
commercials. When the user selects a specific commercial, then the
actionscript calls that particular ad from an external flv file.
The problem is that when the user clicks another button (to view
another ad or chooses to go to another page in the website (which
involves leaving the current frame in the timeline) the video or
radio ad doesn't automatically stop playing.
I can't really post code, because I'm not sure what code to
post. The TV ads are currently set up using the FLV playback
feature. The radio ads are set up with play, stop, pause and volume
control buttons. When a user here selects a new radio ad, the one
currently playing stops and the new one starts, but when the user
chooses to go to another page without first stopping the ad from
playing, it continues to play.
On the TV ads page, nothing is really working except that the
ad plays and stops when it comes to the end. I'm thinking that I
may need to go back and re-code the TV ads to play without using
the flv playback option.
Any thoughts? I hope this is a little bit clearer.

Similar Messages

  • How do I stop movie  from playing when I leave frame?

    Hi,
    I have designed a website using Flash and ActionScript 3. In
    the portfolio page, I have TV commercial that are available to
    play. What I need is 1) when the user leaves the TV ad page, I want
    the tv commercial to quit playing (right now, it continues even
    though the user has moved on to other pages). I am using the flv
    playback component. My TV commercial are external flv file.
    All of my pages are just individual frames in a main
    timeline. Each page has a frame label.
    I would appreciate any help anyone can give me with this. I
    have tried for weeks now, to solve this problem and I just don't
    know enough actionscript or flash to figure it out.
    Thanks in Advance

    Give your FLVPlayback component an instance name and then,
    possibly from the navigation element that moves the user from that
    frame, tell that component instance to stop();
    Without a more complete description of your movie's structure
    its difficult to tell where, or in how many places, you should
    issue the stop() command.

  • How do I stop Firefox from playing video after I navigate from the page or leave Firefox?

    Simple and annoying. . Extremely frustrating issue with Firefox for Android. ..
    I watch a YouTube video or any flash video. . And after I hit play, the ONLY way to stop it is to hit pause or let it play to the end or close the tab. .
    It will NOT automatically stop if I open another tab. or if I navigate from Firefox. .
    I feel this is a very basic feature. Did I set something up that was wrong?
    Can I ask two questions?
    I have another extremely annoying and frustrating problem with Firefox for Android.
    The "top" (if you pull down the tabs) search bar DOES NOT allow my stock Samsung keyboard to auto space. . Thus instead of typing
    "How do I stop Firefox from playing video after I navigate from the page or leave Firefox?"
    I'll type in
    "HowdoIstopFirefoxfromplayingvideoafterInavigatefromthepageorleaveFirefox?"
    Unless I manually got the space bar.
    Using a recently factory data reset Samsung Galaxy s4 active.. android 4.2.2 and stock Samsung keyboard ... Firefox 34.0.1
    Thanks in advanced.
    Ps
    I was a hardcore xscope user for years and just recently gave in to Firefox when i lost all my bookmarks due to a forced factory data reset. .

    I'm using a different keyboard which works fine in the most top search bar...
    I cannot believe that it's not a feature.
    What if I was watching a video and wanted to shut it off quickly? I'll have to hit back? Wait for the previous screen to load then hit the power button?
    Please tell me that feature ids soon to come

  • I have an Iphone 4S, when I am on the phone and I get a new message my phone vibrates and rings. How can I stop this from happening when I am on the phone

    I have an Iphone $S, when I am on the phone and I get a new message my phone vibrates and rings, How can I stop this from happneing when I am on the phone

    Flip the Ring/Silent switch. Make sure Vibrate when silent is off in Settings>Sound.

  • How do I stop photoshop from starting when I open a jpeg file?

    How do I stop photoshop from starting when I open a jpeg file?

    In windows, right click on the file, select the program that you wish to use to open the file, and be sure to check to always open this type of file with the seleted program.

  • How do I stop apps from relaunching when restarting my macbook?

    How do I stop apps from relaunching when restarting my macbook?

    Adding to the list of quitting app's before shutting down and the reopen app's options above, go to: Apple > System Preferences > Users & Groups > Login Items and remove any unwanted App's from the list that are set to open at login.

  • How do I stop iPhoto from opening when i plug in my iPhone?

    How do I stop Iphoto from opening when I plug in my Iphone?

    Having the preference in iPhoto makes perfect sense to me.  After all, iPhoto is the application that opens.  You would expect that is where you should provide some guidance not to open.
    What puzzles me much more is why you would post this comment more than 18 months after wjosten answered the original question.

  • How do I stop mail from opening when I launch safari?

    Can someone please let me know if there is a way to stop mail from opening when I launch safari.
    Thanks

    You are really confused. There are several things I'd recommend, first is becoming more familiar with your computer by visiting (and bookmarking)
    Mac 101
    Find Out How Video tutorials
    Switch 101
    Next, you have 90 days of free AppleCare telephone support when you buy any new Mac. You will find the phone number in your manual or you can also click the AppleCare Contact Info if you cannot find it. However I would STRONGLY recommend carefully reading your manual. The AppleCare people will be able to help you sort out what you have done. You can also visit and Apple Store and speak to a Genius for free, just make an appointment.

  • How can I stop iPhoto from opening when I turn on my Mac?

    Everytime I turn on my Mac Book, the Iphoto App opens. How can I stop this from happening?

    Remove it from the startup items list.

  • How can I stop iTunes from launching when I hit the button on my head phones

    On my MBP I have some head phones that have an inline mic with call answer button. The button on the head phones is fairly sensitive and I tend to bump it on accident often. When I hit the button iTunes is launched or if I have it open it starts music.
    Is there anyway to stop this from happening? This is driving me crazy!

    This problem has been an issue for a number of months and has led to frustration and public humiliation on countless occasions.
    When disconnecting from my Bose Soundlink at home (playing nothing) in order to taking my laptop on the run I open my laptop to find that the entire contents of my iTunes playlist is being belted in public. The subway, the library, my classroom is not the time or place for my laptop to make the decision to begin playing my music without permission. When at home and my Soundlink goes on standby I have nearly had a heart attack when my laptop spontaneously begins blaring my music when I wasn't even touching the thing.
    I love my Soundlink and I love my Mac but together the devices are causing no end of aggravation with no fix in sight. With each OS update I hope the problem is addressed but to no avail, it is getting tiresome that such a flaw isn't being fixed in a timely manner.

  • How do I stop podcasts from playing automatically on my Apple TV instead of my computer?

    When I try to watch a video podcast on my computer, it will automatically connect to my Apple TV via AirPlay and try to play it there (even though I have just double-clicked it on my computer). But sometimes I just want to play it on my computer, not on the Apple TV. Once it does go to Apple TV, then I have to go to the bottom of the computer screen and switch from Apple TV to computer. But I would prefer not to have to do this, since the process needlessly turns on my Apple TV every time (and sometimes my Apple TV doesn't work properly, meaning that if the connection can't get established, I can't watch the podcast at all because it won't just let me play on my computer from the beginning). How do I prevent it from automatically going to the Apple TV every time, and just get it to play on my computer? I feel like I've looked at every setting. Thanks

    ''user293 [[#answer-719707|said]]''
    <blockquote>
    Is there something in particular you don't like in the newer versions? Also, you can give feedback about firefox at [https://input.mozilla.org/en-US/feedback/firefox? input.mozilla.org].
    '''Turning off updates for firefox isn't a good idea''', as each release contains security fixes that are disclosed to the public. However, you can if you want to. Go to the firefox preferences (type about:preferences in the url bar), choose the "advanced" tab, and then choose "update". You can then select "never check for updates".
    </blockquote>
    I don't want to turn off updates. I want hotshot programmers to N-O-T configure Firefox to CHANGE what I have set up on my computer. I want them to N-O-T remove stuff from Firefox that I use every day. I can't even remember what they called that list of options in the upper left of the screen, but I used it regularly. Now it is ripped out. $&^*&&^%$#@
    I guarantee you, if somebody had sat down at MY computer and removed those features, I would have beat him bloody. WHY DO SOME HOTSHOTS SOMEWHERE THINK THEY KNOW BETTER THEN i DO WHAT i NEED??????
    DON'T force me to use my computer as you use yours. Give me the OPTIONS to choose. Options. Not YOUR WAY - options.
    Like I said, it looks to me like you're trying to impress hot shots some where. Don't destroy perfectly good applications in the process. Give S-O-M-E thought to what non-geeks NEED.
    AND when pseudo answering complaints, give us the chance to talk to somebody, not que up on a yet another pick list of off subject nonsense.

  • How can I Stop Video from Playing? (not just mute or pause)

    I have a page for playing a video. Below it I have a 'return to previous page' button. If the video is playing and I click this button to return I can still hear the video playing in the background. I know how to mute or pause the video when clicking this button but I would like to know how to completely stop the video so that if I go back to the video page - the playhead is at the start and I can see its thumbnail image again.
    Anyone help?

    do you mean:
    sym.$("Video01")[0].currentTime = 0;
    I tried this but it didn't work (just resets and plays in background). Also, I have several videos on one page and a navigation bar at the top. I would like (when I click the Nav Bar to go to another page) any video to stop and reset to its Poster.
    If you like, I could send over a very simplified project.

  • How do I stop photos from launching when I plug in camera

    Can't find anything in the preferences that will stop this new app from launching when I plug in cameras or phones.

    Plug in and let it load, then click on the camera/phone on the left hand pane and uncheck the box:
    You should also be able to do this via Image Capture (in the Applications Folder) but I haven't tested it specifically.

  • How can I stop cookies from loading when I right-click on a bookmark in show all bookmarks?

    Whenever I right-click on a bookmark in show all bookmarks cookies try to load. How can I prevent this from happening?

    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Check and tell if its working.

  • How to stop sound from playing everytime we go to 1st frame ?*

    Hi everyone, my app has 3 frames and a sound playing on background so everytime i go to 1st frame the music play's over himself,
    is easy to get 5 instances of the music playing at same time.
    How to stop this behavior ?
    Music file imported to library.
    Sound Linkage: export for actionScript
    Sound Linkage: export in frame 1
    Any help are welcome
    Flash CS6 - AIR 3.4 Android and iOS > CODE:
    //sound
    var bgSound:BGLoop = new BGLoop();
    var channel:SoundChannel=new SoundChannel();
    playMusic();
    //making mute;
    soundBtn.addEventListener(MouseEvent.MOUSE_UP , mute);
    function mute(event:MouseEvent) {
        //removing mute function then adding unmute function to same button
        soundBtn.removeEventListener(MouseEvent.MOUSE_UP , mute);
        soundBtn.addEventListener(MouseEvent.MOUSE_UP , unMute);
        //making symbol to visible;
        soundBtn.gotoAndStop(2);
        //set the volume false;
        SoundMixer.soundTransform = new SoundTransform(0);
    //making unmute
    function unMute(event:MouseEvent) {
        soundBtn.removeEventListener(MouseEvent.MOUSE_UP , unMute);
        soundBtn.addEventListener(MouseEvent.MOUSE_UP , mute);
        soundBtn.gotoAndStop(1);
        //set the volume true;
        SoundMixer.soundTransform = new SoundTransform(1);
    function playMusic():void {
        channel = bgSound.play();
        channel.addEventListener(Event.SOUND_COMPLETE, loopMusic);
    function loopMusic(e:Event):void {
        if (channel != null) {
            channel.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
            playMusic();

    Another way to do this is to create a boolean right off the start. Lets say var createMusicTrack:Boolean and set it to true
    Then load your music and start playing it and at the end of that load code add a line that sets the boolean to false so that when you come back to frame 1 the boolean will be false and the code will not load and play, but this could be problematic too. Djnr suggestion is better for your purposes.

Maybe you are looking for