Unloading Sprite Sheets
Hey,Is there any way to unload the sprite sheets? I have loaded the sprite sheets using load_sprite_sheet(...) method, and I want to unload and remove it from the memory after usage and load another one!
you can remove the node by using node.removefromparente() api.
Hope this helps.
Thanks. There is no handler for a loaded sprite sheet.. So I cannot call removefromparent on it! could you provide the code?
If you mind sharing it in public, you can always send an email to [email]techsupport@papayamobile.com[/email].
Thanks. Here's how I'm loading the spritesheet:
load_sprite_sheet( "filename",0,spriteSheetCallback,theUserData);
function spriteSheetCallback(fileName,result,theUserData)
{
//doing stuff, showing sprites from the sprite sheet etc..
}
Now after I am done using the sprites from the sprite sheet, I want to unload that sprite sheet to free up memory it took .... How to do that?? when you showing sprite, you can assign it to variable. If you want to variable, when you want to remove it then please call removefromparent on the variable.
Thanks.
Page:
[1]