Functions not working

Im in the process of learning actionscript, and have been doing simple exercises from Colin Moocks book on “Action script for Flash MX”.
The following two exercises on functions will not work when I test them.
I have no idea y…the code is straight from the book! Its so annoying!

//this code was to show the phrase “Hi there!” in the output window. The result was nothing.
function sayHi(){
trace(“Hi there!”);

//this code was to move a movieclip of a ball with instance name “ball”.The result was no movement.
_global.mainTimeline = this;
function moveball() {
mainTimeline.ball._x += 10;
mainTimeline.ball._y += 10;
moveBall ();

Can someone please help me so I can move on in my learning??!