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


Similar Posts:


Actionscript 3 :: Save Sound From SoundChannel Object Flash

May 3, 2011

I'm planning to program a small piano in flash that have an x number of notes to play through a SoundChannel.

What I have not found is a way to record what is playing through SoundChannel and send it as byteArray to a server side script that will save it as WAV (or mp3).

I know Flash Player 10.1 allows you to record sound, but everything I have found is about recording sound using the microphone class. It seems the way to go is to send the sound data to the microphone. That doesn't seem very right or possible though..

View 2 Replies

Flash :: Differences Between Sound.length And SoundChannel.position In ActionScript 3?

Jan 20, 2010

I load a song and when I get the length the song never reach this value.Here is issue document by another guy AS3 - SoundChannel.position never reaches Sound.length.And here is my code

import flash.display.Sprite;
import flash.net.URLRequest;
import flash.media.Sound;[code]....

View 2 Replies

Flex :: Overcome Flash Player SoundChannel Or Sound Limit?

Oct 23, 2010

From the Flash player specification, it supported up to 15/16 or 32 sounds in a buffer, which mean any more sounds is load beyond that limit will either caused buffer stop working.

Is there any class to override to increase sounds to 1024 or greater?

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

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

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

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

ActionScript 3.0 :: Sound Name From SoundChannel

Apr 17, 2009

I wondered if there is a way to find out from the soundChannel the url of the sound it is currently playing. once I found out its url, i can than use its name to call something else.Or anyway to find out the sound that is playing on a soundChannel.I will know which channel to look into, but different sound will be loaded into this soundChannel.If this is not possible, i thinking along the line of overloading SoundChannel play method so that is fires an event when the sondchannel plays and also find out the name of the sound file it is currently playing.

View 2 Replies

ActionScript 3.0 :: Sound Object Or SoundChannel For Various Sounds?

Apr 10, 2010

As I have commented before I am building English teaching apps. I will have music playing in the background, words being pronounced and at times a surprise sentence. All three could sound at the same time at any given point. To build this properly should I use SoundChannel for all of these? 
 
At the moment my code for the music loop is as so. The sound is in the library and exported for AS. Is this code fine or is it better to assign it to the SoundChannel class.

View 1 Replies

ActionScript 3.0 :: Play An Instance Of A Sound In A Soundchannel

May 3, 2011

I have some sounds in my library that I want to play in a soundchannel, but how? This is what I have so far:

var music:Sound = new Sound();var channel:SoundChannel = new SoundChannel();var sTransform:SoundTransform = new SoundTransform();var sound:SoundFile1 = new SoundFile1();  // Note: SoundFile1 is a class; in it is my soundfile in the library// music.load(sound); ??channel = music.play();

View 1 Replies

ActionScript 3.0 :: Sound.play() Always Creates A New SoundChannel?

Nov 23, 2009

I've just started working with sound and as I understand it I primarily need two objects: Sound and SoundChannel. Every call to a Sound.play() method will create a new SoundChannel object. So technically, I could write my code like this:

Code:
package
{
import flash.media.Sound;

[code]....

Will simply create a new SoundChannel object and the first one created by the constructor will be garbage collected? As a side note, it's possible to see Adobe's source files e.g.SoundChannel.as. I'm curious as to how the SoundChannel.stop() method works since it doesn't throw an error or exception even if the audio has already stopped playing.

View 3 Replies

ActionScript 3.0 :: Check Sound Already Playing In A Soundchannel?

Aug 9, 2011

How do we check if there is a sound already playing in a soundchannel?

View 1 Replies

ActionScript 3.0 :: Trigger An Event When Any Sound In A Soundchannel Completes?

May 3, 2011

I have a soundchannel, and I'm playing a lot of sounds in it, but I need the completion of any sound file within that channel to be followed by a wait of two seconds, then trigger an event. How can I do this?

View 4 Replies

ActionScript 3.0 :: Save The SoundChannel.position Number (and Also Call SoundChannel.stop()) In Correct Time

Dec 6, 2008

I just finished a simple music player... For testing purposes. I upload it in the following address:http:[url]....with 10 music songs that I had recorded from radio stations(added the last 2 twice for testing).The problem is that when a song has totally loaded, stop action taken needs about 1 second to be applied!I.e. When I press "STOP", the sound continue to play for 1 sec before stop. When I push "pause" it takes one second for the music to stop!

However when using resume (second time pause) the sound starts instantly! Thus I guess there is an issue with stop()function of the SoundChannel object that I am using to stop the sound. Also notice that when unpause the music, it continue ~one second before the last sound - which means that I saved the soundChannel.position number (and also call soundChannel.stop()) in correct time, but it didn't stop immediately - bug!?

This only happens when the application runs through a browser(plugin v. 10) - programmed in CS3.

PS1. Notice that ,this also happens when I change Volume too. Thus because Stop and Volume are parts of SoundChannel, I guess there might be a bug with SoundChannel in online plugins..... :/

PS2. Notice that ,this also happens when I close the browser (firefox). Even if browser is closed the music continue for 1 sec the same way as when pressing stop!.. Thus I guess it's flash bug!...

View 2 Replies

ActionScript 3.0 :: Soundchannel.position Working, But When Resumed, The Sound Rewinds A Little?

May 28, 2008

I have a pause button that pauses a sound playing in a soundchannel. It works, but when I resume the sound, it isn't in thecorrect position, almost like it was rewinded a little. I'm usingthe code straight from the

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

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

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 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 :: Export PNG Images With Alpha Channel?

Jun 25, 2011

I have this FLA with animation and when played, the animation has alpha channel. I cant understand why when I look in the library I see the frames without the alpha channel and also when I try to export/extract the image again the image dont have alpha channel. How is it that in flash this image has alpha channel and how to get it out like that into PNG? Here is the link to download the FLA:[URL]..

View 1 Replies

Professional :: Import QuickTime With Alpha Channel Into Flash CS3?

Nov 8, 2011

Is it possible to import a QuickTime movie with alpha channel into an FLA and have the FLA recognize the Alpha channel? When I've done this, it just shows opaque black instead of an alpha channel. I need that black to be transparent so I can see the layers below the video layer.

View 6 Replies

Flash :: Transform Single Channel Of BitmapData Object

Dec 30, 2009

I have a BitmapData object with an alpha channel. I'd like to know the fastet way to offset that alpha channel in ActionScript3 (FlashPlayer10). By offsetting I mean shifting all pixels of that channel in one direction (wrapping around the image borders) while leaving the color channels as they were.Is there a good way to apply a such a transform to one channel only?

View 2 Replies

Actionscript 3 :: Flash - Combine Two BitmapData Objects Via Max( Channel )?

Feb 2, 2010

I have two BitmapData objects with alpha channels. I'd like to combine them into a single one by using max(channel_image_one, channel_image_two) for each channel, including the alpha. Is there an easy way to achieve this result?

View 2 Replies

Flash :: Channel Disconnected Error Message Again And Again - Builder 4?

Jul 8, 2010

I'm trying to use server capabilities Flash Builder 4. But using different ways (i use 5 or 6 tutorial) get one and the same error within a week - "Channel disconnected - Channel disconnected before an acknowledgment was received." I looked up "gateway.php" and there was not even a closing tag ?>. Error repeated on a remote server (of course I changed all the settings to the mySQL database). Network monitor also gives error.Show where I can find a solution, please? It may be to blame Zend? But how to update it?

View 2 Replies

Flash :: Create Videos With Transparency/alpha-channel

Sep 21, 2010

What is the best way to create a video with an alpha channel, suitable for flex/flash? Does it need to be FLV, or can it be MP4/MOV as well?

View 1 Replies

Flash :: FLV Premultiplied Alpha Channel - Adding To Webpage As A Swf?

Aug 23, 2011

I have this FLV movie file that's got a premultiplied alpha channel and I want to insert it into a webpage to play as an animation, I imported it into flash and that's where I'm a bit lost as to how to make it appear transparent

The video looks to be inverted so background is black and the animation is white so if I try to publish it like that it just stays the same so it doesn't look right

View 1 Replies







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