ActionScript 3.0 :: Return The Sound Name That Is Currently Playing Through A Channel?

Sep 23, 2009

Does anybody know a way to detect what audio is currently being played through a sound channel. i.e. if I set a sound name to "_hitting", and attach this to "mySoundChannel", then mySoundChannel = _hitting.play(); is there any request that will tell me that "_hitting" is being played?

View 2 Replies


Similar Posts:


Actionscript :: Flex - Sound Channel Is Only Playing In Firefox

Jan 13, 2011

I have made a little mashup mixing maps, translate api and flickr. I get the directions from my map and make mp3 files on the fly to play them at the same time but they only play in firefox and for the rest of the browsers I only get my first sound channel with background music. can't figure out why.

[Code]...

View 1 Replies

ActionScript 3.0 :: Sound Channel - Sound Doesn't Work?

Dec 5, 2010

The code seems OK but I can't hear the sound. I have it in the fla/swf and exported etc... I suppose something in this code is wrong. Haven't coded for ages - bit rusty I'm afraid.

[Code].....

View 3 Replies

Flash :: Use A Sound Channel On A Movieclip?

Apr 1, 2011

The only way i can describe this is showing the code I have already then trying to explain what i want to do.Basically, I am creating a soundboard game, where at the bottom of the screen I will have a bar which is a movieclip, and I will be dragging other movieclips onto it and then clicking pay, and using an array and .push they will play in order. I am trying to put the sounds onto the movieclips using code.[code]...

View 2 Replies

ActionScript 3.0 :: Playing Video With Alpha Channel - Objects Behind Clickable

Jul 30, 2011

I have a Video object which plays a video with an alpha channel. There are objects behind the Video object which I'd like to allow the user to interact with, so if someone mouses over the playing video nothing happens but if they mouse over objects in the background, something happens. Is this possible?

View 3 Replies

ActionScript 3.0 :: Play / Pause Sound Channel?

Jan 8, 2010

The pause button in my MP3 player resets the track to the beginning, there is something wrong with my sound channel because when i trace the position it is always zero.[code]...

View 1 Replies

AS3 :: Flash - SoundChannel, RemoveEventHandler - Use The Sound Channel?

Apr 5, 2010

Is there a better way to use the sound channel is AS3?

var mySound:Sound = new Sound();
playButton.addEventListener (MouseEvent.CLICK, myPlayButtonHandler);
var myChannel:SoundChannel = new SoundChannel();
function myPlayButtonHandler (e:MouseEvent):void {

[code]....

View 2 Replies

Flash :: AS3: Analyzing Sound Spectrum One By One, One Channel At Once

Sep 14, 2011

I know the SoundMixer.computeSpectrum and Sound.extract() methods , but those methods deal with the total sound output. Instead, is there a way to deal with every single SoundChannel, so as to provide a graphical visualization of each of them?

View 1 Replies

ActionScript 3.0 :: Changing Volume Of Sound In Channel?

May 27, 2011

Cannot read property (or target) a Sound thats playing in a SoundChannel.... in this case I am refering to a class the extends the Sound class (SoundEffect class), that is currently playing in a SoundChannel. Each SoundEffect has a volumeLevel property that I would like to restore once I have unmuted the SoundEffect's in my application. I cannot figure out how to target that property once its playing in the Channel.I am extending the Sound class:

ActionScript Code:
public class SoundEffect extends Sound {
public var ID:String;

[code].....

View 9 Replies

ActionScript 3.0 :: Sound Channel Won't Construct If Speakers Are Not Present

Sep 1, 2009

I built an application on Windows XP and Vista. And it seems that the sound channel constructor decides not to run with no speakers attached. Runs fine when headphones are plugged in, but when no speaker device is present the Sound object is constructed, but the Sound Channel never seems to make it.

I did some testing and even the most basic Sound Constructor fails to create the default sound channel if there are no speakers connected.

In the following example channel turns up as null if no speakers are present on a Windows machine. I/O Error doesn't throw anything for me either.

This is a modified version of the example from the Adobe Docs:

Code:
private var channel:SoundChannel;
public function sound_test(){
var request:URLRequest = new URLRequest("audio.mp3");

[Code]...

View 3 Replies

Actionscript 3.0 :: Sound Channel Won't Construct When Speakers Are Not Present

Aug 26, 2009

I built an application on Windows XP and Vista. And it seems that the sound channel constructor decides not to run with no speakers attached. Runs fine when headphones are plugged in, but when no speaker device is present the Sound object is constructed, but the Sound Channel never seems to make it.

View 1 Replies

Flash :: Audio - Using One Sound Channel To Play Through An Array Of Sounds

May 26, 2011

I Am wondering if is possible to use one sound channel to play through an array of sounds? Perhaps by using a complete event or other means?

View 1 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

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

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

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 :: 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

Professional :: Unload Swf After Done Playing And Return To Initial Frame In Containing Swf

Nov 18, 2010

I have a Flash animation that loads a quick animation and then on a button click loads and external swf while at the same time moves the playhead on the timeline to frame 2 so that it has a blank stage to play on. The external swf then loads and plays. At the end of the external swf's animation I would like it to unload and then return to frame one of the containing movie. I am assuming that on the last frame of the external swf I should be putting some actionscript that will unload the movie and then talk to the initial containing flash telling it to return to frame 1.
 
The main swf button that loads the external swf is using a code snippet from the AS3 CS5 library and looks like this...

[Code]....

It is also using gotoAndStop(2); for the same button.
 
So to unload the external swf and return would I use something like... this.unload(gotoAndStop(1));

View 3 Replies

Actionscript 3 :: Return To First Frame After Video Finished Playing?

Nov 18, 2010

my problem is I want to return my flashplayer into first frame after playing the external video.

The following script is used for my flash player,

[Code]...

View 1 Replies

ActionScript 3.0 :: Why Does LeftPeak / RightPeak Only Return "0' When Mp3 Is Playing

Aug 17, 2010

I'm trying to build a very simple equalizer graphic inside my mp3 player. Basically just a bar that should move up and down with the music. I'm trying to hook it up to the leftPeak of the currently playing mp3, but that value comes back as "0" when traced and so the bar doesn't move. I have tried it with different files to see if its a mono mp3 issue, but no joy. I'm a newbie and can't figure out what I'm doing wrong.

[Code]...

View 4 Replies

ActionScript 2.0 :: Make Movie Clips Return To Scene 1 After They Finish Playing?

May 26, 2010

I have 6 scenes, the first scene has 5 pictures that i converted to buttons. each button goes to a different scene to play the appropriate movie clip. right now it shows up with scene 1, then i click on the button and it goes to the appropriate movie clip but after it finishes playing it just goes to the next clip on the next scene, then after it is finished it goes to the next clip on the next scene and so on. i would like to know is there some way i can make the movie clips return to scene 1 after they finish playing?

View 1 Replies

CS3 Sound Control - No Sound Playing?

Apr 16, 2010

I am trying to embed some sound controls, and have hit a dead end. I made my play and stop buttons, imported my mp3,, assigned it proper linkage, and inserted this AS2 :

[Code]...

The buttons are named "play_btn" and "stop_btn" respectively. When I export it or preview it, hitting the play button does not do anything.... I hear no sound. What could be up with this?

View 4 Replies

Actionscript 3 :: Flash.media.Sound.play Takes Long Time To Return

Apr 25, 2010

I'm trying to play some sounds in my flash project through action script. However for some reason in my code the call to Sound.play takes from 40ms to over 100ms in extreme cases, which is obviously more than enough to be very noticeable whenever a sound is played. This happens every time a sound is played, not just when that sound is first played, so I dont think its because the Sound object is still loading data or anything like that...

At the start I have this to load the sound:

class MyClass
{
[Embed(source='data/test_snd.mp3')] private var TestSound:Class;
private var testSound:Sound;//flash.media.Sound

[Code].....

This as far as I can tell is following the same process as other Flash programs I found, however none of them seem to have this problem. Is there something that I've missed that would cause the play() method to be so slow?

View 1 Replies

Sound Playing Too Soon?

Sep 2, 2010

Im making an animation and in the 3rd scene i have a deer that screams and the sound plays way to early. I had to drag it out way past the frame where it opens its mouth for it to play at the right time.

I have no idea whats wrong this has happened before. I really dont want to have to guess on where to put the sound for everything a character says.

View 2 Replies

Sound Not Playing On Mac?

Sep 21, 2009

Back to my nightmare project, I've embedded sounds in the project that play based on certain user actions. They play fine for me (PC), but my customer is telling me they don't work for her (Mac).Would there be ANY reason a sound would play on a PC but not a Mac?I've told her to update her Flash player to make sure it's current and to make sure her speakers are on and the volume is up, but no sound.Okay, the REAL reason this isn't working is user error based on everything else I'm told that's happening and not happening, but I need to cover my bases and see if there really may be a reason sounds won't play on a Mac.

View 3 Replies

HitTest Was Playing The Sound Over And Over?

May 20, 2009

I have a playhead that moves across the screen and when it hitTests a movie clip it plays a sound. all is working fine except that it will only work the first time it is played. The playhead is controlled by a button. I am working in Actionscrpt2. Here is the code on the movieclip:

onClipEvent(enterFrame)[code]....

In the begining I was having trouble because the hitTest was playing the sound over and over but the above code sorted that out. I think that the new problem was created by fixing the old one.

View 7 Replies

ActionScript 2.0 :: Sound Playing Only ONCE

Nov 13, 2009

I want to achieve the effect of a computer startup. IE, it only plays -once- and then doesn't play again for the rest of the time, even if the user comes back to the same menu. How do I get Flash working that way? I've tried variables to no effect... it doesn't want to change the variable condition.

[Code]...

View 1 Replies

ActionScript 3.0 :: Sound Is Not Playing

Aug 2, 2010

I have another one to get off my chest.I am basically doing a spinning wheel game - i want the sound to play each time the Stopper hits a new prize section of the wheel.In my code, from my EnterFrame function, i call my playSound function but the sound file just never plays .. i know the function is being called as i can see it in trace.I suspect that because the EnterFrame is constantly being called, that the sound file - because it has determined it won't complete - it ignores it totally.[code]

View 2 Replies







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