How to pause stage/swf with audio when a new tab is opened/ out of focus in browser

I have created a container in Flash Professional CS5 for my project’s CBT.  I’ve been able to script many of the features we require using AS3, but there are a couple of things I’m still trying to work out.
I would like the swf presently playing in one tab to pause and go silent when another swf is opened in a new tab (the sound is inside this externally loaded swf which is loaded inside a movie clip from buttons nested a movie clip down).  I’ve tried :
var originalFrameRate:uint = stage.frameRate;
var standbyFrameRate:uint = 0;
addEventListener(Event.ACTIVATE, onActivate);
addEventListener(Event.DEACTIVATE, onDeactivate);
function onActivate(e:Event):void
       stage.frameRate = originalFrameRate;
       trace("in focus");
function onDeactivate(e:Event):void
       stage.frameRate = standbyFrameRate;
       SoundMixer.stopAll();
       trace("out of focus");
And
      I’ve looked into the HTML tag “has Priority”
and coded buttons to:
function fl_ClickToGoToWebPage(event:MouseEvent):void
       navigateToURL(new URLRequest("http://www.ansaldo-sts.com/AnsaldoSTS/EN/index.sdo"), "_blank");
       MovieClip(this.stage).stop();
With variations of:
MovieClip(this.parent.parent)stop();
MovieClip(this.parent.parent.parent.parent)stop(); because the button is 3 movie clips deep.
MovieClip(this.root)stop();      MovieClip(root)stop();MovieClip(this.currentTarget.root)stop();
Could someone please provide me with the code?
This function is present when I publish the CBT with Captivate, so obviously there must be code available. You can set the Captivate button to open url in new window and pause movie.
Is there something I can add to the html file that is similar to the “has Priority” for mobile devices or is there javascript that can be added to the flash itself?

You would send a command to Flash from JavaScript when window.onblur event occurs.

Similar Messages

  • How can I disable thumb nails when a new tab is opened?

    When I open a new tab it is cluttered with all of the prior web pages that I recently visited. There should be a simple way to disable this feature such as a menu item.

    See if this support article helps you - https://support.mozilla.org/en-US/kb/new-tab-page-show-hide-and-customize-top-sites

  • An external source changing the page shown when a new tab is opened.

    I recently downloaded some freeware and, without permission, it installed some malware by the name of My Start by Incredibar that hijacked the home page, new tab page, default search engine, and other functions in Firefox.
    The removal of the program itself was a simple task, as was disabling and uninstalling the addon it had installed in Firefox. I thought everything was back to normal, but when I went to open a new tab the My Start site appeared instead of the default blank page.
    Will a reinstall without deleting user data solve this problem? I would rather not have to pull a full clean reinstall as I have a lot of addons with custom settings and logins.

    Did you check for the presence of a user.js file that might re-add the prefs on each start of Firefox?
    *http://kb.mozillazine.org/Preferences_not_saved

  • When opening a new tab, IE9 opens a blank page, not the new tab page

    I change my settings to open a the new tab page when I open a new tab. This works for one boot of Windows. Second boot, the settings have magically changed back to opening a blank page.
    It worked to start with. I only just reinstalled Windows on this computer. Then a few days ago I didn't get my most recent sites when I opened a tab. Changed the settings. Next boot. They had reset.
    It seems as if the settings do not save. I had this problem on my older computer as well. Never found a fix.
    To clear up misunderstandings (there are some similar posts), when I select a link to open in a new tab, it always works.

    Hi ,
    In order to clarify the issue clearly, I would like to ask the following questions:
    Did you make the steps below to set “When a new tab is opened” to open your first home page?
    Open a new tab to your home page in Internet Explorer
    http://windows.microsoft.com/en-us/windows7/Open-a-new-tab-to-your-home-page-in-Internet-Explorer
    Will the home page change back after the second boot?
    Is this setting able to be saved?
    Is this your home pc?
    What’s the operation system?
    Generally, this issue  will not persist after reinstalling the Windows.
    I would recommend you to perform the steps mentioned below and check if it helps:
    1. Temporarily disable all the third party security programs and boot in
    Clean Boot to test the issue.
    2. I would suggest you to optimizing the internet explorer for better performance and check if it helps.
    How to optimize Internet Explorer (Also applicable for IE 9)
    http://support.microsoft.com/kb/936213/ro
    Note: Resetting Internet Explorer’s settings is not reversible. After a reset, all previous settings are lost and cannot
    be recovered.
    Tracy Cai
    TechNet Community Support

  • How do I set the new tab to open my homepage?

    If I press a new tab, it opens a whole selection of windows of recently browsed stuff, whereas I just want my search page repeated.

    Open a new window or tab. In the address bar, type '''''about:config'''''.
    If a warning screen comes up, press the '''''Be Careful''''' button.
    This is where Firefox finds information it needs to run.
    At the top of the screen is a search bar. Enter '''''browser.newtab.url'''''
    and press enter. '''''browser.newtab.url'''''
    tells Firefox what to show when a new tab is opened.
    If you want, right click and select '''''Modify'''''. You can change the
    setting to;<BR><BR>about:home (Firefox default home page),<BR>
    about:newtab (shows the sites most visited),<BR>
    about:blank (a blank page),<BR>
    or you can enter any web page you want.<BR><BR>
    The same instructions are used for the new window setting, listed as
    '''''browser.startup.homepage'''''.

  • When I open a PDF with Firefox 4 I get blank new tabs continuously opening without stop. How do I fix this?

    When I open a PDF with Firefox 4 I get blank new tabs continuously opening.

    See:
    * [[Firefox keeps opening many tabs or windows]]

  • I cant work out how when i open a new tab it opens with Google... simple but cant do it please help

    A simple one but cant do it
    all I want is each time I open up a new tab it opens in Google can do it
    please help

    Have you got some kind of search bar added as a plugin that you need to uninstall. I note an entry in your system details mentioning 'BLNBAR'.
    * see [[Searches are redirected to another site]] - also lists some sites of interest if you have malware problems
    * and [[Troubleshooting plugins#w_manually-uninstalling-a-plugin]] (includes instructions on how to manually uninstall)

  • When I start mozilla or open any link in a new window I get the desired page to load but an additional new tab page opens up along with it, fix?

    When I start mozilla or open any link in a new window I get the desired page to load but an additional new tab page opens up along with it. I've tried switching my homepage to different things (new tab, firefox home, show blank page) but I always get an additional new tab to open. How do I get only a single page to open?

    Hello,
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information. <br>
    '''Note''': ''This will cause you to lose any Extensions and some Preferences.''
    *Open websites will not be saved in Firefox versions lower than 25.
    To Reset Firefox do the following:
    '''For Firefox versions previous to 29.0:'''
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox"[[Image:Button reset]] button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    '''For Firefox 29.0 and above:'''
    #Click the menu button [[Image:New Fx Menu]], click help [[Image:Help-29]] and select ''Troubleshooting Information''.
    Now, a new tab containing your troubleshooting information should open.
    #At the top right corner of the page, you should see a button that says "Reset Firefox"[[Image:Button reset]]. Click on it.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • Whenever I open a new Firefox Browser, the other Firefox Browsers that I have minimized to the bottom of the screen all restore, (reopen up) onto the screen with the new opened Firefox Browser, how do I stop this? Just want the new one to open on screen

    Whenever I open a new Firefox Browser, the other Firefox Browsers that I have minimized to the bottom of the screen all restore, (reopen up) onto the screen with the new opened Firefox Browser, how do I stop this? Just want the new one to open on screen and the existing stay minimized.
    == This happened ==
    Every time Firefox opened
    == I think when a I updated or downloaded a newer version of FireFox at Firefox's suggestion.

    Hmm that does sound a bit strange - I use a system quite similar to yours (XP, FF 3.6.3), and don't see this behaviour.
    I would recommend trying to start Firefox in Firefox [[Safe Mode]] (make sure you close '''all''' running Firefox instances first), and see if this problem persists.
    If not, it could be some add-on causing this behaviour - restart Firefox in Safe Mode, disable all add-ons, and enable them one by one to find the guilty one.
    If it still happens in Firefox Safe Mode, some other program (or something in Windows itself) most likely is the cause. We may be able to help with this too, so let us know what works and provide as much additional information as possible to let us help you solve this.
    Please let us know how above works out, and if we can be of further assistance. Detailed feedback is appreciated and helps us to help you better, plus enables us to better help other users with similar issues.

  • Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc

    Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc.. Please Help!

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4.0+ SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    '''''If it is good in the Firefox SafeMode''''', your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes
    ''When you figure out what is causing that, please let us know. It might help other user's who have that problem.''

  • A new tab is opening when I click anything on a page. Options that should open within the same window are opening in a new tab. How do I fix this?

    I am currently using 16.0.2. I just did the update a day or two ago. Suddenly today, when I click anything on the page, it opens in a new tab. Just moving through the wizard options to get to this point in submitting this issue opened 7 tabs. How do I fix this? I only want new pages to open in new tabs. If I select 'Next Page' or perform a google search, I don't want a new tab to open. This is getting ridiculous. It's the third time this has happened.....always happens after an update from you guys.....and I can never find the fix in your support pages, and have to submit a question.

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do i get a new tab to open up with my home page after i click on the + at the end of the tab

    how do i get a new tab to open up with my home page after i click on the + at the end of the tab

    problem solved thak you Andy.c that was too easy and a fast reply i'm abit of an iliterate with these things

  • I,m using Firefox 7.0.1. I upgraded AVG to 2012.0.1831 Now when I open a new tab it opens to "AVG secure search" How do I get Firefox to open a new tab to a blank page?

    I'm running Firefox 7.0.1 on Windows 7
    I upgraded AVG to 2012.0.1831
    Now when I open a new tab it opens to the AVG secure search page
    This is not a problem but it irritates me
    How do I get a new tab to open to a blank page?

    You can look at one of these extensions:
    * NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    * New Tab Homepage : https://addons.mozilla.org/firefox/addon/new-tab-homepage/

  • How do I set new tabs to open with my home page

    When I open a new tab, it opens with bingle and I want it to open with Google, which is my home page.

    You can do that by using an add-on such as:
    * NewTabURL - https://addons.mozilla.org/firefox/addon/newtaburl
    * New Tab Homepage - https://addons.mozilla.org/firefox/addon/new-tab-homepage

  • How do you edit photos with photoshop from the new  Photos app?  The edit in external editor menu item seems to be gone.

    How do you edit photos with photoshop from the new  Photos app?  The edit in external editor menu item seems to be gone.

    Tell Apple what additional features you want in Photos via both http://www.apple.com/feedback/macosx.html and http://www.apple.com/feedback/iphoto.html  since they don't have a feedback page for Photos as yet.

Maybe you are looking for

  • VS2010 Error creating an application with Crystal Reports

    Hi I've loaded the RTM version for Crystal reports, but when I try to add a crystal reports  application as a new project I get an exception error as below. Error     1     Custom tool error: "Code generator 'ReportCodeGenerator' failed.  Exception s

  • Custom Font On Individual Row Items In A ComboBox Component

    Hello everyone, I am new to flash and I have spent many hours trying to get a particular piece of functionality to work. I am trying to create a combobox where the items listed in the combobox are font names and each item will display using the font

  • Source is not a permitted variable data objects

    Hi SCN, So we transported queries. Collected in manually and gouped by necessary objects. We're having a problem with our variables that holds a replacement path setting for clearing date, net due date and posting date. Replacement path for key using

  • The import Alert could not be found sdk 4.5.1 ????

    For some reason I switched my sdk in compiler options to 4.5.1 and most of my classes are not recognised in the import statements import mx.controls.Alert; import mx.controls.TextInput; import mx.events.FlexEvent; import mx.formatters.DateFormatter;

  • Keep opened socket connection?

    Hi, My Java application communicates with server on average every 3 seconds. I wonder if it is a good idea to keep an opened socket connection to the server and don't open new connection for each request. The problem with this is that if in the meant