Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / flickering image when scrolling (pointer input)

Author
Message
kirtn14
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 22nd Jun 2013 17:27
I was trying to make a scrolling sprite (controlled by the use of touch) and once I had written the script the image constantly flickered. I think its because I have called the getspritey (sprites[1]) command and the getpointery () command then constantly updated them causing the image to be constantly updated. I have tried putting them outside of the do and nothing happens. Here Is what I have written:


can anyone help please?

kirtnicholls
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 22nd Jun 2013 17:43
kirtn14
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 22nd Jun 2013 18:19
this script worked the same as getpointerstate () :/

kirtnicholls
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 22nd Jun 2013 22:38 Edited at: 22nd Jun 2013 22:39
Sorry, I didn't quite understand what you want.
kirtn14
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 23rd Jun 2013 15:16
Ill try explain it better...

i would like to be able to make one large image that's position can be changed by the user (VIA touch) like http://www.appgamekit.com/documentation/examples/sprites/9_scrolling.htm
but i want it to be done from by a pointer (finger)

kirtnicholls
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 23rd Jun 2013 15:33
this is touch and move with finger

kirtn14
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 23rd Jun 2013 16:04
thanks

kirtnicholls
kirtn14
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 23rd Jun 2013 16:10
how do I alter the offset, so that the sprite (if larger than the screen) can be dragged out of sight by accident. i have tried using getspritey (sprites[1]) then saying if the position is say 1 to 99 the sprite will move back up to 0... but it does not

kirtnicholls
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 23rd Jun 2013 18:50 Edited at: 23rd Jun 2013 18:55
just limit ny# before set.
kirtn14
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 24th Jun 2013 21:18

?

kirtnicholls
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Jun 2013 21:32
quick and dirty, you can print ny# on screen and move the sprite in
the range you want and later you wrote the if then limit.
if ny#<-10 then ny#=-10
if ny#>50 then ny#=50

the better solution is to use getvirtualheight() and getspriteheigth() in the if then statement.

Login to post a reply

Server time is: 2024-11-24 16:07:02
Your offset time is: 2024-11-24 16:07:02