from tkinter import Image
import pygame
pygame.init()
clock=pygame.time.Clock()
sc = pygame.display.set_mode((1000, 600))
pygame.display.set_caption("MyGame")
image = pygame.image.load("png/rocket.png")
images =pygame.image.load("png/rocket2.png")
image.set_colorkey((255, 255,0))
image1 = pygame.transform.flip(image, True, False)
image2 = pygame.transform.flip(image, True, True)
image3 = pygame.transform.flip(image, False, True)
cadr =0
go =True
while go:
    sc.fill((0, 0, 0))
    cadr+=1
    if cadr<=5 and cadr>0:
        sc.blit(image, (20, 50))
        sc.blit(image3, (90, 50))
    if cadr<=10 and cadr>5:
        sc.blit(image1, (20, 50))
        sc.blit(image2, (90, 50))
    if cadr<=15 and cadr>10:
        sc.blit(image2, (20, 50))
        sc.blit(image1, (90, 50))
    if cadr<=20 and cadr>15:
        sc.blit(image3, (20, 50))
        sc.blit(image, (90, 50))
    if cadr==20:
        cadr=0
   #pygame.draw.rect(sc,(255, 255, 255), (60,60,200,40))
    #pygame.draw.rect(sc, (0, 0, 255), (60, 100, 200, 40))
    #pygame.draw.rect(sc, (255, 0, 0), (60, 140, 200, 40))
    #pygame.draw.rect(sc, (255, 0, 20), (60, 185, 200, 65))
    #pygame.draw.rect(sc, (255, 255, 255), (60, 250, 200, 65))
    #pygame.draw.rect(sc, (255, 255, 255), (60, 320, 200, 65))
    #pygame.draw.rect(sc, (255, 0, 20), (60, 385, 200, 65))
    #pygame.draw.rect(sc, (255, 255, 255), (60, 455, 200, 120))
    #pygame.draw.circle(sc, (255, 0, 0), (160, 515), 37)
    pygame.display.update()
    clock.tick(5)
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            go = False