Cook flour and milk until extremely thick. Cool. Meanwhile, cream sugar, butter, and vanilla until fluffy. When flour and milk mixture has cooled, add to creamed ingredients and beat until smooth.