ActionScript 2.0 :: LoadSound With Large Mp3s?

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


Similar Posts:


ActionScript 3.0 :: LoadSound With Large Mp3 Files?

Jan 21, 2009

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.

The code is roughly:

Code:
function playSong():Void
{
tune = new Sound();

[code]....

where 'tunes' is an array of paths to the file. I've missed out a couple of things, but that's basically it. Is there an issue with loadSound needing to load some of the song first?

View 0 Replies

ActionScript 3.0 :: LoadSound With Large MP3 Files

Jan 22, 2009

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.

The code is roughly:
function playSong():Void {
tune = new Sound();
tune.onSoundComplete = playSong;
tune.loadSound(tunes[++current],true);
}

Where 'tunes' is an array of paths to the file. I've missed out a couple of things, but that's basically it. Is there an issue with loadSound needing to load some of the song first?

View 2 Replies

ActionScript 2.0 :: LoadSound From Php Url?

Jan 28, 2010

actionscript and i have a mp3 player that loads an mp3 file from a certain url. my code is this:ow can i change this to load an mp3 file from a php code exactly like this:

<?php echo base_url(); ?>uploads/<?php echo $artist_id; ?>/music/<?php echo $filename; ?>

View 1 Replies

ActionScript 2.0 :: LoadSound Won't Play In IE

Nov 3, 2004

i have a script on a frame at the root of the movie.

[Code].....

the problem is, that the sound isnt loading in Internet Explorer. I thought it may have been SP2 causing problems but i went and tested it on school's computer SP1 and it still didnt work. In firefox it works fine, so the AS must be correct (which im positive it is) i just cant work out for the life of me why it isnt loading. I have also tried loading the sound onto a movieclip and not from the frame
i.e.

[Code]....

and this didnt work in IE either. Works again in firefox though.

View 1 Replies

ActionScript 2.0 :: LoadSound Prob

Jan 7, 2006

I applied folowing script to load my mp3 file. Problem is my mp3 won't loop:s. Anyone see the prob in my script? i'd also like the mp3 to fade in and when I push the stop button it fades out.

loopSound = function () {
myMp3.loadSound("streamsound.mp3", true);
myMp3.setVolume(50);[code]...

View 1 Replies

ActionScript 2.0 :: LoadSound Won't Play In IE?

Nov 3, 2004

i have a script on a frame at the root of the movie.

// background sound (war environment)
_global.bgsound = new Sound();
bgsound.loadSound("sounds/mp40.mp3")

[Code].....

the problem is, that the sound isnt loading in Internet Explorer. I thought it may have been SP2 causing problems but i went and tested it on school's computer SP1 and it still didnt work. In firefox it works fine, so the AS must be correct (which im positive it is) i just cant work out for the life of me why it isnt loading. I have also tried loading the sound onto a movieclip and not from the frame i.e.

// background sound (war environment)
_root.createEmptyMovieClip("myEmptyMC","2");

[Code].....

and this didnt work in IE either. Works again in firefox though.

View 1 Replies

ActionScript 2.0 :: CS3 Mp3 Using LoadSound Restarting After 2 Seconds

Mar 8, 2009

I'm having some trouble with loadSound. I've created a portfolio section for a company that has short (1:30) mp3 clips. The clips are being loaded in dynamically through an XML doc. For whatever reason, when the sound loads, it plays for almost exactly 2 seconds, then restarts and plays all the way through. My flash is set up in three frames, the first two are the main gallery, then frame three is where the sound is loaded and played. "p" is defined by which icon in the gallery is clicked.

[Code]...

View 2 Replies

ActionScript 2.0 :: Loadsound Compression Details?

Apr 28, 2006

was wondering how sound files are compressed when they are retreived using the loadsound command? do they use the original file compression or does flash muck about with it? The reason i ask is that an audio file is coming out sounding very different to the original

View 1 Replies

ActionScript 2.0 :: LoadSound Selective Lockup?

Sep 26, 2008

I've got a quirk here I'm having a difficult time hammering out.I've got a control object with a sound object as a child. This global sound object has another sound object as a child:

Code:
Master = {};
Master.soundManager = new Sound();
Master.soundManager.BGM = new Sound();
\
In the main loop of my program, I have a function (VNELineReader()) with a switch looking for particular cues, one of which is loading a sound into BGM:

Code:
case "bgm_load" :
Debug.trace('Loading music: Sound/'+args+'...');
Master.soundManager.BGM.onLoad = function() {[code].....

Now, when I run this in the Flash 8 IDE, no problems. The script waits for the sound to load, resumes, and later on plays BGM with a case "bgm_play". However, if I compile the program and play it with the external flash player, the loadSound call causes the player to freeze, eat up about 600MB of memory in task manager, and then crash. It also does this if I open the .swf in Internet Explorer. However, it works fine in Firefox.

View 1 Replies

ActionScript 2.0 :: Mp3 Using LoadSound Restarting After 2 Seconds?

Mar 8, 2009

I'm having some trouble with loadSound. I've created a portfolio section for a company that has short (1:30) mp3 clips. The clips are being loaded in dynamically through an XML doc.

For whatever reason, when the sound loads, it plays for almost exactly 2 seconds, then restarts and plays all the way through.

My flash is set up in three frames, the first two are the main gallery, then frame three is where the sound is loaded and played. "p" is defined by which icon in the gallery is clicked.

Here is my code for reference:

Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
if (p == 0) {

[Code]....

View 1 Replies

ActionScript 2.0 :: LoadSound Doesn't Loop?

Jan 1, 2004

why this doesn't work? I'm about to go crazy! It's just supposed to be background music and it plays once then stops. WHY?

[AS]
backsound = new Sound();
backsound.loadSound("sounds/loopy.mp3", true);

[code]....

View 1 Replies

Flash :: Export Mp3s From It?

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

ActionScript 2.0 :: Load Mp3s From XML With It?

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

ActionScript 2.0 :: Cross Domain LoadSound Woes?

Jul 24, 2009

I'm trying to load an MP3 file from a different domain using loadSound while publishing from flash?

View 1 Replies

ActionScript 2.0 :: LoadSound Doesn't Make The Loop

Jan 1, 2004

It's just supposed to be background music and it plays once then stops. WHY?

[AS]
backsound = new Sound();
backsound.loadSound("sounds/loopy.mp3", true);
backsound.onSoundComplete = backsound.start;
[/AS]

I have also tried backsound.start(0,999); but it doesn't work either.

View 1 Replies

ActionScript 2.0 :: LoadSound False - When Set It To True It Does Play?

May 3, 2004

I have a button that imports an mp3 and is supposed to load completely before playing. Problem is, when I set the loadSound to false it doesn�t play at all, but when I set it to true it does play. Here is the code:

Code:
carregarSons = function (som, numeroVolume) {
_root.som1.stop();
_root.som1 = new Sound()[code]....

View 8 Replies

ActionScript 2.0 :: LoadSound Randomly On Initial Start?

Oct 15, 2007

I have an MP3 player that i want to put on my site, I would like to have the first song be played randomly so it dosent grow stale.

Here is the A.S. i'm using.

Code:
var musicFolderName:String = "music/";
var curTrackNum:Number = 0;
var curPlaybackPos:Number;

[Code]......

View 4 Replies

ActionScript 2.0 :: How To Get LoadSound To Read Correct Path

Dec 4, 2007

What I'm trying to do is for a play button to just play the first thing that is on my XML file. I have the XML file played out like this and it is being loaded earlier in the actionscript file.

<song>
<loc>testaudio/fire.mp3</loc>
<songtitle>Fire</songtitle>
<artist>Jim</artist>
<album>Album #1</album>
[Code] .....

The mySound.loadSound(loc[0]); is coming up with an unknown, and this is because the file path is not in quotes because it wants a URL, not a variable (loc[0] should be passing on the file path for the first song in the XML file). Is there some way to change the variable so that the loudSound() function reads the path correctly? It works fine when I just pop the file path in there instead of loc[0].

View 3 Replies

ActionScript 2.0 :: Loadsound External Mp3 And Play From Middle

Apr 27, 2009

I am unable to play the mp3 from the middle

[Code]...

View 1 Replies

ActionScript 3.0 :: Use Arrays For Short Mp3s?

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

ActionScript 3.0 :: Looping Mp3s Without Gaps?

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

Stream MP3s With Embedded Images?

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

Professional :: Importing MP3s Into Flash CS5.5?

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

ActionScript 2.0 :: Preloading External MP3s?

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

ActionScript 2.0 :: MP3s Not Allowed With Web Host?

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

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

ActionScript 2.0 :: LoadSound/attachSound Lowers The Original Pitch?

Feb 3, 2010

i am having this very big problem(for my particular application). i am writing this music application in flash and i use as2 to load randomly specific sounds which are in the same folder as the movie. the problem is that i need the sound to be replayed with fidelity and it seems flash is lowering the pitch of the "music" by a halfstep(it does the same when "previewing" it from the library). musically speaking, if i have an mp3 containing A at 440 hz played with piano timbre, Flash will lower it and when it is played through the flash player is its played as a G sharp(35 hz lower). I thought that if i will replace the attachSound with loadSound and the sound will be loaded externally and not from the library the problem will be solved. it seems that this won't solve the probem. the sound just doesn't want to be played at the frequency it has in the file from which is loaded. i had read somewhere that this is a flash player's bug.

View 8 Replies

ActionScript 2.0 :: Stop Streaming LoadSound From Starting Immediately?

Nov 9, 2010

I have an AS2 file where I want to load an external sound, but not have it start until the play button is pushed. It is a large file so I want it to load streaming, but can't figure out how to keep the streaming true without having it start immediately. Here is the code:

this.createEmptyMovieClip("craigTalks_mc", 10);
craigTalks = new Sound(craigTalks_mc);
craigTalks.loadSound("mp3/Craig_BP.mp3", true);[code]....

I have three audio files using the same code that I want the user to be able ot toggle on and off. When I set the loadSound isStreaming variable to false, it works perfectly, but at true, all three files start at once, and the pause doesn't work! However if I keep it at false, once I load it to the website it doesn't work, I believe because it is taking too long for the audio files to load.

View 4 Replies

ActionScript 2.0 :: Stop MP3 From Cache'ing Streaming Sound Using Loadsound?

Jul 19, 2004

I have used the loadsound command with the streaming option set to true, so it streams sound etc. But the problem is that it cache's the mp3 file it is streaming onto the user's internet cache folder Is there a way to prevent mp3 files from being cached (have I murdered the English language today using the word cache? ) Something like what the Real Player does, it streams the files but never cache's them. <gasp>

View 7 Replies







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