ActionScript 3.0 :: Multiple Sound Channels At Different Vols?

Jul 14, 2009

is it possible to have multiple SoundChannels? And have a volume control control multiple volumes?

i have a site that uses .flv's with sound all throughout. Volume control is attached to a sound transform that affects the stream. I also added a piece of code to this function that creates a new soundtransformation object, adds it to a soundfactory object i have in a private var and adjusts that volume by 40% of the .flv's volume. This seems like it should work - but doesn't so i am wondering two things. a) can i have multiple sound channels (in this case the stream and the channel i made for bkg music) b) if i can why do my sound transformations not get implemented on this music track. I also tried to explcitly set the music volume to 0.4 via a sound transform right after i load it - which does not work either.

heres the code

ActionScript Code:
trace("current vol is :" + currentVolume +  " And 40% of that is: " + (currentVolume * 0.4));
var st:SoundTransform = new SoundTransform(currentVolume, 0);
stream.soundTransform = st;

[Code].....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Disable Sound In All Channels?

Aug 26, 2011

I am using an application which load games as an external swf file(total 10 games). When I click on the game icon it loads the game and also the sounds related to that game.

But when I close the game in that app, ideally it should also stop the sound for that game. It happens for few games, but for some games the sound still plays in the background even if the game is closed.I have used

import flash.media.SoundMixer;
SoundMixer.stopAll();

In some games the sound is embedded in the game swf file and in some games sound is called from the external mp3 files.Is there a way in which if i close the game. ie any game , the sound should stop.

View 3 Replies

ActionScript 3.0 :: FLV Preloading And Caching And Sound Channels?

Sep 26, 2011

We are working at a complex AS3.0/Flash game project, where we need to preload and cache around 70 movie files with sound. But somehow the preloaded videos all seem to block a sound channel and so some sounds are not played in the game, as we seem to exceed the 32 sound channels. I cannot provide any technical details at the moment, but I will add them as soon as the developer in charge is back in the office.

View 1 Replies

Flash :: Actionscript - Synchronizing 2 Sound Channels?

Sep 9, 2011

I am using 2 sound channels to play 2 separate, externally loaded mp3 files at the same time. Right now I have the play button tied to a function that starts the first mp3, then the 2nd. The problem is - the 2nd mp3 starts a few milliseconds after the first. Is there a way that I can make sure these 2 start playing at the exact same time?

[Code]...

View 1 Replies

Actionscript 3 :: Analyze Sound By Channels In Flash Player 11?

Oct 31, 2011

referring to my old question AS3: Analyzing sound spectrums one by one, one channel at once , with flash player 11 and using Sound.extract,is it possible to extract a single channel and manipulate/visualize it's spectrum? I mean, if i mix 2 sounds into one file, can i control them separately, acting on thing like their soundwaves or volume?

View 1 Replies

ActionScript 3.0 :: Retrieving Sound Frequency And Mono/stereo Channels?

Sep 28, 2011

Can I figure out somehow sound's frequency (primarily .mp3s) and if it is mono or stereo?

View 4 Replies

Actionscript 3 :: Working With Multiple Sounds & Channels

Nov 17, 2011

Are there any audio management libraries for ActionScript 3? The more tailored they are for game development the better.I'm finding it hard to understand and work with multiple channels, which is making a lot of my audio sound screwy and cancel each other out, etc. I've been working on an RPG that can at a given time have quite a number of sounds playing such as environmental noise (like opening doors, thunder, rain, etc), walking enemies, inventory sounds (for events like dropping an item into your inventory), passive spell-casting sounds, voice clips, weapon swinging etc. Alternatively, if there are any good resources that explain how to use multiple sound channels strategically.

View 1 Replies

ActionScript 3.0 :: Merge Two Alpha Channels?

May 4, 2010

What is the best way to merge two alpha channels? What I want to do is, given channel values, use the value which is greater.

I tried using .merge(), but it appears to only blend channels with a linear value between current and destination value.

I looked into .draw(), which would work well using a blendmode like LIGHTEN, but it doesn't allow drawing per channel so I can't target the alpha channel only. The ALPHA blendmode didn't seem to do anything when used with .draw(), and ERASE gives an unwanted hard edge.

I also looked into .copyChannel(), but it doesn't allow any blending logic, merely copying a rectangular region from one BitmapData to another.

View 5 Replies

ActionScript 3.0 :: Operator In Channels For Perlin Noise?

Jul 9, 2009

got this code from herehttp:

[Code]...

View 1 Replies

Flex :: Create Channels At Runtime Using BlazeDS?

Aug 12, 2010

So as you may or may not know, BlazeDS (open source version of LiveCycle Data Services) is a nice way to get your server-side Java and client-side Flex application to play together. Unfortunately, it does have several pitfalls that need to be corrected. I'll try to explain one of them here.

All of BlazeDS's configuration is written via XML files in the flex/ folder of your webapp. The default names are separated for clarity, such as services-config.xml, remoting-config.xml, messaging-config.xml, etc. In these configuration files (particularly services-config.xml), Channels are defined; these setup URIs and objects used to capture and send information between the server and the client. In these config files, it is quite common to use a syntax like so:

[Code]...

Unfortunately, what they don't tell you is that some of these key-in replacements (ie: {context.root}) are not replaced dynamically upon execution but upon compilation of the WAR file you intend to distribute. Obviously not a good idea when switching domains.

So, instead I seek to dynamically define these channels. According to the documentation, that's all good and fine, but it only works if the channel already exists when the webapp is launched. I feel like that sort of defeats the point. So my question is, how do you truly create channels dynamically so that both the client and the server recognize their existence?

View 1 Replies

ActionScript 3.0 :: Convert RGB Channels To Between 0-1 For Pixel Bender?

Nov 20, 2010

Simple question here, lets say you have a color in RGB, white:255, 255, 255Pixel bender needs values between 0-1 not 0-255.So white = 1, 1, 1What about:134, 132, 123I dont know how to work it out.

View 3 Replies

Actionscript 3 :: Merging Two Bitmapdata Objects' Alpha Channels?

Aug 22, 2011

i have the following situation:

one drawing layer (graphics object with lineTo, etc.)

one png with an alpha channel (supposed to serve only as a mask)

now i want to be able to only draw lines within an area restricted by the png mask.

i am trying like this:

var bitmapData:BitmapData = new BitmapData( 320, 320 );
bitmapData.draw( drawingLayer );
bitmapData.copyChannel( maskBitmapData, new Rectangle( 0, 0, 320, 320 ), new Point( 0, 0 ), BitmapDataChannel.ALPHA, BitmapDataChannel.ALPHA );

now the borders get cut off fine, but i get a black background, since the drawing layer has an alpha between the drawn lines (and it should remain like this) and the mask bitmap has an alpha outside the shape. so naturally the mask's alpha replaces the drawing layer's.

i tried it with merge, copyPixels and also with just setting the mask property on the drawing layer (i set everything to cacheAsBitmap) but to no avail.

ADDITION:

when trying to use a mask i tried it with

<s:BitmapImage id="mask" source="@Embed(source='...')" cacheAsBitmap="true" />

and also as

[Embed("...")]
private const BodyMask:Class;
var maskBitmap:Bitmap = new BodyMask();

and assigned them to the mask property of a s:Group element (cacheAsBitmap=true) where the operations on the graphics object occured. i also tried reassigning the mask after each draw operation.

View 1 Replies

Media Server :: When Using RTMFP Protocol FMS Doesn't Operate In Channels

Nov 26, 2010

I'm developing an online meeting system with audio/video sharing, using Adobe Flex 4 and Flash Media Server 4. I'm using the RTMFP protocol to make the transmission of audio/video which increases considerably the performance. The trouble now is that i must record the audio/video transmitted, but i figured out that when using the RTMFP protocol the FMS doesn't operate in the channels. So, how could i make FMS record this channels?

View 1 Replies

Java :: Support Both HTTP And HTTPS Channels In Flex/BlazeDS?

Jun 17, 2009

I've been trying to find the right configuration for supporting both http/s requests in a Flex app. I've read all the docs and they allude to doing something like the following:

<default-channels>
<channel ref="my-secure-amf">
<serialization>[code]..........

I'm running with Tomcat 5.5.17 and Java 5.The BlazeDS docs say this is the best practice. Is there a better way? With this config, there seems to be 2-3 retries associated with each channel defined in the default-channels element so it always takes ~20s before the my-amf channel connects via a http request. Is there a way to override the 2-3 retries to say, 1 retry for each channel?

View 4 Replies

ActionScript 2.0 :: Define HitArea Of External Assets With Alpha Channels (for Example PNG)?

Nov 14, 2010

I copied this from some other forum because it's explain well "...Let�s say you are loading in an external asset that has an alpha channel, such as a PNG. Now let�s say that you want that asset to act like a button, with rollover and click actions. No problem. No reason you can't do that. But, actually, there is a problem. The hit area for that external asset will be its entire bounding box. Take this octy image for example: Even if you rolled over the top left of the image where it�s totally transparent, it will still trigger rollover actions, which is certainly not ideal and could potentially be very confusing for a user..."

[Code]....

View 2 Replies

ActionScript 3.0 :: Extracting The Alpha And Color Channels From A Png To Create A Two Separate Images?

Jun 6, 2011

I'm trying to take a png and create two images, one that represents the color data and the other a grayscale version of the alpha channel.

Extracting the correct data was no problem, i'm just embedding the png, creating a new instance (as a Bitmap) and then extracting the relevent channels of it's bitmapData to two new bitmapData instances.

ActionScript Code:
[Embed(source='/../deploy/images/alpha_test.png')]
public var image  : Class;

[code]....

The problem that i'm having, is that when i assign the colors bitmapData to a bitmap instance to display it, the background color is showing as black, even though the default fillColor of a bitmapData instance is white. how i can use the alpha channel data to create an 8 bit, grayscale image, that's the reverse of the channel?

View 1 Replies

Sound: Set Different Volumes For 2 Or Multiple Sounds?

Jan 19, 2003

Iam searching vor solution so adjust different volumes for multiple sounds. That means:

Sound1 Volume 100
Sound2 Volume 20

I have tried that with the following script:

DayNature = new Sound();
DayNature.attachSound("Day_Nature01");
DayNature.setVolume(100);

[Code].....

View 4 Replies

Professional :: Multiple Sound Buttons?

Apr 15, 2010

Is there any way I can have multiple sound buttons that works as stop buttons for each other? I mean.. I now got 3 buttons that start 3 different songs, but they overlap each other when I press more than one. I'd like Song 1 to stop when I press Song 2 or 3. And vice versa

View 3 Replies

ActionScript 2.0 :: One Sound Control Multiple SWF

Jun 26, 2010

I have multiple swfs in one HTML page and I would like to create the simple sound control (on / off) to control all the mouse over sounds.

View 3 Replies

IDE :: Multiple Sound Volume Control?

May 3, 2010

I'm having issues with controlling multiple sound volumes in flash. What I need to have happen is a Background music softly playing while a voice over is also playing.

This is what i have in the first frame of my main timeline

Code:
firstSound = new Sound(BGMusic_mc);
firstSound.attachSound("LatinRockMusic");
firstSound.setVolume(10);

[Code]...

but when it starts to play the voice sound the volume jumps up to 100. I need the first sound to stay at 10 and the voice sound to be at 100.

View 2 Replies

ActionScript 2.0 :: [FCS3] Multiple Sound Objects

Oct 31, 2007

I have a main application that plays two different sounds, a background music and a SFX. I have added a button that, when pressed, loads another swf called options.swf onto a higher level. This swf contains two volume sliders for each of these sounds so that I can control their volumes. Each volume slider is an instance of a movie clip I have created which contains a sound object called 'activeSound.' On options.swf I have the following code:

[Code]...

My problem however is that when I slide either slider both music and SFX get affected. They are supposed to act independently but they don't. I've had this problem before with sound objects and I don't know a solution to it.

View 2 Replies

ActionScript 2.0 :: Create Multiple Sound Buttons

Nov 8, 2009

I am using actionscript 2.0 and I am trying to create multiple sound buttons that trigger multiple different .mp3 files via mouse click.I have gotten it to work with one sound file using this actionscript [code]but as soon as I add another button and try to link it to another file it does not work.I would like to make it so that even if I click another button to start another sound, the first sound keeps playing.

View 1 Replies

ActionScript 3.0 :: Loading Multiple Sound Files?

Jul 28, 2009

I am trying to put a few songs on a website, not as an .mp3 player, I just want to be able to assign individual buttons to control them.ow, and it works great. I would like to now how to add more and assign them to their own buttons seperate from the other songs.This is the code I have for one song

var url:String = "";var urlRequest:URLRequest = new URLRequest(url);var sound:Sound = new Sound();sound.load(urlRequest);var sc:SoundChannelvar startTime:uint=0;
playBtn.addEventListener(MouseEvent.CLICK,playF);stopBtn.addEventListener(MouseEvent.CLICK,s

[code]......

View 5 Replies

Actionscript 3 :: Sound Plays Multiple Times At Once?

Apr 10, 2012

I'm having trouble with sound in Flash. I may have went about coding the wrong way, because most of my codes are on frames.

So, I have these two variables

var outsideDay:Sound = new daysong();
var outsideNight:Sound = new nightsong();

And I want to play these songs on a specific frame. However, the sounds play sporadically, like 50 times at once. I think it's because I have other codes that link to the frames with a Enter_Frame function. How can I get the sounds to loop and not play multiple times at once?

View 1 Replies

ActionScript 3.0 :: Create Multiple Sound Variables Using It?

Mar 30, 2011

My issue is that I have 10 small audio clips and I want to make them into variables that i can access later in the code. But I'd be happy if I didn't have to write the same code 10 times down over and over to create/access them.[code]...

A question on the side, is there any built in sound generator in actionssccript 3.0?

View 1 Replies

ActionScript 2.0 :: Multiple Sound Objects Manipulation

Aug 24, 2004

i have a problem manipulating multiple sound objects in MX. i have a main background loop object and a button rollover object (which plays on specific buttons). i then have a volume slider which will set the volume of only the main bg loop object. but when i tested it, it seems that the volume of the button rollover object is also the same with the main bg loop object's volume. meaning, if my main bg loop's volume is down to 50, the button rollover sound volume is also 50.

here're my codes:

//code on 1st frame
mainLoop = new Sound();
mainLoop.attachSound("mainLoop");
mainLoop.start();
mainLoop.onSoundComplete = function(){
mainLoop.start();
}

hoverSound = new Sound();
hoverSound.attachSound("hoverSound");


//code on slider MC
onClipEvent(enterFrame){
if(drag){
_root.mainLoop.setVolume(this._x); //this._x is between 0-100
}
}


//code on sample button
on(rollOver){
hoverSound.start();
}


thanks!

View 3 Replies

ActionScript 2.0 :: Multiple Streaming Sound Manipulation?

Sep 3, 2004

I have a site where as you click links, you move forwards through a city. I want to fade sound files in and out, overlapping, depending on where you are in the city.As yet, I can't have two sounds playing at once.I have found a site with the effect I want, it's atI have two sound loops at the moment, one of cicadas, one of a city at night, both saved as separate .swf files, which I have loaded onto the main timeline on layers 14 and 15.
The code for the two loops is:cicadas.swf, FRAME 1

var volPercent = 20;
cicadas = new Sound(cicadas);
cicadas.setVolume(volPercent*2);

[code]......

View 4 Replies

ActionScript 2.0 :: Play Multiple Instances Of Sound

Nov 9, 2005

I am controlling all sounds through actionscript. does anybody know if there is a way to play multiple instances of same sound using actionscript?

View 2 Replies

ActionScript 2.0 :: SWF Contains Multiple Copies Of A Sound Item?

Jun 11, 2006

i try to stream a sound i get this message on my output screen "SWF contains multiple copies of a sound item". The sound still plays, but some popping noises are added here and there throughout the recording

View 3 Replies

ActionScript 2.0 :: Multiple Sound Files Combined?

Jan 15, 2007

The quick question is I can only get this to play sound once - then it won't do it again I am making a math game for my young kids - it adds numbers from 1 to 5 the variables A & B are randomly generated and make C

The sound reads out a string A + plus + B + equals + C (5 sound files)It does this the first time the flash is played, however, when the flash movie goes back to the previous frame, and generates new variables - it will not play the sound files anymore.

[Code]...

View 1 Replies







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