Flex :: Play A Sound Every 2 Seconds?
Jul 2, 2010I want to know how to play a mp3 sound every 2 seconds.
View 1 RepliesI want to know how to play a mp3 sound every 2 seconds.
View 1 RepliesCan some only indicate a small piece of FLEX/AS code which plays mp3 and with play button only,the objective is to play a sample sound for around 5 to 10 seconds.And the compiled swf should have the mp3 embeded in it
View 1 RepliesI'm trying to figure out how I can make the sound file that I load into Flash start at x seconds and end at x+30 seconds.So basically, I just want a 30 second sample to play starting at a specific time position. Does anyone have any advice on how to do this or have links to somewhere I can read up on it?
View 4 RepliesI'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]...
Ive attached sound in to mySound variable. How to get how many seconds the sound in mySound have played?
View 1 RepliesSo If I play one sound I use [code]...
And so I'll get data, but If I have 20 sounds playing and I want to get data from the sound I here as a resalt of data mix of all that sounds.
I have the follwoing code but I Cant figure out how to make the sound play after 3 seconds.
Code: Select allvar fl_SC:SoundChannel;
function startAnimation():void {
var s:Sound = new mySound();
[code]...
I get the following error when I compile the file with the comments part taken out.Scene 1, Layer 'Layer 1', Frame 1, Line 61061: Call to a possibly undefined method start through a reference with static type Class.
i'm using loadSound() to play a mp3 file, but after couple of seconds of playing, it restart to from start and then play normally... when a file already play at least once, everything going as normal.
song1= new Sound();
song1.onSoundComplete = function(){
song1.start(0,1);
};
song1.loadSound("mp3/"+curMP3,true);
you can hear it online here: domusventures.com/furnitures
I'm trying to build a play back progress bar for an audio recorded from the users microphone. It works okay but when I play back I can't figure out how long the audio is so I can calculate percent played for animating a progress bar. Most of these snippets can be found in LiveDocs and online examples from bytearray.org. Audio is stored in the bytearray and the sound is played back in a sound channel.
[Code]...
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 have 3 flv videos that I want to play if the user doesn't move the mouse in 10 seconds.. (I don't want all of them to play, I want to select a random flv video to play each time) at the moment I am just playing the video without any of the above happening:
var video:Video = new Video();
addChild(video);
var nc:NetConnection = new NetConnection();
[Code]....
Would it be best to stream the video or import it into a movieclip?
I need to have a swf load at the beginning, but I don't want to play about the last 3 seconds of the video.
basically have my swf play for "x" seconds?
Heres what I Have so far.. Currently it is set up to play the swf, but subtract "x" seconds from it but for some reason it doesn't seem to work[code]...
How To Autoplay after 5 seconds.
View 9 Repliesi have a simple animation which i made it with masks ,and i want to play this animation every 7 seconds ,so is there an action script code that let me play this animation with loop every 7 seconds.
View 4 RepliesIf i want an animation to play after 20 seconds where there are no mouse movement, how should i write the codes? If within this 20 secs, there is movement, then it should restart counting from 0 seconds again ...
View 9 RepliesI have a Logo.swf file which play once and stops. I want to use this flash movie in another flash project using LOADER. What actually I need is, I want to play this movie every 10 seconds interval using Actionscript 3.
View 4 RepliesI am working in AS2, and am looking for a code that allows me to stop the frame (which is easy: stop() and then make that frame "play" if you will for 30 seconds, and then gotoAndPlay("nextframe"). Is this even possible? I know there's a getTimer(); code, but I have no idea how it works. (I have animations going on in the different frames through movie clips, not on the timeline. Basically trying to make a "movie" with flash)
View 8 RepliesI have an intro and I would it to automatically go to Scene 1 after 30 seconds.
View 3 RepliesThe movie play's. At a frame, for example frame 45 I wanna make a pause for 20 seconds and then play next frame ( 46 ).How can I do this?
View 4 RepliesI have an intro and I would it to automatically go to Scene 1 after 30 seconds.
View 3 RepliesI want to play random videos after 10 seconds if the mouse has not been moved. I am getting this error:
[Code]...
I need a script that would play an animation consisting of 4 frames for, say 20 seconds. The order of those frames needs to be random but it has to stop after 20 seconds.Next, frames need to change each, say, half a second. But, as much as I MIGHT be able to figure this one out, here's what made me post here. The four frames are four keys on a keyboard. Each time frame changes to a corresponding key drawing, one has to hit the right key on the keyboard to make a different animation on the stage, animate.
View 14 Replieswhen I use the following function in my doc class to launch a local video, the video "freezes" after a few seconds. This happens no matter what video I am trying to play.
Code:
private function startVideo(e:MouseEvent):void
{
[code].....
i have a button on the stage...when clicked i want it to wait 2 seconds, then gotoandplay a porton of another movieclip
View 4 RepliesThe slideshow on the left is the one I'm talking about, not the Flash video on right.
Anyway, to make it work, I added a whole bunch of frames between the moving images to pause it - to give reader time to see pictures and words - then it goes on to next one. instead of doing it this way, I am wondering if I can just put an action of some kind on a frame to tell it to pause for X number of seconds, then play again?
URL...I have created an animation which has the bird fly up & chirp, and would like to replace all the birds with this.For now I have replaced all buttons w/ the animation on stage and they all lie on the 1st frame. But thats kinda not what I want.How can I get any one bird animation to play, one at a time, at a random interval of 15-45 seconds?
View 2 Repliesi'm looking for a script that tells the timeline to start to play frame 25, after 5 seconds.i've found a few codes online but cos they are for different purposes, i just cant seem to custom it to work accordingly.
View 5 RepliesI'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 RepliesI 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