my solution (formerly "enough")

Jack Uretsky <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
Hi all-
 	Following a suggestion of Yuri's. with assistance from the book 
"Beginning Game Development" by Will McGugan (Apress (registered) 
(Berkeley, CA 2007), here is my solution to the problem of switching 
images (you can substitute anything you have hadny for the images used for 
"back1" and "back2":
____________________________________________________
back1 = "a_1.jpg"
back2 = "a_2.jpg"

import pygame
from pygame.locals import *
from sys import exit
import time

pygame.init()

screen = pygame.display.set_mode((640,480), 0, 32)
pygame.display.set_caption("Hello, World!")
back = pygame.image.load(back1).convert()

pygame.event.pump()

screen.blit(back, (0,0))

pygame.display.update()

time.sleep(2)
back = pygame.image.load(back2).convert()
screen.blit(back, (0,0))

pygame.display.update()
______________________________________________
As you can see, the image can be updated, mulotiple times.
 	My thanks to all who offered suggestions.
 					Regards,
 						Jack

"Trust me.  I have a lot of experience at this."
 		General Custer's unremembered message to his men,
 		just before leading them into the Little Big Horn Valley



_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.