ActionScript 2.0 :: Sound Effects Not Playing On Flash Game

Jul 23, 2011

I've been working on a flash game, and recently added in sound effects. However, the sound effects only seem to play the first half-second of the audio file whenever I call on them to. I have been using the standard code.

ActionScript Code:
on (rollOver) {
if (_global.sound) {
_global.SFX1.start(0,1);
}}

But the sound effect only plays through a small amount of the audio. Also, the sound effects are not very stable, and will only play the butchered audio if there is some time in between clicking on several buttons. The odd thing is that I took the same code to another flash file, and the audio played through all the way with no problem, not requiring any additional time to play the sound effect again. I used the same code to load the sounds, which is

ActionScript Code:
onClipEvent (load) {
_global.Music1 = new Sound();
Music1.attachSound('Music1');
_global.Music2 = new Sound();
Music2.attachSound('Music2');
[Code] .....

View 8 Replies


Similar Posts:


ActionScript 3.0 :: Game Runs Slowly And The Sound Effects Began To Lag?

Oct 22, 2010

I am trying to play sounds in my Flash gameAt times, the game runs slowly and the sound effects began to lagI noticed that all of the sound effects that are played using AS3 sound and soundChannel objects (which are held in an array and are triggered by a Click Event listener function) are lagging worse that sound effects which are played from within MovieClips timelines (These MovieClips are played using gotoAndPlay() which is called by a different Click Event listener function.) I am wondering why this is happening. I assume that anything done within Actionscript would be processed faster that anything done on a timeline.

View 0 Replies

ActionScript 2.0 :: Playing Sound When Character Touches Coin In Game?

Jul 5, 2011

I'm currently making a flash game and to insert sound. The sound effect has to play everytime the character touches the coin yet the coin still has to be able to unload. I never used sound before in flash.

View 1 Replies

ActionScript 3 :: Bubble Game Base Class - Sound Playing Too Late

Feb 12, 2012

Any examples of ActionScript 3.0 code that deploys any kind of sound files to be used in Flash Pro files, for final output as SWF. I am using the code (below) for the Base class of a Bubble Game (of sorts), and the problem is, that when popped, the sound plays a little too late, not spot on.

This is my code - which is linked to the Bubbles in the library of my FLA:
package {
import flash.display.*;
import flash.events.*;
import flash.media.Sound;
import flash.net.URLRequest;
public class BubbleBaseNew4 extends MovieClip {
[Code] .....

View 1 Replies

Adobe :: Useful To Use After Effects When Creating A Flash Game?

May 12, 2010

Well, the title said everything, I saw some very nice effects using After Effects, but I want to apply those to a Flash game.. will it be useful?, or After Effects only works on cut scenes, animations, etc?

View 1 Replies

Html :: Flash - Text With Sound Effects?

Apr 22, 2011

my sister asked me to do smth for her that let me scratch my head: she wants to make a signature text in a forum and wants to add sound to this signature so when her post is shown the sound will play in background together with her text signature.

I'm not sure this could be done in flash? is there a way to have some jpeg image with sound effect? or should it be a video? maybe forums restrict adding a flash doc as a signature?

View 2 Replies

Professional :: Sound Free Sound Effects Links?

Jul 29, 2011

Ive stumbled upon a few sites that have free sound FX's but the ones I want which I wuld think are the easiest to get I cant find.I want a sound for when someone clicks the right thing, like a under a sec tiriring or something like when you kill a guy in Leauge of Legends or something like that and also one for when you click the wrong thing like an windows warning ut a little different, yet all the sites and SFX I come across are for everything but those.

View 5 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 3 :: Check If Any Of Effects Is Playing In Flex 3?

Oct 26, 2011

I have some effects which I use in my Flex app... They are all declared within mxml tags...
For example:

<mx:Fade id="fadeIn" alphaTo="1" duration="500"/>
<mx:Fade id="fadeOut" alphaTo="0" duration="500"/>
<mx:Move id="moveEffect" duration="500"/>

[code]....

View 1 Replies

ActionScript 3.0 :: Tracking Time - Count The Seconds Passed While Playing The Game And Gives A Bonus Multiplier To The Current Score When The Game Ends?

Mar 15, 2009

Is there a way to get this code to work? It's meant to count the seconds passed while playing the game and gives a bonus multiplier to the current score when the game ends. I don't know how to get the returned value to combine it into the multiplier int variable. Is there any way to get this code to work or is it completely wrong?

View 11 Replies

Professional :: Where To Get More Sound Effects

Aug 24, 2009

I am need a wide range of sound effects for flash projects.

View 3 Replies

Non-copyright Music And Sound Effects

Sep 26, 2009

Yeh, does any 1 know where i can find good non-copyright music? I have search araound on google, but i wanna check here, i am scared of virus and im not that person some download whithout ceck if its virus on the site or not...
 
So: Do you know where i can get much on-copyright music and soundeffects whithout virus???

View 2 Replies

ActionScript 3.0 :: Add Realtime Sound Effects?

Aug 14, 2009

I'm playing around with the new Sound API in flash player 10 and I managed to load a mp3 from HD, extract it's bytearray and let it play. While playing I can play around with the pitch in realtime.

Now I want to add distortion, bass and echo on the sound, the only thing is I'm not a music specialist. I don't know the mathematics behind the effects.

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

ActionScript 3.0 :: Handling Sound Effects In Several Classes?

May 13, 2009

I'm working on a pause feature for my game and the only issue giving me trouble is how to pause/restart the sound effects and music that is being played in various classes.

I do understand how to record the position when stopping and then play from the new position. All code examples are based on a single sound being played at a time.

I have multiple channels to handle music and for various sound effect categories (so the volume may be controlled separately).

Currently, all of the channels are all in a single class but the sound effects they are assigned (.play commands) are executed within each class (Bullet, Enemy, Tank, etc...)

I'm sure other developers have experience with sound effects in various classes as well... so how did you handle pausing multiple channels and then restarting all of the same sounds that were playing previously?

View 3 Replies

ActionScript 2.0 :: Add Sound Effects To Buttons In This File?

Apr 10, 2008

AS2 Trying to figure out to add sound effects to my buttons (which are actually mcs) in this file. I'm familiar with adding sound effects to "regular" buttons using the button state frames, but I have no idea how to go about adding them to these buttons (for rollovers and clicks). My FLA file can be found and downloaded here: [URL]..

View 1 Replies

ActionScript 2.0 :: Checkbox To Turn On/off Sound Effects?

Nov 30, 2003

I have an animation that plays a couple of different sound effects (depending on what button is pushed). I have a checkbox that I would like to use to turn on/off the sound effects. I have read somewhere that it is possible to set up sort of a global sound that if stopped, stops all sound effects. I have tried to set this sort of thing up but no success . When I test getValue() of my checkbox it seems to work (defaulted to true) but nothing happens when I uncheck the box. What am I doing wrong? p.s. In what forum would I make the suggestion to have a new category for just sound problems? Does anyone else think it would be a good thing to sequester sound issues in their own category?

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

User Cannot Hear Sound Effects When Window Is Not In Focus?

May 28, 2009

I have made a javascript/flash system to play sound effects on an AJAX-based game I have made. For some reason, on some systems (it appears to be just Firefox 3 on Windows XP), users can only hear the sound effects play while the window is in focus. If they minimize the window or are looking at a different window the sound effects don't play.

View 8 Replies

Flash :: Professional - Adobe Player Crashing While Playing On A Game

Aug 26, 2010

After installing the latest version of flash (10.1 I think) it keeps crashing while playing on a game that requires it. I have uninstalled and reinstalled and it just keeps happening.

View 2 Replies

ActionScript 3.0 :: Sound Repeats From Game To Game

May 19, 2010

We have a bug in one game whereby the sound of the word repeats. Even when we use stopAllSounds - the sound is still kept in memory and you can hear it in the next activity - it's a disaster and kids get real angry.

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

Actionscript 3 :: Flash Sound Not Playing

Feb 8, 2011

I have a [code]...

If I directly add "playBeep()" in the AS3 code, then it plays the sound. I have added allowscriptaccess=always in the embed code.

View 1 Replies

Flash :: Stop A Sound From Playing In As3?

Sep 14, 2011

I have this code in the second frame to play a song, and it works fine. The class of the sound in my library being "MySound". var snd:MySound = new MySound snd.play(); Now I need the song to stop playing from a latter frame.

View 1 Replies

Playing Sound When Flash Is Loaded?

May 14, 2009

I have buttons with sound attached in over state and that works just fine, but this means that you are going to hear sounds only when you move cursor over button, how can i make some background sound to play from the moment flash is loaded, even when buttons are inactive, my background image looks like some electrical equipment and and i want to make it sound realistic (sound clip must to be set to loop) and must to start at the moment flash is loaded?

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

Flash :: Sound Keeps Playing After External Swf Was Unloaded

Oct 14, 2010

I have a flash application, some kind of a play-list that loads external SWF video player (I don't have code access to that external file), so users can watch the video or skip to another one. When user switches to another video new SWF file is being loaded.

The problem: If user didn't finish watching the video and skips to the next then I unload previous SWF file (unloadAndStop()) and load a new one. And because the previous SWF was playing it is not actually unloaded, it is still playing on the background (I hear two audio tracks: current and previous).

View 1 Replies

ActionScript 2.0 :: Flash - Animation With Sound Not Playing In Mac?

Jul 29, 2011

I have made a 5 min animation with stream sound. Its playing perfectly in PC. But in mac,its not playing. Stream sound starts from frame 60. So mac plays the swf plays till 60 frame, after that it pauses. I tried importing different sound format (wav, aif, mp3) and tried with all sound export setting but the problem remain same; its playing only till 60. When i removed the sound, it played till end. Even with event sound, it plays till end. But with stream sound, the problem. The problem is only in mac; in pc its perfect.I am using VMware Mac OS x leopard in window xp for testing purpose. I tested it in laptop with mac; but the problem is same. What could be the solution?

View 1 Replies







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