Help on "Actions"

Hello,im new to flash and I got a question.
Im working on an authentication script which connect on an external file to verify password and username.

On the enter button:

on (press) ( i want it to connect on a text file to verify the username and pswd in Msql.)
on (release) {
//Movieclip GotoAndPlay Behavior
//End Behavior

Then on one frame ( if the username and pswd is correct it should go to page.htm:

//Goto Webpage Behavior
//End Behavior

My question is how to make it on (press) to connect on this external text file to verify, is it possible, if not is there any solution ?