Actionscript 2.0 :: Stopping Flash Sound On Browser Window Change?
Apr 4, 2008
what to call the subject of this post, but here's the scenario...I have sounds playing in a browser window via my SWF file.When I open a new application window (browser window (etc.)) above the SWF's window,the sound continues to play in the back.Is there any way to detect when a user changes focus from the SWF window to a another? My goal is to silence these wacky sounds when the Flash isn't the current focus.
View 1 Replies
Similar Posts:
Feb 27, 2003
Here's the situation. You have a HTML file (A), which contains a Flash file with some background music looping, and a button which activates a HTML pop-up window (B).Now. Is there any possibillity by actions script, java, anything; to mute the sound when you leave HTML file A and go to B, and then un-mute the sound when you later return to A
View 2 Replies
Jul 29, 2010
I cannot seem to get the following to work:
In flash (as2):
Actionscript Code:
getURL("JavaScript:changeTitle('Hello!')");
in browser:
PHP Code:
<script language="javascript">
<!--
function changeTitle(t){
[Code]....
The result is - the page title stays the same, there are no errors - but i do get an alert that says "changed! Hello!" So the function is being fired, and the variable is being sent. It just will not change the page title.
If i call the function in javascript - so just under the function add - changeTitle("good") - it works fine, changing the title.
View 8 Replies
Apr 13, 2005
I'm a bit of a newbie, wondering how this scaling effect is possible. See www.sagmeister.com - when you scale your browser window, the entire site interactively shrinks or enlarges to fit. How is this done with Flash MX? Is it a publishing option or an actionscript or what?
View 8 Replies
Oct 27, 2010
The title essentially is the question, how do I open the .swf without the browser's control bar junk? and maximize the window?
View 2 Replies
Apr 10, 2012
i'm using this a tutorial of republic of code to play sound and it works well for short sounds on there own however i'm trying to stop a song from playing when i click a button but i dont understand how it works. i know i have to use SoundChannel Class but i dont know what this is or how to use it. i use this to play my sounds.
var mySound2:Sound = new BgSong();
mySound2.play();
how would i get this to work using SoundChannel Class im confused.
View 1 Replies
Dec 16, 2009
I have a Flash piece that has one main timeline that loads different movie clips and different sections of that main timeline.
On those embedded movie clips within the main timeline are sounds attached to the embedded movieclips timelines set to "stream". They have to be on the timeline so they sync up correctly (I can't load the sounds programatically).
I'm having the issue that when I navigate to a new section on the main timeline, the movieclip that was embedded on the timeline I navigated away from goes away, but the sound continues to play. I can't figure out how to get the sound to stop once I've navigated away.
I can't add a stop all sounds because the navigation of the movie is controlled from an external player I don't have control over (basically the external player just calls a gotoAndStop("myFrame") on the movie.)
View 6 Replies
Oct 13, 2009
created a simple MP3 audio player, not dissimilar to the popular wordpress audio player seen here (ie, the mp3 is loaded via url like mp3player.swf?filename=mysong.mp3)With this audio player, if it is used multiple times on the same page, only one can actively play a song, which avoids multiple songs playing simultaneously. If you attempt to open more than one, the last one will play and the previous one will automatically stop playing the song and revert to a "closed" state.With regards to automatically stopping previous instances from playing in the background, my question is how do I achieve this same effect with actionscript?
View 2 Replies
Oct 30, 2009
i have a flash site that links to PDF's with the navigateToURL function which works etc But now i would like Link to rather open up a download window instead of just a new browser window?
View 3 Replies
Apr 14, 2005
I have a standalone Flash projector running off CD. Currently, I use
getURL("http:url....);
to open the page on default browser. Only problem is the browser window is opening at the size it was last used. I like to see it opens full screen.
View 2 Replies
Mar 30, 2009
i've made a flash movie in res 600 * 300, now i want to keep this res don't want the user to be able to expand the browser window or change the res or anything how do i do this?
View 9 Replies
May 24, 2010
Trying to detect a browser close event and send some data to the database when the user closes the browser window...but can't seem to get it to work.[code]
View 6 Replies
Nov 9, 2009
I have looked around for this and haven't found a way that clearly explains how to do this. More often than not the button will close the browser window in one but not another browser.
Is the a simple way of closing a browser window in all types of browser ( Or mainly Firefox, IE and safari on both Mac and PC ) with actionscript?
View 0 Replies
Nov 9, 2009
often than not the button will close the browser window in one but not another browser.Is the a simple way of closing a browser window in all types of browser( Or mainly Firefox, IE and safari on both Mac and PC ) with actionscript?
View 5 Replies
Feb 15, 2011
I'm running an online game site, and a few websites are really bad about embedding some of my games and stealing bandwidth.
To combat this, I replaced the original files with super-simple .swf files that redirected back to my own websites -- thus stealing back the traffic that they were stealing from me.
The problem came later when something changed with the new Flash player, and new windows no longer opened. For the life of me, I can't figure out how to get new windows to open. I've tried a few different approaches, but nothing appears to work.
So what I'm wondering is, can this even be done anymore -- where I can switch out a .swf that's being leeched with one that opens a window to my own site?
View 8 Replies
Jun 15, 2009
I am currently trying to work out how to get Flash to close the browser window it is running in. I've done a simple Javascript test version which works fine.. But if I try and use:
ExternalInterface.call("closeMyWindow");
Functionality it does not. My simple Javascript version is cut and paste below and attached to this message.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]"><html>
<head><title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<meta name="description" content="" />
[Code] ....
Attachments: jsclose.html (630 bytes)
View 8 Replies
May 16, 2011
Can I get the obtain the size of the browser window in AS3?The best method I've found is to get the size with Javascript and send it to Flash as a FlashVar. One limitation of this method is that it doesn't give the current size if the window is resized.Is there a pure Flash way to do this?
View 2 Replies
Apr 25, 2011
I am building a kiosk app in flash and need to open browser windows whenever there is a URL link. The problem is that when the browser window opens, the fullscreen flash becomes a resizable window and the user has to close the window and open the flash app again to make it full screen again. So i'm wondering if there's any way I can open a browser window within the flash app sort of like an iframe or lightbox pop up? I've heard of this Native Window thing but I'm not sure what that is.
View 1 Replies
May 23, 2009
I'm using Adobe Flash CS4 on Mac (windows i'm sure i can figure out how to fix it on the mac version)I'm trying to sync some animation to sound, and my sound is all in one big file. I'm wanting to go through frame by frame and tweak it (Yes, it's a frame by frame animation, no tweening here don't ask why, it's just not), anyways, I keep trying to use the "Control -> Play" button to keep playing the sound from the area I'm working on so I don't have to start at the beginning everytime. After I hear the section I want, I want to just push "stop" and everything stop, including the audio. It would stop everything before, but now it's not stopping the audio so it will just keep playing even though I had hit stop.?
View 1 Replies
Apr 21, 2010
I am trying to get music to play continuously, it works, but everytime you click on a button, the song restarts on the new frame.The sound code is on frame 1, and is loaded from and external file.[code]...
View 17 Replies
Mar 14, 2012
just looking to stop one sound without stopping all sounds with a buton click
View 11 Replies
Jan 27, 2009
I have several swf files which are completed screencasts with voice overs, which I need to integrate into a flash application to distribute on CD to new students.
To play the screencasts in my flash file, I'm navigating to a new frame for each one which has a movie clip on it (instance name myscu3 for example). The myscu3 movieclip has about 20 frames of animation to grey out the screen behind, and then a couple of frames with actionscript on them, which 1) first frame shows a loading screen while the screencast swf is loading via a Loader and then navigates to the 2) second frame where the screencast coords are set and addChild is used to show the screencast via the Loader.
All works fine EXCEPT ... if I navigate away from the parent timeline frame where the myscu3 clip is ... the screencast disappears (as it should, as the myscu3 clip isn't on other frames, but if the screencast hasn't finished playing before I navigate away, the sound keeps playing.
how to stop the sound playing, as the loader is in the child movieclip, and the navigation away from the frame containing it is accomplished by clicking on any of the tabs at the side (on the main timeline). Any ideas? Is there actionscript code which will just stop any current sound playing (without stopping the ability to play sound) which I could add into the tabs navigation code?
View 1 Replies
Feb 23, 2011
if you go to [url]....you will notice that you can not scroll the browser window with your mouse wheel if the cursor is over the flash object (entire website is one object). I need to make it so scrolling always affects the browser no matter the state of the cursor.
View 4 Replies
Jan 22, 2010
I wish to open a new browser window from Flash and when the new window closes to return to the location from whence I started.
View 1 Replies
Feb 16, 2012
My flash program isn't using the full browser window, even while in full-screen mode. It uses the full height but not the full width. I end up with a large chunk of white space. I have the following code for full-screen mode:
[Code]....
So the problem is that the stage's width isn't the full size of the browser. I'm using Flash Builder 4.6 is there a way to set the stage's parameters to allow for true full-screen?
View 1 Replies
Oct 31, 2009
I am trying to open a new browser window from within my Flash app. To do this, I am using the line:[URL]..The problem is that when I test the code from in Flash CS4 nothing happens! It's like the line of code isn't there. But when I manually open the .html file which Flash CS4 generated that embeds my .swf, then the Flash app opens in my browser and promptly opens a new window to yahoo juat like it should, so it does not seem to be an AS3 syntax issue. I just got a new computer yesterday, with a fresh install of Flash CS4. I do not have this problem on my old computer. The old computer runs the code perfectly. Could there be some weird default security settings at work here in Flash CS4?
Does anyone have any experience with this sort of problem, or any clue what might be happening?
View 1 Replies
Mar 11, 2010
I simply want to close the browser window from Flash. The browser window may or may not be a popUp window.
This is what I have, but it is not working:
ActionScript Code:
public function closeBrowser(e:MouseEvent):void {
var req:URLRequest = new URLRequest("javascript:window.opener='x';window.close();");
navigateToURL (req);
}
View 7 Replies
Jun 10, 2011
how to close the browser from the flash window?
View 1 Replies
Mar 18, 2010
I'm trying to simply close a Browser window from within flash... code below:
Code:
closeButton_mc.addEventListener(MouseEvent.MOUSE_UP,closeWindow);
//
function closeWindow(p_evt:MouseEvent){[code]....
When the button is clicked, the code seems to open a new browser window then close it immediately, looks like a flicker on the screen.
View 5 Replies
Jan 30, 2009
I want to use a button to stop just 1 single sound. (Ill have a background track playing, and a voice over on top, and want a button to stop just the voice.) I was able to get an mc with 2 frames inside with 2 buttons and have this code:
on (release) {
tellTarget ("../sound") {
stopAllSounds();
}
}
on (release) {
nextFrame();
}
That will work but it stops all sounds. Can i stop just the "../sound" portion??
View 2 Replies