-
1. Re: What happens with sound? in Flash CS4 AS3
kglad May 5, 2010 11:36 AM (in response to Me2LoveIt2)var sound:Sound = new Sound(new URLRequest("URL.mp3");
does the mp3 file get downloaded? yes
-If yes
-where does it get downloaded to? Cache
-is there a way to stop or control the loading? no
-and can it be accesed(deleted) manually? ,yes. is there a destructor? for the file, no
-if possible
-How would you delete the memory? same way you do for all flash objects: ready sound for gc
-if not
-is there a way to do it with different code?
-
2. Re: What happens with sound? in Flash CS4 AS3
Me2LoveIt2 May 5, 2010 12:04 PM (in response to kglad)Thank you so much this really helps!
here is the second part of my questions:
Since there is no destructor, is it correct when I assume that after this code: ...
var sound:Sound = new Sound(new URLRequest("URL.mp3");
sound = new Sound(new URLRequest("URL2.mp3");
... both mp3 files will be downloaded into Cache, but only one is accessible at that time?
-if yes
-could you please give an example of how I can delete the first mp3 file in this example.
-if not
-How would this scenatio work then?
again my thanks for the help.
-
3. Re: What happens with sound? in Flash CS4 AS3
kglad May 5, 2010 4:14 PM (in response to Me2LoveIt2)you can't delete any files using a web based swf and you can't prevent cach'ing of media files unless you use a streaming server.
in addition, each sound instance can load, at most, one sound. so, where you use:
var sound:Sound = new Sound(new URLRequest("URL.mp3");
sound = new Sound(new URLRequest("URL2.mp3");
you're downloading 2 files and you've created 2 sound instances. one of those instances you have no way to reference.
now, what are you trying to accomplish?


