ActionScript 3.0 :: Play Two Or More Sound In Sequence?
Oct 15, 20091 my first question is how to play two, three or more sound files in squence . on a button click
2 how to stop a sound by a button while starting another
1 my first question is how to play two, three or more sound files in squence . on a button click
2 how to stop a sound by a button while starting another
I�v build a simple flash projector to offer to my local fire department Essentially they used to in internal audio alarms to warn firefighters when there is an accident, fire, aggression, etcIn the version 1.0 they click several buttons, one to play the alarm sound, otherto announce the vehicle or vehicles that goes out, and a last one that says what is occurring.
The problem they report is that the sounds play immediately when you click in each of the buttons, and even the sound overlaps the other, which makes they click on each button and have to wait for the sound to finish and then click next. All this is normal because I associated the sounds to the buttons. What do I need to do the flash in this order in the version 2 of my projector:
1 The Fireman choose the type of alarm you want to play and click the button corresponding (but do not want the sound to play now) let's imagine that he pressed the button "alarm 1"
2 The Fireman choose (s) vehicles which are going out to the occurrence (but do not want the sound to play now) let's imagine that pressed the button "ABSC01"
3 The Fireman choose the type of occurrence (but do not want the sound to play now) we will imagine that pressed the button "fire"
4 finally the fireman holding down the "PLAY" (the green on on the top of the image) and this Makes the sounds selected to start playing in sequence, liker "Alarm 1" then "ABSC01 "and then" Fire "
Logically speaking I believe that each button must declare a variable associated with every unique sound, and then pressing the button takes the variables and plays them in sequence and without overlapping sounds.
I want 2 swfs in a sequence.I tried one techinique wherein on the last frame of the first swf i have put the followig code
stop();
this.createEmptyMovieClip("mc_holder", this.getNextHighestDepth());
mc_holder.loadMovie("first.swf");
the problem is that it works fine when I export it to swf but when i export it exe format It does not play the first swf and instead directly plays the second swf.
I know this is a common problem, but i still don't get it.
Created a movie button. Goes like that:
addEventListener(MouseEvent.ROLL_OVER,homeOVER);
function homeOVER(event:MouseEvent):void
[code].....
I have 3 flv and wanna to play them in sequence.This is the script I wrote for one flv
var my_nc:NetConnection =new NetConnection();
my_nc.connect(null);
var my_ns=new NetStream(my_nc);
my_video.attachNetStream(my_ns);
my_ns.play("v1.flv");
How to write in order to play them sequence rather than edit them in AfterEffect?
I was wondering whats the best way to play a sequence of images (dynamically.... not using IDE) so that I can mimic the behavior of a movieclip? The images are pngs that get loaded completely in the begin of the app, based on a user ineraction with this object, I must play a given sequence.
View 3 Repliesi have a php script that selects an array of different wav files. i want to send the files path to flash file and let the flash file load each of the file and play it in a loop.
View 6 RepliesI have several movieclips in my library named with the name stap1, stap2, stap3 etc..
I want to put addchilds on stage after the other child is finished playing. I'm trying to make a for loop but the movies are now put on the stage on the same time.
My code so far is:
ActionScript Code:
import flash.utils.getDefinitionByName;
stop();
var total_movies = 3;
[Code]....
I have single FLV file which is quite big. I want to encrypt it and decrypt but it takes too long. My best idea was to split video into smaller videos using third party software and apply my encrypting and decrypting functions to each one separately. Unfortunately I have a problem with gaps between loaded FLV files. Video has to be smooth without any pauses.
View 0 RepliesI have two swf files that I would like to play in sequence in a main flash file. The two swf files are partA.swf and partB.swf. I set up two frames using this actionscript 3 snippet: Frame 1:
Code:var partARequest:URLRequest = new URLRequest("partA.swf");var partALoader:Loader = new Loader();partALoader.load(partARequest);addChild(partALoader);Frame 2: Code:var partBRequest:URLRequest = new URLRequest("partB.swf");var partBLoader:Loader = new Loader();partBLoader.load(partBRequest);addChild(partBLoader);
I made sure to set new loaders that correspond to it's proper swf file. So partA.swf goes with partALoader and partB.swf goes with partBLoader. I noticed that individually they work great. If I just set up frame 1 or frame 2 by themselves, the swf file plays. When placed together, however, either frame 1 plays without going to frame 2 OR frame 2 plays by default without playing frame 1 first.
How can I get this to work properly in sequence? Just to break things down, this is how I would like the set up. 1. Play frame 1 which plays partA.swf, 2. Stop when finished and go to frame 2 which plays partB.swf 3. Stop movie, no need to loop. 4. Would like to have option for adding more swf files I don't use flash much, so guidance with code is much appreciated. I would think this is a simple task, but searching for a proper solution hasn't been successful. Also just to clarify from previous searches and posts I looked at: I am not using buttons, and this is using actionscript 3.0 not 2.0, and this is using only .swf files.
I want to make a closing sequence for my main menu. I have several button on my main menu. I want to make it so that every time I click a button, a closing sequence (for example a fade out) will be played before going to a new page (frame/label name). How do I do that?
View 1 RepliesI've created a looping movie in flash which is made up of several seperate swf files and linked together in the main file- it plays fine for the first couple of plays but gradually the timing becomes delayed and slides start to play over one another, is there a way I can have the full sequence play fully everytime?
View 1 RepliesI am looking for a script that can let me do this:If I click a button - 1 movie clip will play X number of frames, and then after it completes, a 2nd movie clip will play X number of frames.It is important that I can do this in one script in the buttonOtherwise the easy way to do it would be add a command at the end of the 1st movie clip. Which I don't want to do because I am trying to create a conditional event thingy.
View 3 RepliesI want to push a button, and play through the entire array one sound at a time. When the first sound stops, the second begins, etc. all the way until the last sound plays. When the last sound finishes, all sound should stop, and if you push the play button again, it should start over at the beginning, and play through all sounds again.
I'm thinking the SOUND_COMPLETE needs to be used... I'm just not sure how, hence the empty function. I only want to have to push play one time to hear the entire array in a sequence.
var count;
var songList:Array = new Array("test1.mp3","test2.mp3","test3.mp3");
count = songList.length;
[Code].....
If I click a button - 1 movie clip will play X number of frames, and then after it completes, a 2nd movie clip will play X number of frames.
It is important that I can do this in one script in the button.
Otherwise the easy way to do it would be add a command at the end of the 1st movie clip. Which I don't want to do because I am trying to create a conditional event things.
i followed this script which plays my images randomly. but now i want them to play in sequence on clicking the button. what changes should i made.
random_btn.onRelease=function(){
var picNum:Number;
picNum=Math.ceil(Math.random()*20);
photos.gotoAndStop("img"+picNum);
photos.fader.gotoAndPlay(2);
}
I'm quite new to Actionscripts and I hope someone can help me with two issues I'm having. I have a rather long timeline that I want to use the Keyboard to play particular sections of this timeline. I can get the Keyboard to jump to the specific frame I want, but I don't know how to indicate that action to stop at a particular frame, and then to loop that section.
So, for example, if I press the UP key, I want it to start playing from frame 5 of the timeline to frame 14, afterwhich it will loop until I press another key.
My other question is how do you script a Keyboard to play audio?[code]...
I have created a number of flash files, and now want to combine them all into one single movie file. For example, the files run like this: section1.swf - section2.swf - section3.swf - section4.swfI have created a 'host' file, to load the individual files, but I want to play these files in sequence. So that at the end of section1.swf, section2.swf will play and so on.... Can anybody guide me as to what is the most straightforward method of doing this? I have little or no knowledge of actionscript so the simpler the better for me
View 2 RepliesI have six dragable button named A,B,C,D,E, F on which external movie are called upon
what my client want is that user has to drag and drop this buttons one by one into to little mc (movie clip). than by clicking play but. all movies called upon have to play asper draged sequence.
I've multiple videos stored as MovieClip objects and would like to merge them into a single MovieClip video object in order to play all of them in sequence (so that a user thinks it's a single longer video).
View 7 RepliesI have 3 sounds that i would like to play, they are in my library.I can play any of of them using soundName.start(0,1) with the code below:
firstSound = new Sound();
firstSound.attachSound("Sound1");
secondSound = new Sound();
[code].....
I want to make an application in AS 3 in which a XML will be read and it contains all the tracks that I want to be played. But every movie must be played in fullscreen, and the transaction can't be seen by the spectators. So who is seeing the playlist must not see what is 'behind the movie'. Only movies being played sequentially in fullscreen. Is it possible to be made?
View 1 Replieshow to sequence movie clips to play in a certain order. I want to play one movie clip that is animated using actions and then once that clip is finished, play the next one (naturally, to create some sort of design.)If I have two MC's that have separate scripts on them - how would I go about playing the first movie clip and once that animation is finished playing the next one?I've tried placing a 2ndmovieclipname.stop () style script at the end of the first movie clip.I am currently using Flash MX 2004.
PS - I do not have my clips animated with frames, so I don't believe the option to gotoAndPlay (frame x) is available to me.
I've created two movie clips in Flash CS3, and I am now trying to understand how to get them to play in sequence on the main timeline.
I am noticing that when I change the Action Script in one movie clip, the Action Script in the other movie clip changes as well.
AS3 code that will allow me to play a series of 4 "slides" (movie clips) that are contained within a single container-movie clip?[code]...
now, at the end of that movie clip, I want to initialize slide2_mc... and after that, slide3_mc & then slide4_mc. After that, it should loop back to slide1_mc.
It's possible to play a sound file through AS, either by loading it from a folder or import it to flash. It's also possible to play a dynamic tone with flash.media.Sound + writeFloat.
But... is it possible to play a sound file with flash.media.Sound + writeFloat in some way? I want to play a sound file without having to deal with any files except the .swf!
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.
I'm trying to make an application in cs4 that allows the user to move a stickman into various positions and then play back the sequence of moves. Despite the fact that I haven't even gotten that far yet I also would need an undo and redo button. I have a few ideas regarding this i.e. logging each body part's coordinates as the user moves them and editing the timeline through some sort of 'record' button and undoing by having some sort of array...none of which I know how to implement into actionscript yet.
View 1 RepliesWriting RTMP Streaming Server for streaming AVC+AAC video. And it works fine with rtmpdump. But I can't force it to work in flowplayer and other flash video players.The message sequence after handshake is similar to FMS / RED5 / erlyvideo / haxevideo servers: I've tried a lot of variations.
From Chrome debug console I can see, what all negotiating messages passed to the flowplayer. The last one is onMetaData. And after this the working sample (rtmp://flash.tvwmedia.net/LiveVideo//Live300) gets NetStream.Buffer.Full. And streaming from my server don't get it.
I'm starting with AVC Header message, containing sps/pps. After it first AVC picture passed. After - AAC header and AAC sample. And then AVC/AAC samples. This dumped OK by rtmpdump - I have working flv on exit. But flowplayer and others does not work.
[Code]...
I'm trying to add sound to some buttons. It's just a little metallic 'klink' sound that plays on rollover. I only want the sound to play on the 'Over' state. So I've set up a layer (just for sound) for the button and I add my sound in the 2nd frame (the Over state). Everything is cool. All is good. And the sound plays on rollover. But the sound also plays when I click the button (i.e. it also plays on the "Down" state). Why? The Down state keyframe is completely empty. What's going on here? I've only put the sound in the "Over" keyframe, why does it also play in the "Down" frame (or when I click)?
View 1 Replies