Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Retrieve Image from Sprite

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-16-2008, 01:48 PM
Junior Member
 
Join Date: May 2008
Posts: 19
Default Retrieve Image from Sprite

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 by fjsantos : 01-24-2011 at 10:39 PM.
Reply With Quote
  #2 (permalink)  
Old 06-16-2008, 04:06 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

It is not possible.
You can store the image in an ImageList before assigning it to the sprite.
Reply With Quote
  #3 (permalink)  
Old 06-16-2008, 04:20 PM
Junior Member
 
Join Date: May 2008
Posts: 19
Default

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 by fjsantos : 01-24-2011 at 10:39 PM.
Reply With Quote
  #4 (permalink)  
Old 06-16-2008, 04:28 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

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.
Reply With Quote
  #5 (permalink)  
Old 06-16-2008, 04:31 PM
Junior Member
 
Join Date: May 2008
Posts: 19
Default

Yes, but I have to use dispose method first for memory purposse?

Best Regards, fjsantos.
________
dodge wiki

Last edited by fjsantos : 01-24-2011 at 10:39 PM.
Reply With Quote
  #6 (permalink)  
Old 06-16-2008, 04:40 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

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.
Reply With Quote
  #7 (permalink)  
Old 06-16-2008, 04:57 PM
Junior Member
 
Join Date: May 2008
Posts: 19
Default

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 by fjsantos : 01-24-2011 at 10:40 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve free space MM2forever Questions (Windows Mobile) 7 09-17-2009 10:27 PM
retrieve images and index lux1963 Questions (Windows Mobile) 3 05-18-2008 01:42 PM
Retrieve Device Parameters alfcen Share Your Creations 14 03-23-2008 07:11 AM
Retrieve version timsteeman Questions (Windows Mobile) 8 11-16-2007 06:43 PM
retrieve labelnames on a form Scubaticus Questions (Windows Mobile) 1 08-03-2007 10:51 PM


All times are GMT. The time now is 09:49 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0