ActionScript 2.0 :: Sound Object - Specifying Only Certain Audio To Stop

Nov 14, 2005

I am creating a flash project which contains video on a few pages. The project also contains background music which loops continuously. The goal is to have the background music stop whenever the user is on a page containing video and for the music to play again when the user leaves said page. The script I created works to stop the music, but it also stops the audio contained within the video and causes the video player (by proxxus) to lock up.

Here's the setup:
Library:
music.wav - linkage = "myMusic01"

Main Timeline:
Code:
//-- create a variable to determine if the current movie contains video
var currMovie:String = "notVideo";
//-- start playing sound object
myMusicMc.myMusic.start(0, 999);
[Code] .....

On the actions layer of the movie clip containing my navigation controls snippet of the callback used
Code:
videoLink_mc.onRelease = function() {
_parent.prodDetail_mc.gotoAndPlay("video");
_root.currMovie="Video";
}
on all the other buttons currMovie is set to "notVideo".

View 12 Replies


Similar Posts:


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

Flash :: Multiple Audio Files One Sound Object?

Nov 11, 2010

Is it possible to play multiple sound files using a single sound object? (I've looked into this back when I was using Flash CS3, but I want to know if anything has changed.)

(I'm trying to make a playlist which will play music in the background of my SWF movie and then have a frame where users can change the song and the volume.)

View 2 Replies

Audio :: Extract Sound Object To A Mono Byte Array In AS3?

Jan 18, 2012

I'm trying to prepend the byte array of a sound object to a captured microphone sound byte array.

It works, but the extracted sound object get pichted down and doubled in length. I guess this is because the byte array of the sound object is in stereo, while the mic byte array is in mono.

I have this:

sound.extract(myByteArray, extract);

myByteArray now contains the stereo data. How can I turn this to mono

UPDATE:

Here's a working solution:

existingByte.position = 0;
var mono : ByteArray = new ByteArray();
while(existingByte.bytesAvailable) {

[Coe]....

View 1 Replies

ActionScript 1/2 :: AS2 Independent Volume Control Of Sound Object And Streaming Audio

Mar 8, 2010

I've got a presentation that features an audio loop for background music and streaming audio on the timeline for the voice over.When I try to lower the volume of the background music (sound object), it also effects the voice over (streaming).I'm a total novice, so try to use laymen's terms.[code]And this is on the Frame that contains the movieclip with the voice over.I'm trying to fade the background music ONLY:[code]

View 10 Replies

ActionScript 3.0 :: Stop Sound When Object Stops Animating At End Of Stage?

Nov 14, 2011

I am trying to make the sleigh bell sound stop when my object(santa) reaches the end of stage. First of all, I don't exacly know how to write an if statement, second I get an error when I try to stop the sound.

var mySound:Sound = new bellsSound();
mySound.play();
var myTween:Tween = new Tween(santa, "x", Regular.easeOut, -100, 810, 25, true);
addChild(santa);

[Code]...

View 13 Replies

CS4 Media Encoder Audio - Audio Sound Stops After A Few Seconds From The Beginning?

Aug 4, 2009

I am converting from .FLV's to .F4V. Video outputs fine but the audio sound stops after a few seconds from the beginning.I have tried many different settings for the audio with no luck. Also, tried on a colleague's machine who is running CS3, which works fine, so something is buggy in CS4...

View 1 Replies

Flash :: Start And Stop Audio From The Middle Of Audio Track?

Apr 25, 2011

I have a single audio file, I'd like to avoid cutting it up.

I know I can use the sound class, mySound.play(150), to start at 150ms but haven't come across a way to stop the audio say after 500ms or at 650ms.

View 2 Replies

Media Server :: Send Sound With Stream (both Sound And Mic Audio)?

Oct 6, 2011

I have a broadcasting project that I've got where the host of the show can have multiple sound effects they can use on their show.I'm wondering if the only way to go about this is for all the clients listening to the show need to download the mp3 of that sound effect or if the sound effect could come from the host ...like combining his mic (for his voice) but also straight audio (the sound effect) into the stream.

View 1 Replies

ActionScript 3.0 :: Stop Button Sound But Not Main Background Sound?

Aug 5, 2010

I have a bit of a problem with sound.. I have a main container animation with background sound that's loaded with soundChannel..I also have an externally loaded SWFs with Movie Clip buttons that have a sound ON ROLLOVER on the timeline..after rolling off - I place the:SoundMixer.stopAll();to stop the button from playing the sound once the mouse is rolled off.. However, the problem I'm running into is that it also stops the sound of the main container movie cli

View 1 Replies

ActionScript 2.0 :: Sound - Stop Button To Allow The User To Stop Mid Song

Mar 13, 2007

i have programed a play button using:

[Code]...

now i am trying to program the stop button to allow the user to stop mid song....

View 4 Replies

Sound Stop All Sounds Works / Then Sound Starts Again?

Jan 5, 2010

I am using FLASH CS3.I have gone through many posts, seems to be an issue with many people.Still haven't come across a fix.Website made in FLASH. Flash movie loads and sound works great!I have a button with 'StopAllSounds' action script.[code]When I go back to main page... sound starts up again.Is there a way I can stop all sound regardless of where the visitor goes on the website?

View 2 Replies

Stop Sound From Going Into Next Scene While Keeping Button Sound?

Oct 19, 2010

I'm sure this is a common problem, I tried looking around on the forum for a problem like mine but was unable to find anything. I'm using Flash CS3, Actionscript 2.0, and am making a soundboard. I have two scenes, one that's the title screen, of which has a sound file loaded via the timeline, (I think) set to Event and Loop, and a button which takes you to the next scene and makes a short sound when it's pressed. My second scene has background music as well, also set to Event and Loop.

Problem is that when I press the button, the background music keeps playing into the next scene. I tried using putting stopAllSounds onto the button, but that makes the sound of the button stop as well, and I'd really like to keep it. I've been messing with this for days, and I can't figure it out.

View 3 Replies

ActionScript 2.0 :: Play Sound/stop Sound Button?

Feb 13, 2007

i want to make a single button to play a sound, and if pressed again, stop the sound. and if pressed again, play the sound, and so on...
i know it has to be made with a boolean variable, true/false, but i just can't figure out how.

View 13 Replies

ActionScript 3.0 :: NetStream Choppy - Make A Character Start To Talk When The Sound Starts And Stop Talk When The Sound Stops

Aug 5, 2010

Need to make a character start to talk when the sound starts and stop talk when the sound stops so I'm using this:

[Code]...

View 2 Replies

Flash :: Dynamically Create New Sound Objects Based On Raw WAV / DATA Or Other Sound Object?

Jan 31, 2012

Is there any AS3 library or code-snippet that can create altered versions of a Sound object on-the-fly (at runtime)? Either based on:

An existing Sound object; A ByteArray object;

For example, say you have a "dry" sound of a gun-shot. You could:

[Code]...

View 1 Replies

Actionscript 3 :: Sound.extract Method Empties Sound Object Data

May 20, 2011

I am using the following to extract the byte info from a sound object - however if I go back to the same sound object and run this again, The byteArray has no bytes available.

var data:ByteArray = new ByteArray;
sound.extract(data,sound.length*44.1);
data.position = 0;
return data;

Is this the correct behavior? Is there not a way to do this multiple times on the same sound object?

View 3 Replies

ActionScript 2.0 :: F8 - Attach Sound Object To A Separate Mc To Control Independently From All Other Sound / Root Volumes

Mar 15, 2008

I have been at this for about 19 hours straight! I am going to go to bed immediately after this post, but for crying out loud, I have NEVER had this problem before today! Before anyone reads ahead and says 'you have to attach your sound object to a completely separate mc to be able to control it independently from all other sound/root volumes.' see if the following code accomplishes just that:

[Code]...

View 2 Replies

Audio Won't Stop When Previewing?

Jun 24, 2009

So, I have a 3 minute mp3 file on my stage; the idea is to provide background music for my animation. So I go to preview the animation, and everything works fine, until I stop the preview. Then the audio keeps playing on and on. If I hit the preview again, obviously the music starts up again, and then won't stop, in a vicious circle of death that has me fleeing from the room.
 
To make it clear, I'm not previewing the audio file, I'm previewing the entire animation with the audio file on the stage. 

View 1 Replies

Flash - Take Two Sound Objects And Combine Them Into One Sound Object

Nov 15, 2010

Is it possible to take two Sound objects and combine them into one Sound object so that one Sound plays, and then the second plays right after it? I can just play the first Sound and then the next right after it, but it would be much cleaner to combine them before playing the audio.

View 1 Replies

ActionScript 2.0 :: Streaming Sound Distorted - Sound Object?

Jun 14, 2004

I have a streaming sound that is loaded into my flash movie (will end up on CD) that is very distorted, it sounds like someone is slowing down the audio, the voice sounds deep and slow

View 1 Replies

ActionScript 2.0 :: Play Sound Like "stop All Sound" Option In Flash?

May 17, 2003

I want to use a sound loop in my flash movie. The movie has many scenes. And the problem is that when I go to next scene or different scene I hear the sound repeating twice. I mean sound does not stop from first scene and begins from the different scenes.Is there any way to play sound like "stop all sound" option in Flash.

View 6 Replies

ActionScript 3.0 :: Audio Will Not Stop Playing?

Aug 3, 2009

I made a simple audio player following a tutorial on Youtube. It seems pretty good, except that the tutorial just starts and stops the sound file. I need it to be playing and for it to pause and resume.As it stands now, the music does play, but the pause button does nothing.Here is the script:

Code:
var loadSnd:URLRequest = new URLRequest("http://jeffreyworthington.com/intro_music.mp3");
var thisSnd:Sound = new Sound();

[code].....

View 6 Replies

ActionScript 3.0 :: Audio Keeps Repeating And Won't Stop

Dec 14, 2011

I have a .fla that plays music until a certain text object (start_course_txt_mc) is visible. Then I want the music to stop and the narration to begin. I can get all that to happen. The problem is that the narration keeps playing over and over, but it is only playing about 3-4 seconds of an audio file that is about 30 seconds long.

function unBlur()
{
var my_bf:BlurFilter = new BlurFilter(0,0,1);

[code]....

View 3 Replies

IDE :: Get The Button To Stop Both Audio And Visual?

May 10, 2009

creating a button within a movie clip that will pause both the images (bmps) on the screen and the sound, which is being loaded by AS3.Here's the code for my sound.

Code:
//This assigns an abreviated name to the StorySongBook class which is inside the StorySongBook.mp3 properties.
var sbs:StorybookSong = new StorybookSong();[code].....

How do I assign this to a button on the stage though (event listener?) and get the button to stop both audio and visual?

View 2 Replies

IDE :: How To Stop Flash Video Audio

Jul 6, 2009

I have a video on my site (progressive download, flv file, imported using flash cs3 video encoder) and I used the FLVPlayback component with a simple skin. The video works great, my only problem is that I want the sound to stop when I click on other buttons on the page. The way I designed the site (maybe not a great set up) everything is in one big swf file, so when you click on another button on the page to show another project, the sound from the video file (that is no longer showing) is still playing.URL...

View 10 Replies

ActionScript 3.0 :: Sound Mixer - Mix Several Audio Streams?

Nov 12, 2008

Is it possible to mix several audio streams? I want to play several audio tracks simultaneously, but several factors that are at times, the audio tracks are out of sync, such as latency Sound.play method, the for loop, the spec of users PC, FLash Player version, operating system etc

View 1 Replies

Javascript :: The Best Scripting Language For Web Audio / Sound

Jul 1, 2010

I'm looking to start learning a scripting language for web audio and sound development. It needs to be able to handle simultaneous audio events, eg; to trigger a sound when another is playing (I'm not sure if and how this is possible, but have witnessed this kind of presentation: [URL] (can this kind of thing be done with JavaScipt?, this looks like AS / Flash)).

From what I can tell the choice appears to be between JavaScript (JS) and ActionScript (JS), with details as follows: - If going the JS route (look into JS and HTML(5) audio capability) Learn about the basics of HTML and CSS, and then start to look into JavaScript, Ajax, and JQurey (library / framework for JavaScript). If going the AS route Will not need to know as much about HTML and CSS. AS is the language behind Flash. Not supported on the i-phone(?) I know Java to around an intermmediate level.

[Code]...

View 3 Replies

Android :: APK File - No Sound When Streaming Audio In AIR

Jan 28, 2012

I'm working on an app to stream audio from shoutcast. The streaming goes well on my computer and when debugging it with an Android-configuration. But when I deploy it to an APK-file and run it on a Samsung Galaxy S, the streaming doesn't work.

My code for streaming the audio:
var urlRequest:URLRequest = new URLRequest("http://.../;");
var soundContext:SoundLoaderContext = new SoundLoaderContext(2000, true);
soundChannel = new SoundChannel();
sound = new Sound(urlRequest, soundContext);
soundChannel = sound.play();

I've also tried an addEventListener(Event.COMPLETE), it seems my app doesn't get there when running on a Samsung Galaxy.

View 1 Replies

ActionScript 2.0 :: [CS3/CS4] Loading Audio From XML, Sound Won't Play

Sep 8, 2009

I've been working on a Flash/XML audio player and have been struggling with getting the audio to stream. Right now I have Flash create a list of songs based on the loaded XML file, which works, and I want to be able to click on one of the listed items for the song to start playing. When an item is clicked on, Flash will trace out a message from an onLoad command, but the audio never starts playing.

I opened a new Flash file to test the non-working segment of code and I still can't get it to co-operate.

Code:
var currentsong:Sound = new Sound();
currentsong.loadSound("http://www.vtspencer.com/recordjackets/beta/media/file_11.m4a",true);

[Code]...

All that happens is that the trace saying "Should be playing" comes through. The music still won't start.

View 1 Replies







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