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.

drag sprites

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-05-2008, 10:31 AM
Junior Member
 
Join Date: Feb 2008
Posts: 17
Default drag sprites

I was wondering whether it was possible to code a situation where Sprites could be dragged around the screen with the stylus (at run-time)? There only seems to be a 'click' event for Sprites rather than 'mouse down'. I thought it might be possible to use the 'mouse down' event of the Form, but this is blocked by the GameWindow object.
The alternative to using Sprites is to draw the images directly onto the Form (and then use the Form's 'mouse down' event) but as this will be a lot more complicated than using the Sprite Library I thought I'd ask first!
Reply With Quote
  #2 (permalink)  
Old 03-05-2008, 01:20 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Another solution will be to use the NoCollisionMouse event and when the user taps on the screen the sprite will move (immediately or with a certain speed) to this point.
Reply With Quote
  #3 (permalink)  
Old 03-05-2008, 02:29 PM
Junior Member
 
Join Date: Feb 2008
Posts: 17
Default

Thanks for your reply Erel, I appreciate that would have the same end result but it is not the effect I am after! I am however making progress in coding the routine without using the Sprite Library.
Reply With Quote
  #4 (permalink)  
Old 02-28-2009, 09:39 AM
Junior Member
 
Join Date: Dec 2008
Posts: 13
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi cpc6128,
Did you manage to sort it out ? I'm currently looking for a way to do the same thing but can't find the solution... Clicking a sprite is easy, but is there a way to drag it ? Sprites have no MouseDown, MouseMove or MouseUp events...
Reply With Quote
  #5 (permalink)  
Old 02-28-2009, 11:41 AM
Newbie
 
Join Date: Nov 2008
Posts: 6
Default

dzEventsMagic might do the trick,

http://www.basic4ppc.com/forum/addit...entsmagic.html

Here's an example that scrolls an image

http://www.basic4ppc.com/forum/share...ge-finger.html
Reply With Quote
  #6 (permalink)  
Old 03-02-2009, 02:39 AM
Knows the basics
 
Join Date: Dec 2008
Posts: 77
Awards Showcase
Beta Tester 
Total Awards: 1
Default

A work around for this would be to make a smaller game window, use a panel with mousemove, and put it just outside the starting point of the sprite. Then put the panel to the outside of the ending point, after the sprite has moved.
if the sprite is small the user may not notice that they are not actually clicking the sprite.

Last edited by eww245 : 03-02-2009 at 02:45 AM.
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
Help with Sprites and Transparency Drewpeu Questions (Windows Mobile) 1 09-24-2008 06:29 PM
Manage many sprites serge Questions (Windows Mobile) 3 07-31-2008 09:29 AM
Drag controls (name) to the IDE Mr_Gee Basic4ppc Wishlist 2 07-21-2008 08:35 PM
Click and drag during runtime J12345T Questions (Windows Mobile) 1 06-24-2008 09:37 AM
Drag 'n Drop support DavidN Questions (Windows Mobile) 10 08-14-2007 07:48 AM


All times are GMT. The time now is 08:55 AM.


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