I am having an issue with an app I am developing using adobe flash with Air for android support. I deployed the apk on to android device and played the files which are .swf file loaded onto my parent swf. There is a next and previous button which loads the swf files in succession. Now what happens exactly is that when I load my next file the sound from my previous file still plays in the background even though I have completely removed the swf file from stage. I have no ides why this is happening as this hapens only when i install the app on android device and play it.. During the publishing of the swf in Falsh I do not face this problem. So I am unable to figure out the reason. Can anybody guide me regarding this? Thank you
0
votes
1 Answers
0
votes
To be able to completely stop and unload a loaded SWF, you need to invoke unloadAndStop() method on the Loader instance, that holds the loaded content. Like:
var outerSwf:Loader = new Loader;
// Load.
outerSwf.load(new URLRequest("outer.swf"));
addChild(outerSwf);
// ...
// Unload.
removeChild(outerSwf);
outerSwf.unloadAndStop();