drag sprites

cpc6128

Member
Licensed User
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!
 

cpc6128

Member
Licensed User
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.
 

HomeWorx

Member
Licensed User
Longtime User
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...
 

eww245

Member
Licensed User
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:
Top