ActionScript 3.0 :: Loop External Audio Files?

May 14, 2009

I would like to have an external file (actually, one of several randomly selected files, but I can handle that) play and loop but I have yet to understand how to do the latter. My code works great for playing the file through one time, but when playback completes, it's done. How do I loop the audio? Is there perhaps a listener that can wait for the file to finish playing, then call a function to play the sound again?

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Listening For The End Of External Audio Files?

Aug 22, 2011

I have an event listener that is listening for the end of an eternal audio file. I want to move to the next page after an external audio file has completed playing: here is the code I have so far:

ActionScript Code:
d1Channel.addEventListener(Event.SOUND_COMPLETE, soundComplete, false, 0, true);
function soundComplete( e:Event ):void {
gotoAndPlay("next_page");
trace("sound over");
}

This seems to work intermittently. Sometimes it will, and other times it won't. Is there anything wrong with my code or theory. Is there a better way to do this that will yield more consistent results? Or do I need to import any Flash Events?

View 5 Replies

Flash :: Merge Two Flv Files (contain Audio) In PHP Without External Program?

Nov 1, 2010

I need to merge two flv files, using PHP. I can't use exec method. I am wondering if is possible to cut some part of one flv file (audio tag) and paste to another and overwrite duration for output file. [URL]..file-length-using-pure-php but I do not know how can I get an audio tag from a flv file? How many audio tags a flv file has? Which tags should I overwrite in output file to be able to play audio from two merged files?

View 1 Replies

ActionScript 3.0 :: Getting External Audio And Video Files To Start At The Same Time?

Jan 16, 2010

I've got a swf which uses AS 3 to load separate audio (mp3) and video (flv) files. The reason they're separate is because the audio is just background music while the video is navigatable. The video kinda goes along with the audio, but it's not imperative that the two sync perfectly. However, the audio always starts playing before enough of the video has loaded to begin streaming.I'm at a loss as to how to get the two to at least START at the same time.

View 14 Replies

ActionScript 2.0 :: Use LoadMovie Function Inside Loop To Load External PNG Files / When Game Is Loaded

Jan 19, 2009

I'm trying to use a loadMovie function inside a loop to load external PNG files when my game is loaded. Unfortunately, I can't get even a single loadMovie to work correctly, much less execute a bunch of them.The code is on the root time line, and is targetting an empty movie clip that is nested inside about 3 levels. There is a button, with a movie clip on it, and the empty clip I'm trying to load into on that.so the full target path is myBox_00.smallBox.myLogo(myBox_00 is the button, smallBox is the movie clip, and myLogo is the empty)[code].I even tried using a JPG image instead of a PNG and still no luck. The best I could do was number 4; and that didn't work, all it did was SOMETHING instead of NOTHING... unfortunately that something was to make the button (myBox_00) disappear entirely T_T.I've never had much luck with loading external images. What am I missing here?

View 9 Replies

Media Server :: Recording Video/audio Files Using Flash Media Server Through Rmtp, And Allow Users To Access The Recorded Files Through Http?

May 25, 2009

As titled, what is the way to record video/audio files using Flash Meida Server through rmtp, and allow users to access the recorded files through http?What I am trying to do, is to record a user's microphone's input and save it to the server.fterwards, I would like other users to be able to access the recorded files and mainuplating the audio data, by computeSpectrum(), to do some visualization of the audio. As I know computeSpectrum() cannot work on streaming files, so I think I need to access the recorded files using http instead of rmtp. Is that true?

View 1 Replies

Professional :: Audio Won't Loop Seamlessly

Dec 30, 2010

I have an MP3 of helicopter blades that's about 4 seconds.  I put this as a layer in my movie of the helicopter, yet the sound "hesitates" when the movie loops. The audio goes from edge to edge of every frame of the movie, yet I still get the hesitation. 

View 6 Replies

ActionScript 2.0 :: Play An Audio Loop Across Different Swf

Nov 29, 2009

I am working on a project which I have to link a few swf. I have used loadMovieNum for the linking, meaning the actionscript I apply for my buttons look like this:

on (release){
loadMovieNum("filename.swf",0);
}

Above script enables me to link the files. However, I wish to play an audio across all files CONTINUOUSLY. Is there ANY way to do it? I tried putting the audio in another file and load the movie on level 1. But everytime when I jump from one file to another, the audio stops.

View 2 Replies

Audio Timing In .fla Files

Jun 27, 2009

I'm making a flash movie and I have all of the audio timed out right in the .fla, but when i hold Ctrl+Enter to play the .swf, the audio is not timed right. I haven't expoted the video yet so I'm hoping that the file will be fine when exported.In the file attached, (it is unfinished) the audio, "You talkin' to me?" should happen after the camera has already finished panning up to the man's head. Instead, the audio plays while the camera is panning upward.

View 3 Replies

.net :: How To Compare Two Audio Files

Nov 24, 2009

How to compare two audio files to see the difference of them.

View 4 Replies

ActionScript 2.0 :: Loop Video But Play Audio Once Only?

Apr 13, 2012

I need to create a flash video for a website of a product rotating through 360 degrees - looping seamlessly. This will be 100 frames long. I then need to add a 500 frame voice over.

I need to optimize file sizes so what is the best way to tackle this?

Is there a way to loop the video with actionscript but not the audio? i.e. rather than extend and repeat the video phyiscally in the timeline inlind with the audio length - as I assume this will increase the file size?

View 2 Replies

Web Development - Audio Files Use With SWFOBJECT?

Feb 9, 2011

I'm converting some old RealMedia audio-only files to use with the SWFOBJECT Flash player on the web. What's the best container/format to use for the files? I think AAC is probably the best format, but then can you play a *.aac file in the Flash player?

View 2 Replies

ActionScript 2.0 :: Using An Audio Files Data?

Oct 5, 2005

If i load an external mp3 file from either the internet or a user's computer, can i use the file's details (artist, album, etc).I don't know how to explain it, i think you can set the file's details in windows media player or winamp, and it gets stored with the file.

View 5 Replies

ActionScript 3.0 :: Protect Files (make External Then Unopenable Such As .lib Files)

Jul 19, 2011

I'm working on making a pretty chunky game engine for games I plan on making, but I was wondering if you make external AS files unopenable such as .lib files, so that if I give it to a friend that wants to use it, he/she cannot change my code. Is there anyway to make external AS files unopenable? Also, obfuscation isn't an option for this problem as it only stops the people who hack the finished product, not stopping people who have access to the actual files.

View 2 Replies

Play Audio/video Files In Flex?

Oct 18, 2010

I'm using flex 3. I've successfully played video and audio files by using following libraries:

flash.media.Video flash.media.Sound Live docs link. But the limitations are as follow: Video class can be used to play only flv file format. To play mp3 files I must use audio file.

So can I play most of the famous audio/video files by using single method?

Well by checking the file type we can some how achieve it. Then I should create a component for that.

So can any one suggest me such ready-made components? or is there any other alternatives to play audio/video files?

View 1 Replies

ActionScript 3.0 :: Play Mp3 Audio Files In Flash?

Jan 23, 2009

1. How can we import these mp3 audio files(These audio files are dynamic in nature as user can add or delete these files through login area) in flash?

View 1 Replies

ActionScript 3.0 :: Activating Different Audio Files Over Different Frames?

Oct 6, 2009

Recently I bought CS4 as I decided that I wanted to design and create a new website for hosting my music productions, I have used dreamweaver in the past so I am quite familiar with XML etc but I wanted to make something with a little more to it. After talking to quite a few people and reading into it all I found that this would be my best option. After thinking that it was all going to be quite nicely straight forward Im banging my head against a wall in trying to learn and understand Actionscript.

I have currently designed all of the pages, I have used a few tutorials on actionscript 3.0 and have the whole website is functioning, my pages, frames, labels and buttons are all functioning how they should on the timeline and there is around 14 pages..

The problem i've had for around 4 days now is getting all of my audio previewssnippets to work, i have around 20 of these and I need them to be spaced out on about 6 pages (frames) ; Each frame is a different release etc

In each frame, I have 8 buttons 4X play buttons next to each track and 4xStop next to that... play_btn, play_btn2, stop_btn2 and so on..

I've set it so that all I want to do is be able copy the code into the other frames and also the buttons (which are on a different layer) and then all I have to do is enter the filenames in the code below (Track1.mp3, Track2.mp3 etc)

So... it all works fine on my first frame of my release page.. The audio plays and stops for each track, no problems at all.

Now,, the problem happens when i copy the actionscript from my first release page(frame) to the next.. its about 25 duplicate functions, duplicate variables etc

Is there some kind of way I can put all of this into some kind of Class or Tag.. And this code only operates inside this frame and not in the next to cause the duplicate errors? I realise that I could Label every single variable, function and button differently covering all of the frames so that it dosn't cause the duplications to occur but, I am hoping there is some other way around this..

import flash.media.SoundMixer;
//PLAY TRACK 1
var soundReq:URLRequest = new URLRequest("track1.mp3");
var sound:Sound = new Sound();

[Code]....

View 2 Replies

ActionScript 3.0 :: Mixing Different Audio Files And Exporting To Mp3?

Jul 10, 2010

it is possible to mix different audio files and export them into an mp3 file for the end user to download to his computer.Actually, I know it can be done because they do it in various sites (aviary's myna , looplab , audiotool , remixgalaxy), I just need help on how to do it. I have the mixing part pretty much covered. My problem is with exporting the file to an mp3. I imagine that some external progamming language might be required, but I couldn't find an answer on Google... Php is my prefered language, but I'm willing to learn another one if it's not possible with PHP.

View 6 Replies

ActionScript 3.0 :: Loading Audio Files In The Background?

Oct 14, 2011

I've created a Flash slideshow where I load the narration audio MP3 file at the start of every slide with the typical code listed below. Of course this introduces a delay for the viewer at the start of every slide while its related MP3 file downloads.

Is there a way to download the MP3 files for future slides in the background while the first slide is playing in order to eliminate this delay for all slides except for the first one?

var soundReq:URLRequest = new URLRequest("audio/Slide_1.mp3");
var sound:Sound = new Sound();
var oneSoundChannel:SoundChannel = new SoundChannel();

[Code]....

View 1 Replies

ActionScript 2.0 :: Starting And Stopping Audio Files?

Jan 10, 2007

I have 4 sets of 2 buttons (on and off):

Each set of buttons I want to trigger and stop a different audio file. (4 audio files in total)

I would like for the sound files to be saved within the .fla file.

I have done lots of searching but I still haven't been able to get this to work.

View 1 Replies

ActionScript 2.0 :: Control The Audio Files Playing?

Apr 22, 2009

I am new to action script.I am going to control the audio files like media player. How to control the audio files playing

View 1 Replies

ActionScript 2.0 :: Stopping The Audio Loop Without Stop The Entire Animation

Mar 21, 2009

I have a problem with an animation because I want to stop the loop sound without stop the entire animation what can I do to make correctly this action please? I tried to make a movieclip to control individually of the center time line but i dont get good results.

View 4 Replies

ActionScript 3.0 :: Playing A Series Of Extrernal Audio Files?

Nov 8, 2008

I am bulding a slide show with syncronised audio I have aworking version which will load a series of jpgs names 1.jpg, 2.jpgand a series of mp3s (1.mp3 etc). The problm comes when I wanted toadd play and pause buttons.It works until on the second audio file if I click pause thenpay it goes back to audio file 1.mp3. Can't for the life of me findthe right code

View 1 Replies

Professional :: Predownload(cache) Audio Files Then Play?

Jan 23, 2011

I'm going to develop an online examination system. There are many audio files in the exam and it's time dependent. I'm looking for a way to predownload(cache) audio files so students won't waiting for file loading after examination starts. I want to use a single page to download files and this step is not include in the exam time.

View 3 Replies

Flash :: Multiple Audio Files One Sound Object?

Nov 11, 2010

Is it possible to play multiple sound files using a single sound object? (I've looked into this back when I was using Flash CS3, but I want to know if anything has changed.)

(I'm trying to make a playlist which will play music in the background of my SWF movie and then have a frame where users can change the song and the volume.)

View 2 Replies

Playing Local Audio Files With Flash And/or HTML5

Jul 9, 2011

I realize it is possible to play audio with Flash and HTML5 by passing a URL.

However, is it possible to get a reference to an audio file using a file browser (either with HTML5 or Flash), to then play this local file, again using either Flash or HTML5?

Of course, this should happen without the interference of a server. Since the file is already on the local system, it does not make sense to route it through a server only to receive the same file again.

View 1 Replies

ActionScript 3 :: Generate Silence Audio Files With Adobe Air

Dec 13, 2011

I want to build an air app that takes input (for example a list of filenames to be generated) from the user and generates sound files with desired naming. The sound files should be an "empty/silence" sound (wav, aif or mp3). Is it possible the generate such a file? If not, can I use an existing sound and embed it into the app and have that as a source when generating the files? The purpose of this is to get a structure of files ready in the project that will be replaced by our Sound Director. This way, we can trigger all sounds before they are created.

View 1 Replies

ActionScript 2.0 :: Pause And Play Multiple Audio Files?

Nov 5, 2010

I have a flash "hear from the experts" video in which multiple speakers discuss an issue. I have it set up so you can listen to each speaker one at a time, however, I don't know how to pause and play each speaker so if you wanted to pause it and return or pause it and start a different speaker, you could do that and then resume where you left off. It would be even cooler if I could add some sort of status bar that shows how far into the audio you are, and you could skip ahead. I uploaded the file in CS3 - I had to actually delete the MP3s that are triggered to play on each play button in order to make it small enough to upload, but if you look at the code you can see it there.

View 0 Replies

ActionScript 3.0 :: Syncing Externally Loaded Audio Files?

Mar 30, 2009

I've developed an application which uses a (dynamic) XML file to load in several files; a maximum of four MP3 files and a number of JPG files.When everything has finished loading, the user can press a "Play" button. The application could be described as a "mixer"; it's used to give online music lessons and to facilitate this, the sheet music is loaded (cut up into into several JPGs) which move horizontally on the screen like a marquee, while the music it represents begins playback. The music exists of several MP3s so that the user can mute (e.g.) the vocals or the drums, allowing him to focus on (e.g.) the guitar.

So what's going wrong, is that the audio files are not playing in sync. They are all pre-loaded so any delay between files shouldn't be sought in the files not being fully loaded yet. For initiating playback in the application, I'm using a simple function with a for loop in it, which sets each instance of my sound class to start playing at position 0 of its timeline (I've added in highlighting for all of the "code" blocks in my post, to keep everything easy to read through):

Code:
function playSounds():void {
for (var iCnt:Number = 0; iCnt < aSound.length; iCnt++) {
// Start playback for each sound, at the time position set in the

[code]....

Seeing as this didn't work, I have no clue what I could give a shot next... so if anyone has any ideas or suggestions, it would be greatly appreciated! Something else I noticed, was that if I run the application on very fast PCs, the MP3s are almost always in sync, but the PC that I'm developing on isn't that sluggish either and they hardly ever run in sync on it - so it will form a problem for pretty much all of the people who will use the application.

View 1 Replies

ActionScript 3.0 :: Create A Player To Stream Audio Files?

Feb 22, 2011

need to create a player to stream audio files (mp3 and other audio extentions) in my website. To create this player I used flash cs3 and actionscript3.I found actionscript 2 is easyer to creat and get duration (mysound.duration) but in ac3 I can't get sound duration with this syntext : "mySound.duration"attention : In ActionScript3 BEFORE loading is completed , I need my audio file in player to show duration and displayed minute and second in the stage.I tried so many solutions in the internet but all of them provide sound duration AFTER loading is Completed (but I need sound duration BEFORE loading is Completed)attention : My audio files are multi bitrate rang exp.(24 kbs , 34kbs , 128kbs or higher).I am trying to get audio DURATION of audio "total bytes" but these solutions just are right for only 128kbs audios.

View 1 Replies







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