ActionScript 3.0 :: External Swf Wont Stop Playing Sound?

Jun 28, 2011

I have created a form that has some buttons that open external swf files.Problem is when I close the external swf the audio keeps playing.If I turn off sounds the sound starts again when I load a new external swf.Here is the relevant portion of code;

function playMyMovie():void{ myrequest=new URLRequest(myMovie); myloader =new Loader(); myloader.load(myrequest); function movieLoaded(myevent:Event):void {  stage.addChild(myloader);  var mycontent:MovieClip=myevent.target.content;  mycontent.x=100; [code]....

View 15 Replies


Similar Posts:


ActionScript 1/2 :: Stop Other Sounds From Playing While Current Sound Is Playing?

Apr 10, 2011

I am creating a game that has 6 movieclips all on the main time line of the game. Each movie clip has three buttons that when clicked plays, pauses or stops a sound clip.When I press any of the sound clip play buttons that sound starts playing, the problem is when I click any of the other sound clip play buttons those sounds also start to play. Is there a way I can disable the other sound clip buttons while the current sound is playing then enable all of the buttons when the current sound has stopped.
 
This is the code that creates one of the sound objects

[Code]...

View 3 Replies

Stop The Playing Sound And Start Playing The Button?

Oct 3, 2009

So I made a few buttons with sounds within them and when I publish it they work just fine. But what I want them to do is;

Say I click a Button.The sound starts playing.Then I click it again, before the sounds done playing.I want it to stop the playing sound and start playing the button I just clicked on, whether it be the same button, or a different one.Right now it just ends up sounds like an echo because it'll play it as many times as you click it.

View 2 Replies

Professional :: Stop A Sound From Playing If It Is Playing Already

Dec 6, 2011

ok so i have a button that plays an animation for fire when held down. and when realsed goes to and stops and frame one. when it reaches the end of the time line it goes to and plays at frame 10 and goes back to the end of the timeline. I have a sound for the fire animation that plays for the effect. The problem is the sound keeps going untill its over even if the button isnt held down. and when the playhead reaches the end of the timeline it goes to and plays and frame 10 and it replays the sound. if i hold it down it will just keep playing the sound over and over from start to finish. what i want it to do it when i hold the button down i want it to play the sound and when released it stops the sound where ever it is at. I also dont the sound to play again if there is a sound already going to stop it from playing 20 sounds at one time it gets loud and you need asprin after about 5 seconds of that.

View 2 Replies

ActionScript 3.0 :: Stop Sound Before Playing The Next?

Mar 4, 2010

I have several buttons on the stage, each one will play an external sound file when clicked. If the user has clicked say button_1 and then clicks button_2, I need to stop the sound currently being played, before starting the sound from button_2

This is my code:

import flash.media.Sound;
import flash.media.SoundChannel;
import flash.net.URLRequest;
import flash.events.Event;

[code]....

So... how can I stop the sound currently being played, when the user clicks on the next button...

View 3 Replies

Flash :: Stop A Sound From Playing In As3?

Sep 14, 2011

I have this code in the second frame to play a song, and it works fine. The class of the sound in my library being "MySound". var snd:MySound = new MySound snd.play(); Now I need the song to stop playing from a latter frame.

View 1 Replies

ActionScript 3.0 :: Stop The FLV Sound, Not Playing In All Pages?

Jan 8, 2010

I followed a tutorial using AC3 and flash CS4, to build a website for myself. Want to have a video file in my site with back ground music and sound effect. I did fine doing it but there is some problem I cannot figure out. My movie clip starts nice but half way through when I go to other pages, the sound and music plays in all the other pages. I have zero knowledge about coding and English is my second language. How can I stop that playing in other pages? I am trying hard to see if someone had same problem like I do but can's find anyone posted any thing.This is the code I have for that page with video on it.

var modelingboardTween:Tween = new Tween(modelingboard_mc, "y", Elastic.easeOut, 710, 0, 3, true);
modelingboardTween.addEventListener(TweenEvent.MOT ION_FINISH,donePlaying);

[code]....

View 21 Replies

ActionScript 3.0 :: Cannot Get The Sound That Has Started Playing To Stop

Mar 30, 2010

i cannot get the sound that has started playing to stop.

Code:
var EdgenSound= new Edgen();
play_btn.addEventListener(MouseEvent.MOUSE_DOWN, playClick);
stop_btn.addEventListener(MouseEvent.MOUSE_DOWN, stopClick);

[code].....

View 4 Replies

ActionScript 3.0 :: Creating Button To Stop Playing Sound?

Dec 11, 2009

I'm trying to make a stop button to make it stop playing the sound. But I get an error saying:
TypeError: Error #1006: stop is not a function.
at sound/SoundStop()

Here is the function for my stop button:
function SoundStop(event:MouseEvent):void {
cs.stop();
isPlaying:false
}

View 5 Replies

ActionScript 2.0 :: Stop Audio Sound When Video Is Playing?

Jan 19, 2009

I want to stop my background music(audio) from playing when i click on a button which loads video[code]...

View 0 Replies

ActionScript 3.0 :: When Press Skip / It Stop At Next Frame But Sound Of Intro Still Playing

Nov 2, 2010

i've imported a flv video file to Flash for the intro and i create skip button to go next frame..but when i press skip..it stop at next frame but the sound of intro still playing.

View 3 Replies

Stop External SWF From Playing?

Jun 8, 2009

Ive got a project with a fairly complex arrangement of menus and a narrated tutorial of sorts that is large (in terms of Mb) compared to the menus themselves. Since the tutorial is likely to be played only once, if at all, I don't want to load the asset unless needed. To do this I'm using the following code to load an external swf (the tutorial) and attach it to an mc container (mc_launch). A loader bar will be added later but for now it works, except: if the user navigates away from the tutorial (jumps to another frame in the menu timeline) the audio of the child attached to the mc_launch continues to play even though the instance of the mc_launch is no longer on stage. Shouldn't all the child objects of the container go away once the instance of the container is gone? If not, do I specifically have to execute a mc_launch.removeChild(loader) before navigating away from the instance of mc_launch?[code]...

View 5 Replies

ActionScript 3.0 :: How To Stop External SWF From Playing

May 25, 2010

I am having a problem stopping external swf from playing. I am currently using FlashCS4 and publishing to Flash Player 10. I would really like to use the code
"loader.unloadAndStop();"
to stop the swf. I tried using it but I keep getting the following error:
1061: Call to a possibly undefined method unloadAndstop through a reference with static type flash.display:Loader.loader.unloadAndstop();

I read somewhere that since the swf files were published in Captivate (also using Flash player 10) I have to load the swf into a flash movieclip first then try the loader.unloadAndStop code.
fscommand("allowscale","false");
fscommand("showmenu","false");
//import flash.display.MovieClip;
var Xpos:Number = 220;var Ypos:Number = 105;
[Code] .....

View 7 Replies

Flash :: Sound Keeps Playing After External Swf Was Unloaded

Oct 14, 2010

I have a flash application, some kind of a play-list that loads external SWF video player (I don't have code access to that external file), so users can watch the video or skip to another one. When user switches to another video new SWF file is being loaded.

The problem: If user didn't finish watching the video and skips to the next then I unload previous SWF file (unloadAndStop()) and load a new one. And because the previous SWF was playing it is not actually unloaded, it is still playing on the background (I hear two audio tracks: current and previous).

View 1 Replies

ActionScript 3.0 :: Stop External Sound In External SWF

Jul 19, 2010

I am working on controls for an external swf. The external swf loads an external sound file. The structure at the moment is extswf.swf contains mcSound which loads soundfile.mp3. extswf.swf automatically starts playing when invoked. movieController contains the icons for the play/pause buttons. This is assigned CntlClass. CntlClass loads extswf.swf and controls the play and pause buttons.

So far, the play and pause buttons stop and start and stop the movie but not the sound. I know I need to access the sound channel from the external swf and use the sound transform to change the volume. How to access that channel is unknown. The examples I find have imbedded sound files. Also, the examples seem to use the main class for the external swf. My external swf doesn't have a class file, so I have no idea what the main class would be.

View 5 Replies

ActionScript 3.0 :: Stop Videos From Playing In External Swf?

Oct 14, 2011

I'm a newbie to as3 and flash and i have created a as3 slideshow that imports external swfs into movie clips to be viewed on the slideshow but one of my external swf is a videoplaye So my problem is that I want to video to stop playing when you click to the next slide here is my code for the mainswf and the slide swf[code]...

View 0 Replies

ActionScript 3.0 :: Playing External Sound Files In IPhone App

Mar 21, 2011

I'm porting a simple application from browser-based to iPhone. It plays some external sound files. There are 2 main steps:

1) Load an external XML file that contains sound file paths.
2) Load the sound files.

Can this be done with iPhone or do I need to move everything into the .fla file and then just publish it to iPhone?

View 3 Replies

ActionScript 3.0 :: Sound Doubling Up When Playing External MP3 Files?

Sep 25, 2009

I've created an audio player with actionscript 3 which plays one of 55 different sounds, depending on a variable set from which button a user clicks on. It works fine for the first 1 or 2 plays, but after that the sound begins to double-up, or even triple-up. I'm using the code below./First I declare a few variables:

var sound:Sound;
var controller:SoundChannel;
var pausePos:Number = 0;
var audioReset:Boolean = false;
var playerObject:Object = new Object();//

The sound functions are placed within another function so that it can be called again once a new button is selected:

function audiofunc() {

//if the user is selecting a second audio file, it runs this "audioReset function to try to clear the EventListeners[code]....

audiofunc(); I'm assuming that somehow an EventListener isn't getting removed, so it's causing a few versions of the audio file to play at once. If I trace the value of pausePos, it starts to appear in multiples (the same number, but 2, 3 or 4 times) after a few plays of the different audio files.

View 2 Replies

ActionScript 2.0 :: In That External Swf Want To Stop It From Playing And Also Make A Play_btn Appear S?

Jul 28, 2009

Ok, so I have a main swf that loads an external swf into a movie clip called container_mc.In that external swf I want to stop it from playing and also make a play_btn appear so that the user may start it going again when they are ready. In my main swf I made this function:

ActionScript Code:
function pauseMovie(){
trace("movie paused");

[code]......

View 1 Replies

ActionScript 3.0 :: Stop Sound In An External Swf?

Feb 1, 2009

I'm using external swf in a project, and I got one swf with startup audio play, I can't stop the sound to play when I load another swf via this code :

Code:
clearButtons();
TweenLite.to(m.target, 0.5, {tint:0xcc0000});
m.target.mouseEnabled = false;

[Code]....

View 4 Replies

ActionScript 3.0 :: Stop A Sound In Loaded External SWF?

Dec 29, 2009

I'm loading an external swf file that has some sounds in it (to the main swf). The swf contents never leave the movie but it does get pushed to the site when it's not in view.

The user can bring it back in view by pressing on a left/right button. So when it's not in view... or tweening out of view I need the sounds to stop.

Since the loaded swf is never unloaded, what should I look at to accomplish this... communicating with the loaded swf, etc?

View 5 Replies

ActionScript 3.0 :: Linking External Swf - Stop The Graveyard From Playing Once The New Level Is Accessed?

Apr 1, 2011

I am creating a vertical shooter game for one of my assessments. There are 4 levels in the game, the object of each level is to shoot as many enemies (spawn via an external as file) to build up your score before the time runs out. Once the time reaches zero, you get linked to the next level. The first level is called the graveyard which has skulls as enemies. Once the time reaches zero, this swf automatically links to the next level which is called haunted_house.swf. The only problem is the skulls from the first level continue to spawn on the new level. How do I stop this? The coding for the timer and to link the first level to the next is below:
 
[CODE]...

View 2 Replies

ActionScript 2.0 :: Start/stop/pause A Sound In External Swf?

Jan 15, 2010

I'va any troubles in controlling sound in an external swf. I need to stop/play/pause it. I've put the sound file on the timeline of the external swf and I want to control it from tha main movie in wich I've load it. the swfs are made using AS2.0

View 2 Replies

Actionscript 3.0 :: Unload Loader Wont Stop Sound From External SWF?

Mar 24, 2010

I have a menu on my main page where i can choose some videos to play, these videos are in external SWFs that are loaded in and displayed using Loader, URLrequest etc.. etc..

I have a close button on my external swf that sends a dispatchEvent to an eventListener on my homepage to close the external SWF however the sound from the video in the external swf is still audible even though the visual is gone

heres the code

main page code
Code: Select all
function playVideo(e:MouseEvent):void{
//stop maipage sound
channel.stop();

[Code]......

View 2 Replies

Actionscript 3.0 :: If Press Play Button While The Sound Is Already Playing It Has The Same Song Playing In The Background

Nov 13, 2010

I have a sound clip that I'm loading externally into my flash file. The code I'm using looks like this and is placed in the as layer on the first frame,

var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
var lastPosition:Number = 0;
mySound.load(new URLRequest("introaudio.mp3"));
myChannel = mySound.play();
[Code]....

View 14 Replies

Professional :: Playing Scenes In Test Movie Animations Stop Playing?

Dec 4, 2011

I am using AS2 in CS5.5.I am creating a project for a class that introduced me to adobe flash.  The issue is I have gotten to a certain point about 15 scenes.  During say the 15th scene scrolling through the timeline animations works fine, playing it on test scene works fine.  When I go to play it on test movie it stops at a certain point.  At first I thought it might have been a misplaced stop action but there is none to be found.  The weird part is every other scene I create after that continues to freeze as well, the images are there, but the animations won't play.  All my previous animations play before those with the issue, it's justThese new ones won't play for some reason in test movie, but work completely fine in test scene and the timeline.

View 4 Replies

ActionScript 3.0 :: MP3 - Stop Whatever Song Is Playing And Start Playing The New One?

Apr 13, 2010

The problem I have is I click the play button and start playing. Then I click next and when I click play for another song the songs overlap. How can I stop whatever song is playing and start playing the new one? Has to stop the prev song when I click play_brn.

[Code]...

View 2 Replies

Flash :: Playing Sound From Data Acquired From Sound.extract()?

Aug 1, 2011

I'm trying to play a sound using a technique found here (play the sound by sampling raw sound data gathered from the original with extract()), with the difference that the mp3 sound is embedded in the swf, not loaded externally. This is my code:

var soundBytes:ByteArray = new ByteArray();
var mp3sound:Sound = Sound(new Sound1_design()); // this is the embedded sound
mp3sound.extract(soundBytes, int.MAX_VALUE);

[Code]....

This works, in a way, except that the resulting sound is distorted (it has a kind of a metallic ring).

View 1 Replies

ActionScript 2.0 :: [FMX] LoadSound - Sound To Keep Playing While The Rollovers Load Sound

Jun 22, 2003

I am loading small sounds dynamically with the loadSound command. These small sounds are activated with a rollover. see script below. This works ok. however. i want the first sound to keep playing while the rollovers load sound. a bit like playing the piano. This works ok when i import all the sounds into the library and place them on their very own button. however the size of the flash movie increases to 140k. whereas when i load them dynamically the size of the movie is 20k. obviously i want to load dynamically.

But with dynamic loading each sound stops when another sound is rolled over, so that there is only ever one sound playing at once. I need to load the sound into a different level or something, so that the first sound can keep going while the smaller, shorter sounds play over the top. this is my script below. The first sound loads when the movie starts. This is the one i want to keep playing. Then there are the smaller ones with rollovers. does this make any sense? there's actually 13 little sounds.

[Code]...

View 3 Replies

ActionScript 3.0 :: Assign A Sound To A Soundchannel Without Playing The Sound?

May 4, 2011

The thing I don't understand is how to assign a sound to a soundchannel without playing the sound. All the examples I've seen do this.

Code:
_SoundChannel = _sound.play();
_SoundChannel.stop();

And how can I set a SoundChannel volume to zero before allocating a sound to it?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved