Photo Gallery Action Script Errors-Help?

Can someone please help me? I finally got sbeener’s gallery working on my site but ran into a problem after I tried to test my scene.

Action Script Output Errors:
Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 10: Statement must appear within on/onClipEvent handler
this.pathToPics = “thumbnails/”;

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 12: Statement must appear within on/onClipEvent handler
this.pArray = [“Brad_01.jpg”, “Tim_01.jpg”, “kristianne & donald_01.jpg”, “sandra_01.jpg”, “selena_01.jpg”];

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 13: Statement must appear within on/onClipEvent handler
this.fadeSpeed = 20;

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 14: Statement must appear within on/onClipEvent handler
this.pIndex = 0;

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 18: Statement must appear within on/onClipEvent handler
loadMovie(this.pathToPics+this.pArray[0], _root.photo);

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 19: Statement must appear within on/onClipEvent handler
MovieClip.prototype.changePhoto = function(d) {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 27: Statement must appear within on/onClipEvent handler
MovieClip.prototype.fadeOut = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 34: Statement must appear within on/onClipEvent handler
MovieClip.prototype.loadPhoto = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 42: Statement must appear within on/onClipEvent handler
MovieClip.prototype.loadMeter = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 52: Statement must appear within on/onClipEvent handler
MovieClip.prototype.fadeIn = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 62: Statement must appear within on/onClipEvent handler
this.onKeyDown = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 69: Statement must appear within on/onClipEvent handler
Key.addListener(this);

Any suggestions? Thx in advance!