ActionScript 2.0 :: Linkage With Loading MP3s
Dec 4, 2008
I am working on a game, and I am using MP3s within the SWF file to load at certain times. In order to make them loadable, I have set up the Linkage properties to : -Export for ActionScript -Export in first frame The problem is, that it loads all the MP3s before the preloader even shows up, so there is a lot of time of blank screen. But when I take of "Export in first frame", I am not able to load the MP3s during runtime. Is there a way to access the MP3 files without exporting them in the first frame?
View 2 Replies
Similar Posts:
Feb 20, 2003
Does anyone have a tutorial (or steps to reproduce) showing a beginner the best method for loading several swfs end to end, so they play as one movie using ActionScript? What I need is: to have the first movie play and immediately when it ends, for it to stop and then have the second movie play, but each movie has a different mp3 sound and I can't seem to get both movie's and their respective mp3s to play as one long movie.
1) I've created 2 fairly robust Flas; horizon1.fla and horizon2.fla
2) I've made each fla into a seperate movie clip; horizon1_mc and horizon2_mc.(the last frame in horizon1_mc uses the same pic as the first frame in horizon2_mc -so that they will appear to play seamlessly as one long movie)
3) horizon1_mc needs to play using sun.mp3.
4) horizon2_mc then needs to play using sunburst.mp3
fyi: I've got the "FlashaMX Designer's ActionScript Reference" book but all I've found is how to load content (chap11) using static movie clips using "loadmovie" and I'm not sure how this applies to actual animated clips.
View 3 Replies
Oct 13, 2002
Dynamically loading mp3's. I have 10 buttons, 1 stop and the others track 01 - 09, these are all in one .swf file. The buttons are all on one layer, on another I have defined all my sounds like so :
firstSound = new Sound();
firstSound.loadSound("track 01.mp3");
through to
ninthSound = new Sound();
ninthSound.loadSound("track 09.mp3");
Then I have the actions for my buttons
on (press) {
//Track 01 Button
stopAllSounds();
[Code] .....
I have uploaded the 9 mp3's, the swf & html file to same folder and this is what happens: [URL]. When any of the 9 track buttons are pressed 7 of the nine mp3's download all at the same time from pressing 1 single button (no track 3 or 9 which play fine normally and have definitely been uploaded) and none of the sounds work. But, when I refresh the page the 7 mp3's that were downloaded now work. The stop all sounds still work on buttons 3 & 9.
View 7 Replies
Nov 4, 2011
I'm loading a number of MP3 files into my Flash (the number changes dynamically). I would like to be able to say, in total, how much longer all the files will take to load.
I can do this for each individual sound.Mp3.addEventListener(ProgressEvent.PROGRESS, test_function);
But each sound is loaded by an instance of my sound loader class, how can I pass the ProgressEvent up to the parent object, and then have it calculate the total time to load?
View 1 Replies
Oct 16, 2009
Flex complains if I want to create an object from a library symbol with linkage: 1180: Call to a possibly undefined method [linkage name]. So to avoid this, I create a class for that symbol, in this case extending BitmapData using Flex's new ActionScript Class feature. Flex create that class for me and the constructor looks like this: public function CustomBitmapData(width:int, height:int, transparent:Boolean=true, fillColor:uint=null)
[Code]...
View 6 Replies
Oct 21, 2011
I have a problem with loading SWF and access to their elements by class linkage in Adobe AIR 2.6 for Android.
Problem: I have two different .swf files:
file1.swf (in which MovieClip with name1 has class linkage 'mainScreen')
file2.swf (in which MovieClip with name2 has class linkage 'mainScreen')
They have some action script code, which I need to import in my application domain. Files downloading great. After downloading they are in differen app domains But when I'm getting elements by class linkage and add them to stage - only element which was loaded second is shown. Looks like second movieclip with same class linkage replaces the first one.
For this I'm using such approach:
how can I load two different elements SWF files, which have elements with same class linkage, or explain why I can not do this? When elements have different class linkages - all OK. But!!! It is working for web, but for air it don't want to work.
package
{
import flash.display.*;
[Code]....
View 1 Replies
Apr 20, 2010
I'm trying to create a linkage to swap movie clip dynamically. I already create a linkage and after my movie clip symbol actuall say Export: contact_idea. But when I try to attachMovie("contact_idea"). It does nothing. Is there anyway that I can test that the linkage is actuall linked?
View 2 Replies
Jan 16, 2007
I have an intro.swf file that is basically a movie with sound that is exported for actionscript but not exported in the first frame. I just stuck it in a movie on my timeline and it works great and the preloader works because it doesn't load the sound before the preloader. I use :
musicSound = new Sound();
musicSound.attachSound("music");
musicSound.start();
to play the sound in intro.swf.
However, now this intro.swf gets loaded into an index.swf and everything works fine and the sound plays as long as I have the sound included in BOTH the intro.swf and the index.swf and the sound is exported on the first frame in the index.swf. I was hoping I could remove the sound entirely from my index.swf since it already loads into the intro but so far
View 9 Replies
Jan 30, 2007
If I write a flash application that sequences different sounds in flash, does anyone know a way through actionscript or a third party program to get flash to export an audio file?
View 1 Replies
Jan 10, 2006
Does anyone have a good example of an application that does this. I am actually looking for away to load the mp3 onRelease, unless its better to load all the mp3s at the beginning. However I was thinking that would take too long.
View 8 Replies
Mar 7, 2010
could I use another array to say 'milk', 'baby', 'yes', 'ball', 'bird' as the words appear using short one word mp3s?
PHP Code:
var words:Array = ['milk', 'baby', 'yes', 'ball', 'bird'];
var step:int = 0;
var readTime:Timer = new Timer(500, 1);
[Code].....
View 2 Replies
Apr 19, 2009
I am building an 8 track Flash audio mixer where the sounds for each track are selected by the user from a list component and then loaded into a Sound variable at runtime.This can be done while the mixer is playing or stopped, and of course, it adds a lot of flexibility for making music.All actionscript is in external .as files and sounds are looped using the SOUND_COMPLETE event.So far, all loading/playing functions work perfect, but I`m having problems with gaps at the beginning/end of my mp3 files.I was told this was an inherent problem with mp3 files, so I tried using MPTrim to clean the silence up.I also tried starting the loop a bit late - sound.play (80, 1) - but the results are usually inaccurate and unpredictable.
When I import a wav file into the library and then export it as an mp3 file embedded in the .swf file, it sitll has a short gap.When I built a previous mixer in Flash MX (actionscript 1) there was no gap and all sounds looped perfectly! Of course, in this later case, all sounds were embedded inside movie clips on the stage and scripting was done on the timeline, so maybe that made a difference.I have spent long nights trying to find a solution to this, but to no avail.I read a blog where the writer went through all the steps I have and just gave up, but I know there is a solution.I have seen this sort of thing done on Flash mixer sites before (even sites with full-on audio sequencers) so I know it can be done.
View 3 Replies
Jun 2, 2009
When I stream an MP3 file with an embedded image, the first few seconds of the files are clipped.
I will need to find another server, or a viable workaround.
View 22 Replies
Sep 26, 2011
I have been using the new version of Flash since it came out in May or June and have had no problems with sound file import. Now today all of a sudden I can't import MP3s - I get an error that says it can't import the file, but nothing further to help me diagnose the problem. I have downloaded these from the web from a company that records files - the same company I have used before with no problems. The old files from them still work, but the new files, and recent MP3s I've downloaded won't work. I tried downloading on another machine with Windows NT but that didn't work either. I have had a programmer work with the MP3s to make sure they were indeed formatted as MP3, and those files won't import either. I am on Windows 7 Pro. I also turned off my firewall in case that was the problem, and still no resolution.
View 2 Replies
Jan 22, 2009
I originally posted this wrongly in AS3, I'm writing a small mp3 player. It reads the playlist from an xml file, then at the end of a song (or when the "Next" button is pressed) automatically plays the next song in the list.
My problem is that if the song is a large file (around 16MB), the player doesn't play the song -- I have to click pause then play a couple of times to play it.
[Code]...
View 0 Replies
Aug 15, 2006
I need to pre-load multiple external MP3s. I have a preloader on my flash piece that preloads the SWF file and shows a progress bar and all that jazz. I am using the Sound class to load all the MP3 files when I need them (they are voice overs).
Is there a way to hook the preloading of those sound files into the preloader that I already have and then just call them up when needed?
View 2 Replies
Jul 22, 2003
I use a free web host for a site but they don't allow uploading of mp3 files (they filter and block them)
I want to offer visitors a choice of background music that would have to be streamed or loadMovied'ed as mp3 files, here lies the problem.
I thought a work-a-round would be to have a small empty movie off stage that contained the swf music file but I then thought that someone might have a more elegant solution.
When you use loadMovie to download a swf file into a parent movieclip, what's the best way of initially filling the parent movie BEFORE anything is downloaded, assume you use attatchMovie - is this correct ?
View 6 Replies
May 7, 2009
Just installed Windows 7 RC (7100), and got the latest Flash player for IE8 and Opera. My site [URL] has a music player I created that plays (streams) MP3s from a Flash Comm Server I run. The player works fine with Flash Player version 10.0.22.87 on other platforms, but not in Windows 7. Once you pick a song, it should start immediately. Even clicking the play button doesn't work. The symptoms make me think there's a problem establishing the netconnection for streaming. Wondering if anyone else has Windows 7 specific problems with Flash player?
View 3 Replies
Sep 29, 2009
Will the FLVPlayback Component (version 2.5.0.15) play an MP3 file without it having to be streamed through a Flash Media Server? All I'm looking for is to place a player into my Flash that plays an MP3 file that's in the same directory as the SWF.
Here's my code... it's pretty simple:
import fl.video.FLVPlayback;
var myMusic:FLVPlayback = new FLVPlayback();
myMusic.source = "mySong.mp3";
myMusic.skin = "SkinOverPlayMute.swf";
myMusic.skinBackgroundColor = 0xCCCCCC;
addChild(myMusic);
View 3 Replies
Oct 3, 2003
Before you get all worked up about seeing the same question again...let me tell you this.. I DID use the search function and I DID find some interesting things...but just not quite what I am looking for... As the Subject title suggests...I am looking for a preloader for dynamically loaded mp3s... As in the tutorial on kirupa I let the mp3s stream but still there is a little gap before they actually start playing-probably worse on smallband connections
View 5 Replies
Nov 17, 2004
so Macromedia says Flash can't really loop mp3s seamlessly, and suggests importing WAV files. But if you're using AS to load an external sound at runtime, this is not possible. So I ask you, coding geniuses, is there a work-around to the silence that Flash adds to the beginning (end?) of an mp3 file, thus causing it to loop incorrectly (I've already tried adding a decimal to the secondsOffset and it sounds awful).
View 2 Replies
Jun 12, 2007
I was testing out different load times and encoding properties for my mp3 files to be played through Flash and came upon something weird. The files I encoded with a Resampling rate of 32000hz when played through my xml MP3 player are sped up enormously; it was as if I changed the tempo to something it shouldn't be. I have a position / duration field and the duration of a 30 second song shows up as 21 seconds and the music played reflects that time change in terms of how fast the song is played.
View 3 Replies
Oct 3, 2003
I am looking for a preloader for dynamically loaded mp3s...As in the tutorial on kirupa I let the mp3s stream but still there is a little gap before they actually start playing-probably worse on smallband connections- and well I know the music is coming but the visitors don't so could anyone help me out to make a preloader?
View 5 Replies
Nov 26, 2003
I made a little buffer script for dynamically loaded mp3s. It's supposed to play the file after 20% is loaded (these files are a couple of MB). Anyway, it doesn't play after it's buffered to the 20%. Works when I just test movie in flash. It doesn't work when I test "streaming" in flash. Here's my buff script, etc.
Code:
nrMix=new Sound(djsetMC);
nrMix.loadSound([file], false);
preloadNow=false;
this.onEnterFrame = function(){
bytesT = nrMix.getBytesTotal();
bytesL = nrMix.getBytesLoaded();
[Code] .....
View 10 Replies
Aug 29, 2002
if your using mx why not just take advantage of the ability to load external mp3s. if not you would have to have something like php to send the track name and info to the music player to tell it what to open.
View 5 Replies
Sep 4, 2004
I have brought this up at the end of another thread, but thought it needed it's own.Trying to loop a dynamically loaded mp3 of a cicada.[code] Why does this not work?I understand that the start function isn't needed, as it's a streaming object, but I thought if I added it, it would loop.This syntax is the only way I know to loop a sound object in AS.URL...
View 2 Replies
Sep 26, 2004
I have always used getURL("whatever.mp3", "_blank") to allow a user to play an external mp3 on his/her own systems player (i.e. Real Player, Quicktime,etc.) and never had a problem. A new window opens up with (in my case) a Quicktime player/progress bar and I can hear the music play almost immediately. Aside from scripting a custom mp3 player, is this an acceptable way of playing mp3s on a website?
Here's why I ask: A site I just built for someone doesnt quite work that way. My client says that Real Player is his default player for mp3s and the popup window reads "Error page not found". anyone point me to a tutorial that explains mp3 file-type associations and hopefully provides a solution to my clients errant popup?
View 5 Replies
Feb 5, 2010
I want to be able to deliver music/mp3 using a flash player but I'd like to make it so that the mp3 files cannot be sniffed... i.e. you can't use safari, firebug..etc. to find out the mp3 location using the activity window. I don't have a streaming server.
View 7 Replies
Apr 23, 2011
So is there officially no way to load mp3s externally without the pause between loops? I need to know if I can rest at night or not. If it is absolutely without a doubt impossible, I will look at alternatives.
By the way, this would be for background game music. I need a seamless loop and we are using mp3s.
View 4 Replies
Aug 16, 2006
I'm working with some other developers at my office on a multimedia player interface that displays ads and MP3s/FLVs from a user-controlled database of content.Turns out, in our v2 iteration that uses Flash 8 and the related video player, MP3s don't jive. Is that right? We're just now migrating to Flash 8 development, particularly for video, and we were suprised to see the functionality we had for MP3s with the MediaPlayback component go away. Is there a better way to integrate the Flash 8 video player with audio than what we did before?
View 1 Replies