I am working in AS2. I have an input text field I am using with an AS2 flipbook 
component so users can type a page number then go to that page in the flipbook. 
I want to make it so when the text field is clicked, any existing text is 
removed and focus set so the user is then ready to type a page number (then 
click a 'GO' button to go to that page). Flash won't let me apply code to the 
text field, so I thought I could code it so if that area of the stage is 
clicked it will do what I want. This is really basic coding with no classes, 
external scripts, etc.; so if anybody has a really basic solution I would be 
extremely grateful. This should be the sort of thing people use all the time 
(an input text field that is cleared when clicked), so I assume I am not the 
first to try and do this.
I thought the following might work, but Flash tells me, "The class or interface 
'MouseEvent' could not be loaded." So maybe I have left something out, or I am 
mixing up my AS2 with AS3, or I am just approaching this all wrong.

stage.addEventListener(MouseEvent.MOUSE_DOWN, blankText);
function blankText(event:MouseEvent):void {
if (mouseX >= 370) {
if (mouseX <= 430) {
If (mouseY >= 50) {
if (mouseY <= 72) {
enterPage.text = "";
}
}
}
}
}
Alan Neilsen


This message is for the named person’s use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or; lost by any mistransmission. If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify
the sender. You must not directly or indirectly, use, disclose,
distribute, print or copy any part of this message if you are not the
intended recipient. GOULBURN OVENS INSTITUTE OF TAFE and
any of its subsidiaries each reserve the right to monitor all e-mail
communications through its networks. Any views expressed in this
message are those of the individual sender, except where the
message states otherwise and the sender is authorised to state them
to be the views of any such entity.

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
#####################################################################################
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to