Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory problem

Status
Not open for further replies.

ecucurella

Programmer
Feb 17, 2003
34
ES
Hi,

I use the loadsound method to load an mp3 file in the Sound object. Every time I made a scene change i load a song, one song related to every scene.

It is ok, but I have a memory problem because when i load a song the memory that Flash uses increase and if I return to an scene that i have been later it increase the memory another time !!

Is there a method to free the memory used when i don't need the song anymore?

Thanks,

This is the code i use:

var Introtrack = new Sound();
Introtrack.setVolume(100);
Introtrack.loadSound("\\songs\\intro.mp3", false);
Introtrack.start();

Introtrack.onSoundComplete = function () {
Introtrack.start();
}
 
I have tried delete Introtrack and this makes that i couldn't use the variable Introtrack anymore but don't free the memory used.

Do you know how?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top