ActionScript 2.0 :: [FMX] How To Play Sound Sequentially
Sep 16, 2005
I'm trying to find a way to play a sound sequentially. In other words, I want to play a sound file from a certain point to a certain amount of time (NOT to the end). So to play a portion of that file.Now, I know I have to use mySound.start(secondOffset), but how can I stop it? Sound.onSoundComplete is not useful, as I want to stop the sound at a certain time from playing, which might not be the end.I guess that the approach is to use the Sound.position property, and to stop the sound when the position meets criteria.I've tried so far all kinds of approaches, like making a loop while the sound plays and checking the Time, but nothing seems to work.
View 1 Replies
Similar Posts:
Sep 17, 2010
I want to create about ten twenty second movies and then have them play sequentially.
The movies are only slightly different from each other.I don't want to make a movie that is two minutes long though. I want the movies to play in a different order on each page.
View 1 Replies
Oct 23, 2009
im trying to figure out a way to make a button play two movie clips one after the other in AS 2.0. I have bunch of buttons that i want to play the same MC followed by a specific MC for each button so i cant add another goto at the end of the middle clip. theres probably an easy solution to this but I only know so much about AS.
View 1 Replies
Sep 30, 2010
I am building a flash header for my website. I want to have two parts. The first part is about a 10 second intro. The second part though will be a looping slideshow (It's photography site). Basically two different movie clips.Can someone give me a little help getting started? I think I can use AS (3.0) to loop the second movie but I need a way to recognize the end of a movie.
View 4 Replies
Jul 1, 2009
I have a series of 5 external movie clips that i want to load as fallows:
Load Clip1.swf
Play Clip1.swf
While Clip1.swf is Playing
Load Clip2.swf
[code]....
View 0 Replies
May 5, 2007
Complete idiot question but I know how to load and external swf and have buttons to start them playing. I was looking have them play and then load another and play.I f someone could point me in the right direction to even research this.
Code: Select allvar mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mcl.addListener(mclL);
[code].....
View 14 Replies
Feb 14, 2008
how to sequentially play external SWFs loaded into the main timeline?
I have several SWF files with short videos embedded in them. I wish to load these external SWF files into my main timeline as follows:
User Presses Button -> Play Video Clip in External SWF#1 -> Once Video Clip in External SWF#1 has Finished -> Play Video Clip in External SWF#2.
I tried achieving this by adding: var endmovie:Boolean = true; to the end of each video clip inside the external SWFs (e.g. 1.swf) then cycling through an if statement in the main timeline to see when this condition was meet:
ActionScript In Main Timeline:
Code:
var mc_Loader = new MovieClipLoader();
mc_Loader.addListener(this);
[Code].....
How is the best way to go about achieving this? Am I on the right track? (By the way, using .FLV or one long external SWF file is not really an option due to long loading times...
View 3 Replies
Oct 14, 2009
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!
View 9 Replies
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
Mar 6, 2009
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
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
Mar 16, 2009
I have to play a sound file and show the progress of the sound file being played. I am using import flash.media.Sound; import flash.media.SoundChannel; But the PROGRESS event gives theprogress of loading of file. I want to know of much of the song has been played and how much more is left.
View 3 Replies
Aug 9, 2004
I am new to actionscript. I have created a script that will play server side sound object and client side mp3 files alternately. Now, I would like to play the client side mp3 first then only play server side sound object alternately. However, I have no idea how can I do so. The following is the code that need to be swapped:
[Code].....
View 2 Replies
Jan 25, 2011
I am trying to build a simple xml based mp3 player for a project. I have got as far as combo/list boxes populating.
The first time you click the a track to play it all is well.
However, when you click another track, the first stops, but then I get error message.[code]...
View 2 Replies
May 14, 2011
I tried modifying the sound in Action Script but now I do not get any sound on the webpage, only hear the sound in preview on flash editor.It was looping sound on the web page and I did not want to have surfers having to hit the stop button. But I did want it to play just once.[code]
View 1 Replies
Feb 14, 2012
I have a "onRelease function"
CODE:
btn_4.onRelease = function () {
var yTween = new mx.transitions.Tween(slider, "_x", mx.transitions.easing.Strong.easeOut, slider._x, 695 , 0.600000, true);
}
This works good but I like to add in a "onRelease" play sound, too. How it have to look like and where do I have to place the sound? Because: When I add in a new function "onRelease" both block each other.
View 2 Replies
Dec 14, 2009
I have two files as: A.swf and B.swf.[code]While I am playing B.swf then music is plays perfectly. While I load it to in A.swf then music in not playing.I don't want to change anything in B.swf like new Sound(this). I want actionscript code only for A.swf.
View 5 Replies
Jan 21, 2010
I've got 3 swf files and they are all nested. Here's the structure: [code]The sound clip "m1p1" is loaded in the library of "cc_mod1_shell.swf".This setup works when I just test "cc_mod1_shell.swf". I can hear the sound clip. But, when I test the root level "cc_ shell. swf", the sound does not play. Can anyone tell me what I'm doing wrong? Why would this._ parent work when I'm just using the 2 files in question, and not when they are nested in another file?.
View 7 Replies
Mar 27, 2012
How do you get sound to play?
I am importing the sound and exporting in with an identifier "sjump".
I am trying to play the sound from a seperate .as file with the following code:
var sound_sjump:Sound = new Sound();sound_sjump.attachSound("sjump");sound_sju mp.start(1,0);
Why won't it play?!
Some of my sounds like if I attach "coin" instead of "sjump" work? Why is this?
View 3 Replies
Sep 7, 2008
I have a Flash movie that uses the following code to load a Sound from the library[code]...
View 4 Replies
Jan 28, 2009
trying to make a play/pause toggle button in AS3. I'm a newbie but I've finished the site except for this element. my audio file works when i import to the library and it plays it in the preview. its in the same folder as the fla. working in cs3. This is what i've done.new as3 file. code.
var req:URLRequest = new URLRequest("ocean.mp3");
var s:Sound = new Sound(req);
s.play();
whats the deal? I get no compiler errors. i'm hitting option+Return on the mac to test the movie. I downloaded some one else's and it worked. i copied theirs into my project and it didn't work. i have a feeling its something to do with classes that i don't know about
View 1 Replies
May 2, 2010
I'm working on a game that loops a random sound file everytime the user goes to the menu. When I tried the simulate download in the preview menu, it took a long time to load the first frame (which is a preloader). I found the problem was that in the linkage for the sound files I said "Export on first frame" so i unchecked that box, but then when I tried playing again, the sound wouldn't load.So, I'm wondering, is there a way to play sound files through ActionScript without having to load them on the first frame?
View 1 Replies
Jan 30, 2009
I'm trying to go from an flv. that starts automatically 1st thing directly to a .swf file, with no user interaction. They are both inside a mc 'container' on the stage. I can get them both on the stage, but at more or less the same time, not sequentially. I tried using an addEventListener(VideoEvent.Complete) with the .flv, but the .swf starts up after the .flv is loaded, not after it finishes playing.
Am I supposed to use some sort of 'loader' strategy or is there a way to 'listen' to when a .flv finishes playing and then the .swf will come up automatically?
View 4 Replies
Feb 25, 2009
are there any possibilities to play sound in flash (actionscript 2), which is defined by a mathematical function like f(t) = 0.5*sin(2*Math.pi*16/27*440*t) ?
View 2 Replies
Apr 3, 2009
to play only once and then stop but the camera flash to keep looping.The sound is on a separate layer, but whenever I put the 'stop' feature in the ActionScript, it stops the WHOLE THING, so the camera flashes only once.Again, I want the camera flash to repeat, but the click sound to play only once.
View 1 Replies
May 30, 2009
I would like to play a sound every time I reach frame 2, but I'm a bit confused with the code. I read some tutorials, but they were about 2.0 and the 3.0 ones were poorly explained.
Let's assume I imported a sound named 'ping.wav'. What do I need to do to play that sound on frame 2?
View 1 Replies
Jul 17, 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 3 Replies
Aug 11, 2009
OK, say I have a button that does something, like go to the next frame, is there anyway to have it play a simple sound located in the library without looping?
View 8 Replies
Dec 16, 2009
I have sound playing in my flash file. My index file is a html file which calls the flash file, and when i run the html file, the sound doesn't play. Does anyone know how I can rectify this?
View 5 Replies
May 13, 2009
I have the loading audio file at frame one. However, I want to play the audio only at specific frame or frame lable. How do I do that? Below are my codes:
[Code]...
The above plays the sound as soon as the .swf file is loaded. But I want to play at certain point in time, say frame number or frame lable.
View 17 Replies