gangster88 0 Junior Poster in Training

I want to be able to move the iris and the pupil of the eye, if I click on the left of the graphic window irrsepective of high or low then it should move left and if i click on the right then if should move right. if i click above or below the eye it should look straight ahead. Here is my code for the eye..

from graphics import *
def drawCircle(win, centre, radius, colour):
    circle = Circle(centre, radius)
    circle.setFill(colour)
    circle.setWidth(2)
    circle.draw(win)
def drawEye():
    w = 250
    h = 250
    win = GraphWin("One Spooky Eye", w, h)
    # center should be at 1/2 width and height
    centre = Point(w//2, h//2)
    drawCircle(win, centre, 40, "white")
    drawCircle(win, centre, 20, "blue")
    drawCircle(win, centre, 10, "black")
    # click mouse to go on
    win.getMouse() 
    win.close()

drawEye()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.