ActionScript 3.0 :: SoundTransform Volume Performance Bug?

Jun 22, 2009

I have this code, and it works perfectly fine for the most part:

soundTrans.volume = 0.1

What this does, it plays the Sound at about 10% of its total volume.But about 1 out of 10 times, there seems to be a bug, that causes it to play 100% of its volume for like a split second then it goes down to the 10%.Like if the soundTransform is applied after the sound has already started playing, and the Player just sometimes cant synchronize it perfectly? I tried to play around with trying to set the soundTrans BEFORE starting the channel, like:

soundChannel.SoundTransform = soundTrans;

but to no effect, it seems the player Applies the soundTransform always just when the Sound starts playing.(or actually just a bit after)This is especially annoying if you are trying to Fade in a music slowly maybe over the course of 5 seconds, and then it starts with a big BANG, and then it goes down, then it fades in, ruining the whole effect.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: SoundChannels, Soundtransform And Volume Question(s)

Feb 2, 2012

Trying to reduce frame overhead in my game, im trying to figure out how to speed it up.These are some 'simple' questions if you know your way around sounds and channels so i'm hoping you'll read on and perhaps give me some insights.
 
I'm noticing that playing soundclips sometimes make it stutter so im looking for the best way to use sounds and channels.The main question is below: how costly is a soundtranform.volume and is it persistent on a channel?secondairy; does it matter howmany soundclips i drop into the same channel?What i noticed: The channel.soundtransform.volume only works after playing the sound. Q: How costly is a channel.soundtransform.volume?&; Will it stay this volume on the next sound that plays? or do i have to reset it each time?
 
Also: playing a lot of sounds in 1 channel isnt a good idea.So i created a channel for each gameobject that could produce sound.On each sound play i calculate distance from main player and set volume accordingly.

1: I could just pre create like 10 channels set the volume from 0.1 to 1.0 accordingly then play each sound in the specific range channel This way i wouldnt have to do soundtransforms on the fly.If however every sound producing object would be at the same distance it would clutter 1 channel with a lot of clips to play at the same time.
 
2: I could pre create 10 channels as a queue. On every play i would pick the next free channel, looping & wrapping through them as i go.
Here however i will have to set the soundtransform volume again on each play according to distance.

View 5 Replies

Flash :: Videochat Netstream SoundTransform Not Working For Volume Control?

Jan 3, 2012

I have a video chat application where there can be 6 participants. What I would like to do is give the option to each publisher to control their own stream's volume. The code I have looks like this.

[global]
private var volumeTransform:SoundTransform;
[In the init method where ]
outgoingStream = new NetStream( nc );

[Code]....

A possible solution can be this : Calibrate the slider and set the microphone gain, a gain of zero effectively is mute and a gain of 100 is full volume.

View 1 Replies

Performance :: Performance - Hold MouseDown To Increase Speed/power?

Sep 12, 2011

this is what i'm trying to accomplish; With a click on a movieclip (cannon_mc)a shot is being fired (ball_mc)

The longer mouse is down, the speed of wich the ball is fired with should increase.My question to you is;

What is the most efficient way to accomplish this? With a timer or something like this;

[Code]...

View 2 Replies

Performance :: Optimization - Improving Performance With Large #'s Of Objects

Jan 11, 2011

I'm devloping some library classes for flocking/steering behaviours on large numbers of objects (2000+). I'm finding that at < 500 instances, performance is reasonable. As the numbers increase, framerate bogs down.

I've seen remarkable performance with libraries such as Flint or Box2D with ridiculous #'s of particles / objects, so it should be possible to optimize / refactor my code to be a bit better.

I'm aware of the basic optimizations, such as bitwise operations and optimized for loops. Are there any more fundamental approaches I should be considering? For example, currently each instance is a vector-based MovieClip. Would working with BitmapData be more efficient?

View 1 Replies

Performance :: Flex - Using Nested ViewStacks Cause Performance To Decrease?

Nov 4, 2011

Will I take a big hit in performance using nested ViewStacks? Should I strive to handle all navigation in one ViewStack and push children manually or will the affected performance be negligible?

eg.
<viewstack>
<tabnavigator />
<tabnavigator />
<tabnavigator />
</viewstack>

View 2 Replies

Performance :: Improve Flex Performance For Invisible Views?

Mar 19, 2012

We have a medium size Flex 3.6 application that contains around 20 different page views (managed via a single lazy ViewStack) each having multiple components. Most use custom renderers.All model data is loaded at startup and changes to model instances are communicated via binding and/or collection change events.Once the user has viewed each page at least once, all page views are instantiated and happily listen to update events.Which in effect means that each time a model instance changes, all interested views receive that event and compute derived data or trigger item-renderers.I have tested and confirmed this behaviour in a proof-of-concept application. Even when setting a list to being invisible, it still listens to collection change events and invalidates any renderer affected.What would you do?

View 1 Replies

ActionScript 3.0 :: SoundTransform Of A Steaming .FLV?

Mar 31, 2010

So I followed a tutorial and got my video player working perfectly, then hit a wall when trying to replace the volume slider with volume up and down buttons.

attached is the current working video player, I didn't bother uploading the .XML and the .FLV files, but I will if you're interested.

Here is the code which handles the SoundTransform object, but I can't figure what to apply to my EventListener on the Volume Up and Down buttons.

[Code].....

View 6 Replies

ActionScript 3.0 :: Attaching SoundTransform To A Movieclip

Feb 3, 2012

I am trying to create a button to switch the sound in an embedded movieclip (mc_1) on and off. I believe should be able to use something like

[Code]...

View 6 Replies

ActionScript 3.0 :: Pause Stream SoundTransform / Channel

Nov 6, 2009

I am really close I can feel it. I am doing something stupid I know. I have a file where one button simply controls stop and play of a looping audio stream. (by overlapping the buttons and making them visible or invisible depending on buttonClick) I have it where it does work for stop/start but I really need to to Play/Resume.

[Code]....

View 2 Replies

ActionScript 3.0 :: Simple Volume Slider That Controls The Master Volume Of The Entire Swf?

Oct 6, 2009

does anyone have an example of a simple volume slider that controls the master volume of the entire swf?

View 1 Replies

ActionScript 3.0 :: SoundTransform Object Giving A Null Reference?

Jul 15, 2009

Somehow my class is giving me the following error, after I added a SoundTransform object.What am I missing  The issue is somewhere with the

private var soundTrans:SoundTransform;
soundTrans = new SoundTransform();
Why would that be happening?

[code].....

View 5 Replies

Flash :: Volume Slider - Volume Doesn't Change Until Mouse Over?

Nov 21, 2009

I've created a small music player with a sliding volume control. I'm having trouble with the volume. Though it does control volume properly, if I set the initial volume to less than 100%, the volume always starts at 100% until I move my mouse over the player. At that point, the volume changes to whatever the initial volume is set to.Is this a flash bug, or am I missing something? Here is the affected code (code for other buttons/functions omitted for brevity):

var song_initvolume:Number = 100;
slider_1._x = groove_1._x + song_initvolume;
playSong(0,song_play);[code]....

I'd like to be able to set the volume at say 50%, but the above mentioned behavior happens each time.

View 2 Replies

Flash :: Reverse Sound Volume Math For Volume Slider?

Feb 1, 2010

I'm building a video player and am kinda stuck at the volume slider part. It's a YouTube style vertical slider, meaning if the slider is in the top position volume should be 100% and if the slider is dragged to the bottom position sound should be 0. Currently it's doing the opposite of what I want :(

Dragging the slider down will make the sound louder, while dragging up lowers it.

Here is my code below dealing with the volume slider.

[Code]....

The (-4) is an offset value so when you drag it all the way to turn it off, it's 0 and not 4. I need to reverse this somehow, so the traces above will swap... going down will make userVolume = 4 and going up will make it 30.

View 4 Replies

ActionScript 3.0 :: 046: Type Was Not Found Or Was Not A Compile - Time Constant: SoundTransform

Feb 18, 2010

I am having trouble with my flash program. im trying to make a media player but the tutorial that i am using told me to enter SoundTransfor into the action scripts but when i run the program all i get is an error... 1046: Type was not found or was not a compile-time constant: SoundTransform.

View 1 Replies

ActionScript 3.0 :: Flash SoundTransform: Stereo Play Sound From Left To Right Not Working

Sep 6, 2011

i'm trying to play a sound from left to right using actionscript3. i have putted in the first keyframe the code. what i have wrote is:

Code:
var soundClip:Sound;
var channel:SoundChannel = new SoundChannel();
var trans:SoundTransform = new SoundTransform();

[Code]...

View 1 Replies

Actionscript 3 :: Volume Controls - Volume On Or Off Through The Games?

Apr 12, 2012

I've got a serious of games which in turn load off a main main swf.I have mute and unmute buttons on the main menu and the same buttons in each game.When I unload/load a game I want the volume to stay as it is so they player doesn't have to keep turning the volume off. AudioOff is the button shown when the volume is off and AudioOn is the button shown when the volume is on.The code I've got now keeps the volume on or off through the games but the buttons aren't showing up correct with this code..

if (SoundVolume.volume == 1)
{
AudioOn.visible = false;[code].....

View 2 Replies

ActionScript 2.0 :: Volume Slides But No Volume Change?

Sep 10, 2011

I converted the slider bar and slider button to buttons. Then, I made the slider button into a movie clip.

Here is the code I placed while slider button was a button:

Code:
on (press) {
startDrag(this, false, left, top, right, bottom);
}

[Code]....

It seems right to me but I don't know. The movie button slides down the slider bar but it just doesn't affect the volume. Going to try to attach my FLA to offer better insight. Just tried to upload it and no matter if it's FLA or zipped FLA, it says it failed.

View 1 Replies

Actionscript 3 :: SoundTransform Is Muting The Sound But Sound Still Plays

Apr 6, 2010

I am using the following code, in the last line when I play the sound I can still hear it even when I have transformed it to 0.

[Code]...

View 1 Replies

Tune Performance Of FMS?

Mar 28, 2011

It's OK on develop machine,
 
but when put on product machine,it's extremely slow...
 
The real time publishing often turns out a static image hanging there.

View 1 Replies

ActionScript 3.0 :: Swf Performance In A .pdf

Apr 29, 2010

Does anyone know of some tips when embedding an .swf into a .pdf? I've been working on this for a couple of days, and the .pdf has some significant issues playing my swf when the swf plays well from the IDE and the browser.

View 1 Replies

Maintain High Performance With CS4?

Jan 4, 2010

I'm running Flash CS4 on a laptop and find it gets sluggish. I find when I restart my computer, I can work at a good speed for a while, but eventually it becomes very laggy - why is this?

Can I dump the cache files or something to simulate the restart? I've reduced the undo history to 10 - any other tips for CS4 on a mediocre machine?

View 1 Replies

ActionScript 3.0 :: Performance - Should I Use Timeline At All?

Apr 17, 2010

When I have an animation, 180 frames long which contains just some small animations and its running at 120 fps no problems. Now I add a keyframe on frame 90 where a large static image pops in. A 1280x800 background image for example, completely static. Then I try to run it at 120 fps and I get a small freeze(0.25s-0.5s) on frame 90. When I add this large image at frame 1 and set visibility to false and on frame 90 I set visibility to true, I have no problems. So the problem should be in instancing the large background object. What can I do about it? Is it possible to get rid of this problem and still keep using the timeline for animations to not hardcode everything because of this?

View 2 Replies

Flash :: CS3 (mac) Sluggish Performance?

Dec 2, 2009

PowerMac Dual 2.3 GHz G5/8 GB RAM I suspect I'm not using best practices, as this is my first project, but my the flash file is getting very sluggish to work on. The swf (AS 2.0) publishes fine and runs OK off the server and in the browser, but the Flash application is slowing down to a crawl making work very unpleasant indeed. Not that it was ever that fast to begin with. The Flash file size is presently 15 megs. It's got a log of symbols in the library and a lot of small jpgs used as navigational buttons, and utilizes many instances of the loader component to dynamically load external files: Is this too much of a demand on the app's resources? I do think that some of this has to do with a poorly implemented user interface (first attempt by Adobe to make Flash "look and feel" like a CS app), but I'm sure there are other issues.

View 1 Replies

Test Load Performance Of FMS?

Aug 15, 2010

Specifically, I want to test exactly how many connections my installed version of FMS can accept.
 
Is there such a tool for benchmarking with FMS?

View 1 Replies

Flex :: How To Improve Performance Of App

Jan 19, 2010

I am working on a flex application. The application occupies 100% of the browser screen, but it is slow to load. How should I improve the performance, what are the best techniques one should follow for improving the performance of a flex App. I did try some stuff though, I am not using relative layout instead i am using absolute layout and putting the buttons/images etc at exact places in a Canvas, still i feel it is slow. Can I profile the App or flex code to see where exactly the app is taking the maximum time to execute.

View 3 Replies

AS3 :: Performance Many Arrays Vs One Array + 'is'

Sep 2, 2010

I have quite alots of display objects to manage during runtime, so Im currently using Arrays to manage them. But the problem is I have few many types of displays objects(eg. Tile, Npc and Building) which are basically MovieClips linked to the library. Each display object plays different role where it will be checked on enter frame, a loop.Method 2 sounds much more faster and extensible however Im worried if it would affect the checking rate of each display object during runtime as the displays:Array grow larger and probably making it glitchy.So which one of the following method is faster+less glitchy and explain why you choose it.[code]

View 3 Replies

Java - AIR Nativeprocess Performance?

Oct 30, 2010

Is AIR nativeprocess able to receive message from Java program and process every line of message as fast as possible in milliseconds? Does it has a miss read or delay?

View 2 Replies

Actionscript 3 :: Link Between FPS And Performance?

Dec 17, 2010

So I'm wondering if lowering FPS from my default (30) to around 20 would improve performance. Is there are link between the two because a computer running a 30fps program would have to update more often than one running at 20fps? Or does it just matter that you maintain your default fps?

View 1 Replies

ActionScript 3.0 :: Performance With Background?

Nov 4, 2011

I'm making a mobile game with lots of objects scrolling down the screen and I seem to have a weird performance issue which I'm not sure why it occurs. These objects are all bitmap objects and it works completely fine with 40/40 fps when there isn't a background behind. But once I added a background behind my framerate starts to drop and ranges from 30-40. Anyone has any idea why that's happening?

View 2 Replies







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