Stop video audio when clicking on new page of site

I really really need help with this as I've been stuck for a while. The situation is I have a number of pages with a single movie clip on each, however once the movie is playing and you click the home or contact buttons for example, it will go to the correct page but the movies sound keep playing in the background.
So I've got a code someone was helping me out with, but I just get an error sayign tanmovstop() does not have a body. I'm very new to action script so am very lost! If anyone can help I'll be extremely grateful.
The code on the sites main buttons is as follows, with tanmov being the movie whos sound I want to stop:
home.addEventListener(MouseEvent.CLICK, clickhome2);
function clickhome2(event:Event):void {
    trace("home");
tanmovstop();
    gotoAndStop("home");
films.addEventListener(MouseEvent.CLICK, clickfilms2);
function clickfilms2(event:Event):void {
    trace("films");
tanmovstop();
    gotoAndStop("films");
about.addEventListener(MouseEvent.CLICK, clickabout2);
function clickabout2(event:Event):void {
    trace("about");
tanmovstop();
    gotoAndStop("about");
contact.addEventListener(MouseEvent.CLICK, clickcontact2);
function clickcontact2(event:Event):void {
    trace("contact");
tanmovstop();
    gotoAndStop("contact");
var tanmov:FLVPlayback;
function tanmovstop()
if(tanmov != null){
tanmov.stop();

yeow, i can't believe how many threads you've started on this and how long you've been working on it.
if you want to hire me to solve this, send an email via my website:  www.kglad.com

Similar Messages

  • Stop video audio when jumping to another label?

    Hey there I have a video with audio (showing within a "videoHolder" object) at one label, but when I click a back button to go back to the main menu at another label, the video disappears but the audio still plays.
    ie the video label is...
    var vid = sym.$("videoHolder");
         vid.html("<video width='600' height='400' controls= 'controls' preload='auto' autoplay='autoplay' poster='video/medicationAlliance.jpg'>" +
    "<source src='video/medicationAlliance.mp4' type='video/mp4' />" +
    "<source src='video/medicationAlliance.webm' type='video/webm' />" +
    "<source src='video/medicationAlliance.ogg' type='video/ogg' />" +
    "</video>");
    whilst the main menu is...
    sym.stop();
    Is there anyway to stop the audio playing at the main menu?
    Thanks in advance.

    I'm having a similar issue...
    a bit of newbee as well..
    i have poster... when you click on it... go to another part of the timeline... The video in the videoholder loads up. I have an action script....this works great...
    // sym.$("name") resolves an Edge Animate element name to a DOM
    // element that can be used with jQuery
    var element = sym.$("stealin2");
    element.html('<video width="715" height="382" \
    src="http://www.richardburnschannel.com/storage/stealinmovieLarge.mov" \
    type="video/mp4" controls="controls" \
    ></video>');
    above the videoholder, I created a graphic box with an x for stopping the video.
    I create a trigger so the when you click on the X the action goes back start location where the videoholder is gone. Thus, back to the poster.  However, the video continues to play.  Here's the trigger i use, which works to get rid of the videoholder but not stopping the audio in the video.
    // play the timeline from the given position (ms or label)
    sym.play("start");
    I've tried a bunch of these solition but no luck..
    rb

  • How to stop video Autoplay when opened in new tab (before clicking on the tab)

    In Firefox on my old PC, and Safari on the current Mac, if I open a video in a new tab, the video would not auto-play, until I clicked on the tab. On Firefox on the Mac the video just auto plays. This is pretty annoying when I open 4 or 5 videos in different tabs and they all start playing. I want to click on the tab before it starts playing.
    As safari on the Mac does not play the videos automatically, I am hoping there is a way to stop it on Firefox?
    So an example is metacafe.com. If you open a video in a new tab, the video will start playing automatically, whether you click on the tab or not.
    If you open up the same site in safari, and open the video in a new tab, the video will only start playing once you have clicked on the tab.

    ...still blooming me!
    Who else the autoplay helps?
    Internet Service Providers for customers that have a 'LIMITED' monthly bandwidth.
    It makes you waste a lot of it and 'force' you to buy more EXTRA and not needed allowance!
    But above all that. WHAT ABOUT OUR RIGHT TO CHOOSE ?
    Is democracy completely dead?

  • Can't stop the music when I leave the page.

    Hi all;
    I keep posting in the wrong area.  Sorry.  I did this post in AC2 and the answers didn't look right.  So, here I am again.
    I'm  building a  website in flash using my limited understanding of action  script.   Everything was progressing very well until I found that if I  go to one  of my example pages of my web site and play the flash video  (with audio)  and click back to my "home" button, the audio will  continue to play.   If I go back to the example page, the video is off  and when I start the  video, it plays again with the other audio.  I  hear the audio twice! I  know there is an action script to handle this  but, I can't figure it  out.
    My question is, How do I stop the audio when I click away from the example page back to the home page or any other page?
    Thanks in advance for your help.
    I'm using Flash CS4 and a Mac OS operating system.
    Did I mention that I'm not very good with action scrupt but, I'm so close to finishing this web site.

    assign your component an instance name (if it doesn't already have one), eg flv and in the frame that contains that component add:
    flv.addEventListener(Event.REMOVED_FROM_STAGE,removedF);
    function removedF(e:Event):void{
    flv.stop();

  • When clicking on "new sheet" in numbers on my MacBook Pro all I get is a blank sheet. I have added numerous sheets successfully prior to this. How to I get new sheets to appear again?

    When clicking on "new sheet" in an existing file on numbers all I get is a blank screen. I have added numerous sheets prior to this successfully. What changed and how do I change it back?

    Hi GSP,
    I can't reproduce your problem.
    Does the spreadsheet behave normally otherwise? What happens if you try to add a table to that blank sheet?
    quinn

  • Stop Video & sounds when you flip pages

    Hi !
    We are many to have this problem :
    When you have an auto-play video or audio in a page, when you flip the page, the video or the audio continues to play and doesn't stop !
    There's a trick : on the next page and on the page before, we can place a "white" video (or a "white sound"). It means an empty short video or sound, with auto-play action. When it starts, it stops the video or the sound from the other page. That's it !
    BUT there is a problem, and this is my question :
    When you flip BACK the page, the video or audio doesn't autoplay again ! It's a real problem.
    For exemple, if the video is on the last page, when you flip it back, the video is still playing, even if you placed a white video on the page before.
    Does anyone have a solution or a trick?
    Regards,
    Vincent

    yeow, i can't believe how many threads you've started on this and how long you've been working on it.
    if you want to hire me to solve this, send an email via my website:  www.kglad.com

  • Why does Fiefox require me to click allow when opening a new page?

    When I try to open a new page, Firefox requires that I click the "allow" button below the toolbar in order to proceed. This is new (within the last few weeks).

    This?
    See: [http://kb.mozillazine.org/Menu_differences Firefox > Preferences] > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    * [[Options window - Advanced panel#General_tab]]
    See also: http://kb.mozillazine.org/accessibility.blockautorefresh

  • Make Video Pause When Clicked?

    Hi, I have a flash video that is set to autoplay when the page loads. We've just implemented thickbox/lightbox system on it now so when you click on the video it enlarges into that new frame. Problem is, when that's done the video/audio is still playing while the video in the thickbox is playing too. This leading to ineffective listening. Does anyone know a code that would trigger the video to pause when clicked anywhere on the video screen?
    Right now the videos being tested at this link - http://edlevinjewelry.com/indexTEST.html
    I don't currently have the video linked up to lightbox, just a link above the video to expand.
    With FLVPlayback,this is my current code (it's currently coded and set up so the video autoplay starts at 52 seconds)...
    import fl.video.MetadataEvent;
    import fl.video.VideoProgressEvent;
    import fl.video.*;
    my_FLVPlybk.addEventListener(VideoEvent.COMPLETE, rewind);
    function rewind(eventObject:VideoEvent):void {
        my_FLVPlybk.seek(52);
        my_FLVPlybk.play();
    var fp:FLVPlayback = my_FLVPlybk;
    fp.addEventListener(VideoProgressEvent.PROGRESS, videoProgressHandler, false, 0, true);
    fp.addEventListener(MetadataEvent.METADATA_RECEIVED, metaDataHandler, false, 0, true);
    fp.autoPlay = false;
    var startSeekTime:Number = 52;
    var videoDuration:Number;
    var videoSeeked:Boolean = false;
    function metaDataHandler(event:MetadataEvent):void {
         if(event.info.duration != null){
              videoDuration =event.info.duration;
    function videoProgressHandler(event:VideoProgressEvent):void {
         var fp:FLVPlayback = event.currentTarget as FLVPlayback;
         var bytesLoaded:Number = event.bytesLoaded;
         var bytesTotal:Number = event.bytesTotal;
         if( !isNaN(videoDuration)){
              if( (bytesLoaded/bytesTotal) >= ( (startSeekTime+4)/videoDuration) && !videoSeeked ){
                   videoSeeked = true;
                   fp.seek(startSeekTime);
    fp.play();

    kglad -
    When I plugged in the code below, it had these 3 errors:
    1119: Access of possibly undefined property toggle through a reference with static type fl.video:FLVPlayback.
    source - if(!my_FLVPlybk.toggle){
    1119: Access of possibly undefined property toggle through a reference with static type fl.video:FLVPlayback.
    source - my_FLVPlybk.toggle=!my_FLVPlybk.toggle;
    1119: Access of possibly undefined property toggle through a reference with static type fl.video:FLVPlayback.
    source - my_FLVPlybk.toggle=!my_FLVPlybk.toggle;
    I put it in the actionscript, was there anywhere specific I was supposed to plug it with the rest of the code?
    Thanks for helping with this.
    - Sean
    = = =
    stage.addEventListener(MouseEvent.CLICK,videoF);
    function videoF(e:MouseEvent){
    if(!my_FLVPlybk.toggle){
    my_FLVPlybk.pause();
    } else {
    my_FLVPlybk.play();
    my_FLVPlybk.toggle=!my_FLVPlybk.toggle;
    = = =

  • Create a script for "when movie ends, go to new page in site"

    Sorry. Very new to this.
    I have a simple Flash animation which I have imported to a page in my DW doc. When the anim finishes, I would like the page to go to a different page in the same site. Without clicking.
    I assume I have to write some AS on the last frame of my FL file, correct?
    so... something like this (don't laugh)
    var link:URLRequest = new URLRequest("page.html")
    stage (or something?).addEventListener(what goes here.ENDMOVIEor something like that, endMovie);
    function endMovie(event:WhatGoesHere):void
    navigateToURL(link);
    Obviously I need help.
    TIA
    Gretchen

    Thanks. But I can't get this to work. I placed that code in the last frame of my movie (I tried stop() both before and after it as well), I exported as a swf. I imported it to DW (import--media). the movie runs, but does not go to new page.
    should the URLRequest have www before it? I don't think so because it is in the local root folder.
    Any other suggestions?
    ( I am also searching old messages on same subject)
    TIA again.
    Gretchen

  • How do I make it so my client can edit Links in business catalyst when they create new pages?

    Okay so essentially I have built a site in Muse uploaded to business catalyst and I've setup a site template so that the client can create new pages as each new course arrives, but how do I get the link from the homepage to link to the new page? basically I need the link to be editable.
    What would be ideal is a kind of portfolio layout where there is a thumbnail and a new page but for my client to be able to add a new project adn it would create a thumbnail on the homepage and a new page that he can edit. Does anyone know of something like that possible in Business catalyst?

    Hi
    Editing with Business Catalyst only works with image or text editing , we cannot add new page or page items using in browser editing.
    However, you can manage the site from BC end when your client and login to admin and add pages, modify etc, but if you re-publish the site from Muse then then changes will be overwritten.
    Thanks,
    Sanjit

  • Adding Form pages via JS and templates. Stop text from copying to the new page

    Hello Community,
    Over the past few days I've been getting a crash course in Adobe acrobat, and JavaScript. One of our clients asked us to make a PDF form with fillable fields, and a button that will make a new copy of the form.
    I have the text fields, template, and javascript for the button to load the template.
    My problem is that text in the fields on the first page is being copied to the additional pages when they are made.
    I have been doing a ton of research and found a lot of answerrs talking about having the fields renamed. I have included the bRename part to my JS, and the text fields show that they are a differnet name, but it still pulls the data from the first page.
    here is the script I am using. I am also runing Acrobat X standard.
    var a = this.getTemplate("New Page"); 
    a.spawn({bRename: true});
    Any suggestions would be a huge help. I can provide any additional info needed.

    You can reset the fields on the newly created page. All of the fields on the page will have the prefix "Pn" where n is the page number of the newly created page. Since your code adds the page at the end, the code to reset the fields that you can use after the code that spawns the template can be:
    resetForm(["P" + (numPages - 1)]);

  • How to get the page number when click the(Next page) Icon on Tableview

    Hi all,
           I had implemented a tableview in one of the Views that I had implemented for a BSP application. I am using MVC framework.
    Let us assume when we execute the BSP and a table view got 11 pages.
    How I can keep track of the page number when we click the  (Next page, Previous page, Bottom , Top) Icons on my tableview . Is there any attribute willstore that  corresponding page number of the tableview when we click the corresponding Icon's??
    I had checked both CL_HTMLB_TABLEVIEW and CL_HTMLB_EVENT_TABLEVIEW Classes and i don't find any attribute.
    Any help will be appreciated.
    Thanks in advance.
    Thanks,
    Greetson

    Hi Greetson,
      I was thinking to write a weblog about that.
      But now I would like to have your opinion:
      I coded a generic method in my main controller (but you could also insert it in the application class) that save the firstvisible row in the class  me->firstvisiblerowlist (that is a table)
      DATA: l_firstvisiblerowlist TYPE zmmsp_tableview_1st_visi_row.
      DATA: ff  TYPE ihttpnvp,
            ffs TYPE tihttpnvp.
      me->request->get_form_fields( CHANGING fields = ffs ).
      LOOP AT ffs INTO ff.
        IF ff-name CP 'f*visiblefirstrow'.
          READ TABLE me->firstvisiblerowlist INTO l_firstvisiblerowlist WITH KEY name = ff-name.
          CASE sy-subrc.
            WHEN 0.
              l_firstvisiblerowlist-name  = ff-name.
              l_firstvisiblerowlist-value = ff-value.
              MODIFY me->firstvisiblerowlist FROM l_firstvisiblerowlist INDEX sy-tabix.
            WHEN 4.
              IF sy-tabix = 0.
                l_firstvisiblerowlist-name  = ff-name.
                l_firstvisiblerowlist-value = ff-value.
                APPEND l_firstvisiblerowlist TO me->firstvisiblerowlist.
              ELSE.
                l_firstvisiblerowlist-name  = ff-name.
                l_firstvisiblerowlist-value = ff-value.
                INSERT l_firstvisiblerowlist INTO me->firstvisiblerowlist INDEX sy-tabix.
              ENDIF.
            WHEN 8.
              l_firstvisiblerowlist-name  = ff-name.
              l_firstvisiblerowlist-value = ff-value.
              APPEND l_firstvisiblerowlist TO me->firstvisiblerowlist.
          ENDCASE.
        ENDIF.
      ENDLOOP.
    Than you have to provide a generic method to read the firstvisiblerow for each tableview
    GET_FIRSTVISIBLEROW
    *IM_TABLENAME
    *RE_VALUE
      DATA: l_firstvisiblerow  TYPE zmmsp_tableview_1st_visi_row.
      READ TABLE me->firstvisiblerowlist INTO l_firstvisiblerow WITH KEY name = im_tablename.
      IF sy-subrc = 0.
        re_value =  l_firstvisiblerow-value.
      ELSE.
        re_value =  1.
      ENDIF.
    And in the DO_REQUSET of each controller you could write something like:
    * Paginator
      DATA: l_tab1_visiblefirstrow TYPE sytabix.
      l_tab1_visiblefirstrow = o_bsp_main->get_firstvisiblerow( 'f019id_tab1_visiblefirstrow'    ).
    As usual pass the value to the view via:
      o_page->set_attribute( name = 'tab1visiblefirstrow' value = l_tab1_visiblefirstrow ).
    Did you get it?

  • AIR 3.3 stop background audio when another audio app is launched?

    I currently have audio playing in the background in my AIR app for iOS. My problem is that when you have the audio playing in the background, and you launch any other audio app on your phone...the audio starts to overlap because my AIR app does not stop playing audio. So when you open Pandora, Music, IHeartRadio, Youtube, etc...the AIR audio still plays.
    Is this fixed in the AIR 3.3 release with the <executeInBackground> tag? Or is there another way for my AIR app to recognize that another audio app is launching? All the afformentioned apps play nice together like that.
    I would think this would be grounds for not being accepted in the iTunes store.
    I really need some answers because my app is set to go live soon and this will be a game changer if I cannot fix it. I will probably have to try and create it in objective C
    Thanks in advance for any help!
    -- I posted this in the wrong place last night and meant to post it here. --

    Thanks a lot for the reply!
    It is very unfortunate that there is not a solution to this. It seems that building an audio/music player app via AIR for iOS is not really feasable due to this limitation.
    I would think the use case would be larger for my case because typically, when you launch a game on your iPhone, the background audio application stops the music. Or maybe just have a listener that could detect if another app was launched at least, so you could stop your AIR audio by choice. That would be great.
    Do you see this as grounds for an audio app being rejected? If the background audio does not stop unless you physically go back into the app and pause it?
    Thanks.

  • Changing the starting line when printing on new page.

    I am using Reports 6i. I have a report with a master/detail ralationship. The columns from the master query prints once only at the beginning of the report followed by numerous detail lines. However, should the detail lines continue printing onto a new page .... I would like to specify a particular position to start the print.eg 5 or perhaps 7 line from the top. Can this be done in reports 6i. Thanx in advance!

    Reports allows you to position the objects anywhere you want on the page. The only reason that objects move up the page is because they are anchored to objects above them. When those objects don't print, the objects that come after move up.
    You can create an object that prints on all pages but has no line and no fill color. This can then be used to reduce the amount the master frame can shrink by. (Make sure it prints on all pages. You might need to create seperate frames to surround the fields you want to see and the transparent field - then another to surround them both).
    If you know the position that you want the details to print then you can position the detail objects in the appropriate location and change the properties against the frame that surrounds he detail section as follows:
    "Base Printing On" to "Enclosing Object"
    "Print Object On" to "All Pages"
    Alternatively, create an explicit anchor between the frame and the top of the report.
    Finally, if you want to parameterise the position of the detail records, you need to create field that dynamically re-sizes to push everything below it down by the required amount.
    - create a field object that is at the same level as the master objects
    - set the "print object on" propert to "All but First Page"
    - set the source of the field to something like "desformat".
    - then use the srw.set_field_char(0, "<some text with a number of returns>"); in the format trigger
    This allows you to push everything below the field down by any desired amount.

  • When i open new page, it has the outline of a selection i made a few pages ago

    this is what i see when i open a new page. it is part of a selection i made a few pages back. i can delete it and use another, blank layer, but when i "fill" the layer, this is what it is filled with. relatively familiar with photoshop basics, have never come across this. input welcomed.
    madeleine

    Does turning off »Use Graphics Processor« in the Performance Preferences and restarting Photoshop have any bearing on the issue?
    Please read these and proceed accordingly:
    http://forums.adobe.com/thread/419981?tstart=0
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html

Maybe you are looking for