Hey all,
I need help. I have a music track I want to persist between levels. As far as I know “removeAll();” is what is deleting the track each time I load the level. My attempt to have everything removed excluding the music looks something like this.
import net.flashpunk.FP;
import net.flashpunk.World;
import net.flashpunk.Sfx;
public var music:Sfx = Sfx(Assets.MUSIC);
public var nonMusicList:Array = new Array;
getAll(nonMusicList);
FP.remove(nonMusicList, ???);
removeList(nonMusicList);
This method does not seem to be correct at all in solving the problem. I have no idea what would go in the ??? as the music is not a class. Even if I leave out the “FP.remove(nonMusicList, ???);” the “removeList(nonMusicList);” does not remove everything the same way “removeAll();” does.
The music is playing great right now if I use “removeAll();” I just want it to not be interrupted between levels.
Any help is appreciated, -VinceB