"Expected a field name" error in php mailer

Hi I am following the “Flash-Based Email Form Using PHP” tutorial at:
http://www.kirupa.com/developer/actionscript/flash_php_email.htm

the form movieclip has this code applied to it:

onClipEvent(data){
// show welcome screen
_root.nextFrame();
}

My assignment requires all code to be in external file so I put this in my actionscript:

form.onClipEvent(data){

_root.nextFrame();

}

where form is the name of my movieclip that has 3 input fields in it. I get this error:
Expected a field name after ‘.’ operator.
form.onClipEvent(data){

can anybody help please,

Thanks,

Matt.
[SIZE=2][SIZE=2][FONT=Verdana][SIZE=4][COLOR=#003366]
[/COLOR][/SIZE][/FONT][/SIZE][/SIZE]