Flash :: Synchronizing Sound - Sound Gets Terrible As Time Passes?

Jan 31, 2010

It appears my sound is off sync and the longer I play the movieclip, the farther off sync it goes. Its nothing too complicated, just some basic shooting sounds that fire every time I hit the space bar. My code is below:

package com.objects{

import flash.display.MovieClip;
import flash.media.Sound;
import flash.media.SoundChannel;[code]....

The Attack() method gets called from another class that handles all keyboard controls.when it gets called the sound then plays.firesound and firesound2 are almost the same. firesound2 sounds a little off pitch to make it sound more realistic.At first the sound sounds pretty good, not great. but then it gets terrible as time passes.

I made a new .fla project. and I attached the following class to it by it self. so the following is the only code in the entire .fla project and the issue still occurs. I press the spacebar and the sound starts a day late.

package {
import flash.display.MovieClip;
import flash.events.*;[code]......

View 2 Replies


Similar Posts:


Flash :: Professional - CS3 / CS4 Sound File Sounds Terrible - It Crackles And Sometimes Stutters A Bit

Jun 12, 2010

I am trying to create a soundboard and I have all my buttons and stuff, the only thing left is to put the sound files in. However, I have tried adding them to the library and dragging and dropping them over the HIT option like I usually do, but when I export the swf file, the sound file sounds terrible, it crackles and sometimes stutters a bit. I have tried setting these sound files to mp3 and raw in adobe options but with no luck. I am using actionscript 2.0 if that has anything to do with it. Also, I need these files embedded, not just linked.

View 2 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.0 :: Synchronizing Sound And Animation

Aug 26, 2010

I have an animation of a swinging sign that is accompanied by a squeaking/swinging sound that is loaded externaly.. What I would like to do is go a step further and synchrinize the sound with the swinging sign.I've seen some tutorials about synking imported sound with animation - but is there a way to also synk an external sound?

View 3 Replies

ActionScript 3.0 :: Synchronizing MP3 Sound With Animation

Mar 10, 2011

I am a beginner using AS3 and working on an eLearning lesson using a Flash animation as a breathing exercise. The animation works well, but I need to synchronize 2 breathing sounds with the inhale-exhale animation cycles.I can import the inhale.mp3 and exhale.mp3 into the library. But then, I am not sure how to control play so that when the animation's inhale cycle is displaying (circle on stage expands for a time using a variable for duration, in microseconds: _inhaleDuration), the inhale.mp3 plays until the _inhaleDuration completes. After the inhaling animation, the animation cycle has a brief pause (no sound), then the animation displays the circle contracting for the time in the variable, _exhaleDuration, during which time I need the exhale.mp3 to play its breathing sound. Each sound needs to be synchronized to play only as long as the animation inhale or exhale duration.

I've been reading about sound files online and trying to figure out how to control play by duration using these 2 variables (_inhaleDuration, _exhaleDuration) but so far have not found this. So, I'm stuck and hope someone can provide suggestions, sample AS3 script, so I can add this feature to the animation's Tween function, that expands and contracts the circle, so it also has sounds.

View 2 Replies

ActionScript 1/2 :: Synchronizing The Sound With Highlighting Text?

Sep 26, 2009

How could I synchronize the highlighting text mechanism with the audio.

View 3 Replies

ActionScript 3.0 :: Sound To Play When The Mouse Passes Over A Symbol?

Jan 27, 2010

I've gotten stuck on a sound issue where I want the sound to play when the mouse passes over a symbol, which I've managed to get working, but unfortunately it is also playing when the page first opens, which I certainly do not want.
 
The script is:
 
cow.addEventListener(MouseEvent.MOUSE_OVER,gomoo);       function gomoo(evt:MouseEvent)       {        var entermoo:Sound = new Cowmoo();        entermoo.play();       }

View 3 Replies

Actionscript 3 :: Sound Latency - Set It For Any Silence Before The Actual Sound By Calling The Sound

Apr 16, 2011

I am triggering short sounds dynamically from the library for a game (Specifically Air for Android). When the user clicks a button the sound can take up to 600ms to actually play. I have set it for any silence before the actual sound by calling the sound like so:

[Code]...

All return the same results. I know there are threads here that talk about this but none have offered a real solution that I can find. Is there no way to cache the sound or store it in a buffer?

View 1 Replies

Actionscript 3.0 :: Flash Overloads Cpu As Time Passes?

Feb 23, 2009

I'm developing a game like application in flash (as3) which is embedded in an html page.it uses many classes and timers etc..while viewing the page it plays as normal. but after some 5 to 10 minutes the flash player becomes slow,slowing down every process.

View 4 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 :: Flash: Generate/display Sound Waveform For Uploaded Sound?

Mar 14, 2011

I have a project that requires me to display the waveform for a uploaded sound. The sound is always an MP3, most of the time 22.05 kHz mono, with speech only. The project are written with Flex/ActionScript 3. It's meant to run in the browser, but might also consider converting to AIR if that can help.

All examples I've found and looked at for generating a wave, are either doing some visualization in real time as the sound is playing, or, the most promising, as3soundeditorlib, keeps the wave already generated, but does it very slowly, seemingly using as long time as playing through the audio would've taken.Is there any way to generate the wave faster than real time?

View 2 Replies

ActionScript 3.0 :: Sound Class Type - Cannot Convert C$ To Flash.media.Sound

Oct 25, 2009

I have some sounds in my library. They are all exported and have been given class names like C, D, E etc. I have another class that represents a button. This class stores a reference to one of the Sound in my library. I set the type for this variable to Sound. When I try to set it I get the error: cannot convert C$ to flash.media.Sound I try as Sound, for example key.note = note_array[p] as Sound; The value ends up as null.

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

Flash :: Playing One Sound At A Time In Called From Javascript?

Jul 15, 2010

I'm working on a site, for kids, which has a small avatar in the corner that talks.The avatar is a flash file and the plan is to determine what it says through a mix of javascript and ajax.

Unfortunately when I make the flash file play an Mp3 file through JavaScript, I can't seem to stop the sound.. so when I keep clicking on a link which causes it to talk, I hear the sound repeated x times.

The odd thing is, when I attach the very same code to a button in flash, there seems to be no such limitation. It seems as if it won't store anything in global variables when calling from JavaScript.

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

Flash - Modify Sound In Real-time With SampleDataEvent For Audio Within NetStream?

Jan 27, 2011

I'm streaming audio using NetConnection and NetStream. I know that you can modify sample data in real-time with the Sound object, however I cannot find the SampleDataEvent for audio playing with the NetStream object. Is there a way to pass the audio from the NetStream object to a Sound object and modify the sound at that object instead?

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

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

Professional :: Sound In A Time Line?

Feb 24, 2010

I want to run a sound once in a timeline but want the sound to stop at the end of the first run on the timeline but want the timeline to continue to repeat without the sound running again.

View 3 Replies

ActionScript 1/2 :: Sound To Play One At A Time?

Nov 10, 2010

How do I make a command saying:

if sound is playing - dont play sound, else, play sound?

so that the sound effect only plays one at a time. So if holding down SPACEBAR for example, the sound will play and only after the sound finishes, can it loop if SPACEBAR is still pressed.

View 2 Replies

Loading With Sound Only Played Once But Keeping Hover Over Menu Item Sound Intack?

May 21, 2010

I have a flash header that was never completed because the guy I hired took people's money and ran. So now I even wonder if what he said could work with my flash header is true or not. But, usually there is always a way to make it work.

I have a flash header that does two important things: 1) Upon entering the site, it loads and plays an audio track 2) Makes an animal noise when you hover over each animal menu item. (not sure if I'm able to give a link to it or not on here. If I able to and someone would like to see it let me know)

I want to know if my flash header can support the following additional functionality/changes:

1) Currently, it loads everytime a page is selected. I only want it to load the one time of entering the site because the audio gets annoying. Set a cookie maybe?

2) But, I do not want to turn the audio off completely because I still want the hover over each menu item sound.

3) Have a link on it to allow them to select to turn on / off the sound completely. It currently has that, but only for the current page. Once you select another page, the audio is back to on.

4) Lastlly, is there a way for it to detect that someone doesn't support flash and to display an html version of it? And can flash create a html version from my fla file?

I don't know much about flash (but am learning) so I'm not sure if I'll be able to do this myself. However, I want to find out if my flash header will even work this way before I invest the time learning it just for these changes. I know it will be pretty deep with script code, but I'm hoping I could find base code already available for these features. Not sure I can afford help now because of being laid off and two different scammers taking advantage of me. So I'm going to try to do myself and see if there is any suggestions/support on here that can help. I have Flash CS4.

View 2 Replies

ActionScript 1/2 :: Make Button On Rollover Starts Sound And Rolloff Stops Sound?

Jul 28, 2009

I have several buttons in a movie and I want to be able to rollover an individual button and play the sound for that button and when I rolloff I want the sound for that button to stop.

View 6 Replies

IDE :: Loading With Sound Only Played Once But Keeping Hover Over Menu Item Sound Intact?

May 21, 2010

I have a flash header that was never completed because the guy I hired took people's money and ran. So now I even wonder if what he said could work with my flash header is true or not. But, usually there is always a way to make it work.I have a flash header that does two important things: 1) Upon entering the site, it loads and plays an audio track 2) Makes an animal noise when you hover over each animal menu item. I want to know if my flash header can support the following additional functionality/changes:

1) Currently, it loads everytime a page is selected. I only want it to load the one time of entering the site because the audio gets annoying. Set a cookie maybe?

2) But, I do not want to turn the audio off completely because I still want the hover over each menu item sound.

3) Have a link on it to allow them to select to turn on / off the sound completely. It currently has that, but only for the current page. Once you select another page, the audio is back to on.

4) Lastlly, is there a way for it to detect that someone doesn't support flash and to display an html version of it? And can flash create a html version from my fla file?

I don't know much about flash (but am learning) so I'm not sure if I'll be able to do this myself. However, I want to find out if my flash header will even work this way before I invest the time learning it just for these changes. I know it will be pretty deep with script code, but I'm hoping I could find base code already available for these features. Not sure I can afford help now because of being laid off and two different scammers taking advantage of me. So I'm going to try to do myself and see if there is any suggestions/support on here that can help. I have Flash CS4.

View 4 Replies

Media Server :: Get Sound Level Of Each Clients Who Are Streaming Video And Sound?

Oct 20, 2011

I am using a flash app. I can send and receive streaming data to FMS by using this app, like the chart I attached. [URL] This app uses RTMP to access to FMS. I want to upgrade this app to display sound level of each client. Is it possible by using Actionscript and FMS? If so, which class should I use?

View 3 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 :: Add Mute Sound And Unmute Sound Script In A Single Button?

Sep 21, 2011

how to add mute sound and unmute sound script in a single button?

View 2 Replies

ActionScript 2.0 :: Global - Attach A Sound To The Main Timeline (rollover Sound)

Jun 28, 2004

I want to attach a sound to the main timeline (rollover sound) that i can call from on(rollover) button events. I will be attaching the same sound to several buttons.

View 1 Replies

ActionScript 2.0 :: Movie And Sound - Make The Sound Fade Away When The Mouse Is Rolled Away?

May 18, 2007

I use Flash MX 6.0

1) I have a button and when I put cursor over it, it must start looping a sound. When I drag away, the sound must stop. I would be even cooler if it was possible to make the sound fade away when the mouse is rolled away. I have no problem creating another sound file that fades my current sound away.

2) I have a button which represents a knife, that should stab something (a panel) once pressed. So fist the knife must be clean. but after one or more presses, the blood should remain as a movie clip (as I want to animate the dripping blood)

3) once rolled over a button, the sound must start looping (as I wrote in 1.) AND the knife should slowly go backwards (MC). BUT when I roll mouse away, the sound fades away (as in 1. again) PLUS the knife should slowly move back to its place in stead of just jump from one place to another.

View 1 Replies

ActionScript 3.0 :: WAV File - New Sound.extract() Function To Get Two Seconds Of A Sound Into A ByteArray

Nov 11, 2009

I'm having some trouble getting the following code to work - trying to use the new Sound.extract() function to get two seconds of a Sound into a ByteArray, and then create a new bytearray with a WAV header, and then output the file. The resulting 'test.wav' file sounds very wrong although slightly recognisable? I think I may have some of the WAV header settings may be wrong but I'm not quite sure what's the matter and after a long time scratching

[Code]...

View 5 Replies

ActionScript 2.0 :: Sound Visualizations - Dynamically Read The Sound Levels Of A Loaded MP3

Jan 14, 2005

Does anyone know of a way to dynamically read the sound levels of a loaded MP3 to help produce dynamic sound visualization in Flash?

View 5 Replies







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