ActionScript 3.0 :: Sound Delay After Button Push?

Jan 2, 2009

I have made this little thing, its more or less just to try out some basic scripting, its a button that you would push and when you do so it would play a random sound out of six different sounds, and it does all that, but it delays the sound, so it has a short delay, does anyone know how to fix this? Here is a link to the page where the button is (test page).[URL]...

View 24 Replies


Similar Posts:


ActionScript 3.0 :: Slight Delay In Button Sounds During Sound Stream?

Jan 30, 2009

I have some sounds on buttons:

Code:
var mySound:Sound = new myLibrarySound();
myButton.addEventListener(MouseEvent.CLICK, playSound);
function playSound(e:Event):void

[code]....

... and that works fine. I then have some streaming music:

Code:
var myStream:Sound = new Sound();
myStream.load(new URLRequest("myPath.mp3"));
myStream.play(0);

... and that works fine too. Now, however, the initial button sounds have a slight delay -- I'd estimate about 150-250 ms. It's enough that rollover click noises happen about the time you click, and click noises happen about the time you release, etc. Now, here's the KICKER. It only happens in FIREFOX. CURSE FIREFOX. Seriously. I've been having so many Flash issues in FF3, it just drives me nuts. Firefox and wmode is a pain, Firefox and sound is a pain, Firefox has been crap for Flash development lately.

View 2 Replies

ActionScript 3.0 :: 15 Seconds Delay When Push Or Pull Data From The Database?

Dec 4, 2009

my normal work day involves screen sharing with a programmer while we engineer the software.We are currently working on a site that involves flash .as3(created with flash CS3) talking with an .asmx web service (created in Visual Web Developer 2005) that talks to a sql (2008)database.When can push or pull data from the database successfully, but we are experiencing a 15 second delay if more than one request from the database is made at the same time. i.e. two customers login at the same time, or one customer logs in and another submits changes to their account.

The second request will not be instant until 15 seconds have elapsed In other words, if someone sends logs in and another person logs in 10 seconds later, the wait will be 5 seconds.Of course, the delay is cumulative...so if 3 people log in simultaneously, there is a 30 second wait. Gross.This only occurs when we are trying to access the database...flash and the web service seem to talk great together otherwise.

View 3 Replies

ActionScript 2.0 :: Sound Then Go To URL After Delay

Aug 17, 2009

What I have is a landing page on my customers site, I want to hold it there until the user clicks a button in the flash file it then plays a short sound, 2 seconds and redirects the page. I have tried setinterval and cannot get it to work. What I have loads the flash file and after the set time plays the file then redirects, cutting off the sound.

On Frame1

Code:
var sndMusic = new Sound();
sndMusic.attachSound("mySound");
var duration:Number = 5000; // set the call delay

[Code].....

View 1 Replies

Actionscript 3 :: Play Sound Without Delay?

Jun 16, 2011

I've got a couple of classes.

My document class (Main.as) instantiates the class player and Soundsloader.
In the player class when the player picks up an item in the game, i want to play a short sound. I do this with the following code: MovieClip(this.main_object.sound_loader).playPickUp();

In my document class i also instantiate the SoundsLoader which basically should load all the sounds. (just one in my sample code below)

package {
import flash.display.MovieClip;
public class SoundsLoader extends MovieClip{

[Code]...

However when i use the methods my swf file freezes for a moment, plays the sound and then continues. So what's the best way of doing this ? (i'm using a .wav sound)

View 1 Replies

ActionScript 2.0 :: Dependant Sound Delay?

Apr 20, 2010

I've done the getting the time right bit and the ticking bit, but big problem arises with the background music. It's different every second, and what I want is that is it's launched at, say 19:00:00 the music will start at 00 seconds, if it's launched at 19:00:22 - at 22 seconds, at 19:00:45 - at 45 seconds etc. So far I have no idea how to do it, I am a total newbie in Flash..

View 3 Replies

ActionScript 3.0 :: 60 Millisecond Sound Delay?

Nov 8, 2010

The first time around, the sound play's exactly on time, After that it has about a 30-60 millisecond delay to re play it again. if i wait about 20 seconds it will be able to play exactly on time again...? Im new to the sound class, but i don't think i have done anything wrong...my sound is imported to the library, exported for actionscript,i have tried:

Code:
var myAudio:Sound= new myCustomSound();
myAudio.play(0,1);

[code]....

simply put the sound on the timeline of a movieClip its all the same, in the play() method, i have tried start time of 0 or 1 or not at all, same with # of loops. i have tried to re-create the sound object each time its called, or have other sounds in the background, or create longer sounds. ive used mp3s,wavs, the audio file has no silence at the beginning of it.

this happens in the flash ide, or the published swf or on my phone using air for android settings, problem is on the phone its a larger delay i would say 60 to 150 milliseconds, otherwise it probably wouldn't be a problem. on my phone, using mrDoobs stats class i can actually see the frame rate drop from 30 to 25 back to 30 once that estimated 20 seconds is up and its "ready" to play on time again. Something happens after that 20 seconds that it clears up and it will play on time again. I dont know what to think

I re-created it in a regular non air/android swf and its the same issue, i attached it if anyone want to take a look. so hard to see the delay on a regular cpu as the response is good, but its there. click to make a noise, do it again once on the balls on the platform and you will see that tiny audio delay as the ball jumps. however wait 20 sec and it will be exact again.

View 14 Replies

Professional :: Flash Sound Delay - No Synchronization

Jan 26, 2010

I've been suffering the fliction of making sounds playing synchronized in Flash, I load 4 mp3 files externally and once all of the 4 mp3 loaded completely, let them play, but they starts not at the same time, the files starts unsynchronized with a random manner, some times file a starts first, some times file c starts first, there are always files delay about 500ms, the wierd thing is, O only see it's running sync in one computer, in firefox browser, in IE not. Same problem like, we always experience the case that, when we click a music player button, the sound not starts immediately or click a stop button, the sound not end immediately.

View 2 Replies

ActionScript 3.0 :: Start Sound - Delay In Loaded MP3 Playing

Feb 2, 2009

I have recently updated to Flash CS4 and AS3 from Flash 8 - apart from one issue I have with the Sound Object. There seems to be a delay in the loaded MP3 playing when told to. This means that I am unable to add SFX to the game I am developing for a client, because the sound plays about 1-2 seconds after it is told to play. How to tee the Sound up, so that it plays immediately?

The process I am using is this:
Class defined to load all game assets defined in XML

All Sounds are loaded into their own Sound Object and a reference to each is held in an array and passed to the relevant Class (i.e. Player). The relevant Class tells the reference to the Sound to play - it plays, but 2 seconds after the collision detection Event has told the sound to play.

View 4 Replies

ActionScript 3.0 :: External Audio X Animation - Sound Delay

Feb 8, 2011

I have a few animations that run on different scenes each time a scene is loaded the external audio should start with it. Well here is the thing the animation always starts before my audio files and each scene gets bugged. I need to create an action that only allows my scene to start with the audio and also starts loading the next audio so it wont be dellayed.

On the first scene I have the following code:
scene 1 frame 1
var autoPlay:Boolean;
if(!autoPlay){
stop();}
scene 1 frame 2 animation starts and audio 1 loads
import flash.media.Sound;
[Code] .....

View 3 Replies

ActionScript 3.0 :: Making A Flash App - Sound Play Delay?

Apr 3, 2004

I am trying to develop my first flash app. The application emulates a "karaoke" service. It plays a background sound and at the same time records the sound coming from the mic. I use the "sound" class to play the sound (s.play() ) and the "netStream" class to record the mic sound (ns.publish("mysound", "record") ). In the same app, I then try to play these two sounds together. The problem is that I cannot synchronize them. My tests drove me to a conclusion which I am not certain for. The conclusion is that the method s.play() has a delay about 500ms until the sound starts playing. The result is that recording starts 500ms earlier than playback. When, then, I playback both of them the recording sound is 500ms after the backround sound. Is that delay for sure true?

View 12 Replies

ActionScript 2.0 :: Get Specify Xml File Button Push?

Feb 2, 2011

I tried to add to my flash two button like en_btn and fr_btn. I want that if i push the en_btn then private[code]...

View 1 Replies

ActionScript 3.0 :: Get Specify Xml File Button Push?

Feb 3, 2011

I tried to add to my flash two button like en_btn and fr_btn. I want that if i push the en_btn then private var xmlURL:String = 'xml/main.xml'; change private var xmlURL:String = 'xml/en_main.xml';

script.as is:

ActionScript Code:
package {
import flash.display.Sprite;
import flash.display.MovieClip;

[Code].....

View 7 Replies

ActionScript 2.0 :: Lightsaber Turns On When Push The Button

Sep 24, 2005

im trying to make a lightsaber that when you push the button, the lightsaber turns on, and then when you push it again, it turns off. There are three frames in this animation. It starts out with just the handle on frame one and by frame 3 the beam gets to its full size. Right now, the light saber will start out with the beam completely out and when you click the button, the beam will go down and then back up and stay there. This is the actionscript i have so far,

[Code]...

View 7 Replies

ActionScript 2.0 :: Push Button Volume Control?

May 11, 2010

I am working on a Flash Player for my radio station and I am now trying to add a push + and - for the volume and I cannot figure out how to do it. Everything I have run across in my search has been a slider and that is not what I am looking for. Below is the action script from the player.

Code:
// Setup sound object
var s:Sound = new Sound();

[code].....

View 5 Replies

ActionScript 3.0 :: Push A Movie Clip When A Button Is Pressed?

Mar 31, 2011

i do flash at university and im pretty good with it. all im trying to do is push a movie clip when a button is pressed. pretty basic right? but it just doesnt appear the round in the movie clip plays just tha actual movie clip doesnt appear, its not hiding bejind the scene cos i have moved the whole scene and it still doesnt appear where it should. here is the code

ActionScript Code:
import flash.events.Event;
onButton.addEventListener(MouseEvent.CLICK,turnON);

[Code].....

i bet it it something so simple im just missing it but when i replace the loadup with another movieclip it works.

P.S the movieclip is made to be exported with AS so thats not the problem

here is my file [URL]

View 9 Replies

ActionScript 2.0 :: Cycle Through The Content Of An Array By The Push Of A Button?

Dec 17, 2010

I obviously don't understand arrays very well. I want to cycle through the content of an array by the push of a button. The dynamic text field registers the variable "aar", because when I preview this it displays "item1". When I then hit the button, the variable "i" is increased by 1, the dynamic field with the variable "i" shows this, but the dynamic field with the variable "aar" is not updated to the next array-item. This code is in the first frame, with no stop(); code in the file at all.. Why doesnt this code work?

Code:
aar = new Array();
aar[0]="item1"
aar[1]="item2"
aar[2]="item3"

[code]....

View 2 Replies

ActionScript 3.0 :: Scope Within Package - Trace Always Shows A Blank Array Before Push And An Array With One Object In It After The Push

Nov 12, 2009

I have a class in which I have declared an array. The functions in that class are designed to make changes to the array, but it's not working:

[Code]...

Anything I do to customerCheck treats it as if it were a new array. This is especially obvious when using customerCheck.push in addCharToCheck() -- the trace always shows a blank array before push and an array with one object in it after the push... then next time it does the same. I know I'm making some sort of fundamental error regarding the scope of the array within the class but I just cannot find any good information on how to fix it! Moving to AS3 (been coding it for all of about 3 weeks) is a nightmare so far, and it seems to be the 'easy' stuff that causes me problems

View 6 Replies

ActionScript 2.0 :: Make Movie Clip Randomly Switch Colors With Push Of Button?

Jul 7, 2004

I want to implement having a movie clip randomly change color.How can I make my movie clip randomly switch colors with a push of a button??By the way I'm using flash MX and I am still intermediate when it comes to coding.

View 3 Replies

ActionScript 2.0 :: Make Flash Movie That Sends Information Straight To Email With Push Of Button?

Dec 23, 2004

I would like to know if there is a way to make a flash movie that sends information straight to my email with the push of a button. Is it possible? Can it be done without knowledge of the person? I want to have a poll, and calculate the votes by hand, or eye, I suppose. I just don't want to have to set up a server of any kind.

View 1 Replies

Professional :: Button Over Sound Plays Again Before Button Down Sound

Apr 15, 2010

I've assigned a sound to the button over frame and a different one to the button down frame. When i over over the button the button over sound plays. When I then click the button, the button over sound plays AND the the sound I put in the button down frame plays.

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

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 3.0 :: Stop Button Sound But Not Main Background Sound?

Aug 5, 2010

I have a bit of a problem with sound.. I have a main container animation with background sound that's loaded with soundChannel..I also have an externally loaded SWFs with Movie Clip buttons that have a sound ON ROLLOVER on the timeline..after rolling off - I place the:SoundMixer.stopAll();to stop the button from playing the sound once the mouse is rolled off.. However, the problem I'm running into is that it also stops the sound of the main container movie cli

View 1 Replies

ActionScript 3.0 :: Delay Action Of Button To URL?

Dec 20, 2010

Created button that activates short animation AND ALSO connects to URL.
 
I want viewer to see full animation (26 frames that lasts about 1.5 seconds - 18 frames per second). Instead the button connects almost instantaneously to URL and viewer does not see animation.
 
Animation automatically plays (full loop - 26 frames) when viewer first opens swf/html. The same animation plays again when viewer clicks button to go to URL.
 
Is there some code in AS3 that can delay the connection to the URL until the 26th frame of the animation.I am beginner/intermediate to Flash and extreme novice to Action Script (get most of my AS coding from searches online). Need to be led by my hand in Action Script.[code]...

View 7 Replies

ActionScript 2.0 :: Delay Execution On Button

Apr 17, 2007

I am trying to find a way to delay code placed on a button. The code is executed when a learner presses it and makes a specific movie clip appear. At the same time, this code checks to see if the other movies have been viewed (which is required) and if so, goes to the finished keyframe. The problem with this is, the last movie clip goes too quickly because the code immediately executes sending the learner to the last "Finished" frame. I am trying to find a way to either use a setInterval or something else to delay the execution of this last bit of code allowing the learner time to view it. Here is what I have placed on each of the movieclips:

[Code]...

View 2 Replies

Stop Sound From Going Into Next Scene While Keeping Button Sound?

Oct 19, 2010

I'm sure this is a common problem, I tried looking around on the forum for a problem like mine but was unable to find anything. I'm using Flash CS3, Actionscript 2.0, and am making a soundboard. I have two scenes, one that's the title screen, of which has a sound file loaded via the timeline, (I think) set to Event and Loop, and a button which takes you to the next scene and makes a short sound when it's pressed. My second scene has background music as well, also set to Event and Loop.

Problem is that when I press the button, the background music keeps playing into the next scene. I tried using putting stopAllSounds onto the button, but that makes the sound of the button stop as well, and I'd really like to keep it. I've been messing with this for days, and I can't figure it out.

View 3 Replies

ActionScript 2.0 :: Play Sound/stop Sound Button?

Feb 13, 2007

i want to make a single button to play a sound, and if pressed again, stop the sound. and if pressed again, play the sound, and so on...
i know it has to be made with a boolean variable, true/false, but i just can't figure out how.

View 13 Replies

ActionScript 3.0 :: Delay Time A Button Apears?

Dec 18, 2008

When a page appears I want to delay the appearance of the button so users stop to see the animation i have put there but the help file just tells me how to create classes when I'm sure there must be a few lines of code to do it? can someone tell me what is wrong here as when I make the alpha of the button to 0 the whole page becomes 0 alpha and it wont do anything or give out any errors[code]...

View 1 Replies

ActionScript 1/2 :: Possible To Delay Visibility Of MovieClips With Button?

Nov 19, 2009

I'm attempting to make a "Wheel of Fortune" style game. Everything's going great except this one nagging problem. On the main game board screen (where the word puzzle is solved), I have placed small buttons with all the letters of the alphabet. When the player clicks a certain letter button, the corresponding letters, (if the word or phrase contains them) appear on the board. Well, this works just fine, but as of now, when a letter is chosen, all letters on the board appear at once.

Of course, in the real "Wheel of Fortune" game, if the word or phrase contains 2 or more letters that have been chosen, the letters appear on the board in a sequence, probably around 2 seconds apart (I'm sure most people are familiar with the game show). So, basically, I would love to know how to delay my letter MC's appearing, when the corresponding letter button has been clicked.

View 3 Replies







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