Advertisement
Enrro

100727

Oct 7th, 2014
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. '''
  2. Created on 07/10/2014
  3. circulos que se mueven
  4. @author: A01221672
  5. '''
  6. from Tkinter import*
  7.  
  8. x=1
  9. ancho=600
  10. alto=375
  11. ventana = Tk()
  12. lienzo =Canvas(ventana, width= ancho, height=alto)
  13. lienzo.pack()
  14.  
  15. while True:
  16. if x < 40 :
  17.  
  18. lienzo.delete('all') # borrar la pantalla . limpia
  19. lienzo.create_oval(x+100,200,x,100,fill= "#1e1e26", width=0, outline="#1e1e26") #circulo negro
  20. lienzo.after(100)
  21. lienzo.update()
  22. x = x + 5
  23.  
  24. else:
  25.  
  26. lienzo.delete('all') # borrar la pantalla . limpia
  27. lienzo.create_oval(x+100,200,x,100,fill= "#1e1e26", width=0, outline="#1e1e26") #circulo negro
  28. lienzo.after(100)
  29. lienzo.update()
  30. x = x - 5
  31.  
  32.  
  33.  
  34.  
  35. mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement