Adam1213 Posted December 16, 2006 Share Posted December 16, 2006 (edited) When I move by background image it continually flashes white as it renders. The need to do it properly is for a game, that I have started working on and this is happening in. For my game Scrollable GUI's solves my problem however a solution to this would still be useful but is not required (by me at least) Basic image scrolling expandcollapse popup#include <GUIConstants.au3> global $multiply=10 Opt("GUIOnEventMode", 1) global $MAP_width=1000 global $MAP_x=0 global $width=500 global $direction=1; 1 = right - 0=left $GUI=GUICreate('Image scrolling', $width, 320) $gui_bg=GUICtrlCreatePic ('background.jpg', 0, 0, 1000, 320) GUISetOnEvent($GUI_EVENT_CLOSE, 'quit') GUISetState(@SW_SHOW) while 1 if $direction then $MAP_x+=$multiply if $MAP_x>$MAP_width-$width then $direction=0 $MAP_x-=$multiply*2 endif else $MAP_x-=$multiply if $MAP_x<0 then $direction=1 $MAP_x+=$multiply*2 endif endif GUICtrlSetPos($gui_bg, -$MAP_x, 0) tooltip($MAP_x, 0,0,'Position') sleep(100) wend func quit() exit endfunc Edited December 16, 2006 by Adam1213 IRC Client - 75 pages 3728 lines. Blob crumbler (game)Backup (drag to backup + cmd line)RS232 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now