hmmm I'm kind of confused, if you are not using MXML then
there is no place for the <mx:SCRIPT> tag, you should create
a AS3 class that has the code you just showed me, with no tags
anywhere.
if you are using MXML your code should be something like: