Retrieve Image from Sprite

fjsantos

Member
Licensed User
Hi all.

I wonder how to retrieve an Image from sprite (if there are any possibilities to do it).

Thanks in advance.

Best regards, fjsantos.
________
KLX125A
 
Last edited:

Erel

Administrator
Staff member
Licensed User
It is not possible.
You can store the image in an ImageList before assigning it to the sprite.
 

fjsantos

Member
Licensed User
Ok, thanks, that it the method i suppose may use.

Btw, its possible to 'update' image on Sprite or I need to create new one?

Best Regards, fjsantos.
________
Yamaha YL1
 
Last edited:

Erel

Administrator
Staff member
Licensed User
You will need to create a new one.
It is possible however to use the same object and just reinitialize it with New2 or New3.
 

Erel

Administrator
Staff member
Licensed User
You can use dispose and then AddObject (if you want to use the same object's name).
If you will not call dispose the sprite will be eventually implicitly disposed.
 

fjsantos

Member
Licensed User
This work then like 'garbage recollector' of java i suppose.

Yesterday, doing some test i get 'out of memory' randomly when not use dispose method first. (Well i was creating a lot of sprites hehe).

Best Regards, fjsantos.
________
Toyota Supra
 
Last edited:
Top