-
1. Re: Mouse-overs
kglad Apr 7, 2011 9:31 PM (in response to Ka1i)embed your textfield's font and assign its alpha (as3)/ _alpha (as2) on mouseover/mouseout.
-
2. Re: Mouse-overs
Ka1i Apr 8, 2011 3:49 PM (in response to kglad)I'm not sure how to do that.
Here is the code that I have so far.
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToPosition);
var fl_TF:TextField;
var fl_TextToDisplay:String = "test."
function fl_ClickToPosition(event:MouseEvent):void
{
fl_TF = new TextField();
fl_TF.autoSize = TextFieldAutoSize.LEFT;
fl_TF.background = true;
fl_TF.border = true;
fl_TF.x = 0;
fl_TF.y = 0;
fl_TF.text = fl_TextToDisplay;
addChild(fl_TF);
}
-
3. Re: Mouse-overs
kglad Apr 8, 2011 6:49 PM (in response to Ka1i):
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToPosition);
movieClip_1.addEventListener(MouseEvent.MOUSE_OVER, overF);
movieClip_1.addEventListener(MouseEvent.MOUSE_OUT,outF);
function overF(e:Event):void{
if(fl_TF){
fl_TF.alpha=1;
}
}
function outF(e:Event):void{
if(fl_TF){
fl_TF.alpha=0;
}
}
var fl_TF:TextField;
var fl_TextToDisplay:String = "test."
function fl_ClickToPosition(event:MouseEvent):void
{
fl_TF = new TextField();
fl_TF.autoSize = TextFieldAutoSize.LEFT;
fl_TF.background = true;
fl_TF.border = true;
fl_TF.alpha=0;
fl_TF.x = 0;
fl_TF.y = 0;
fl_TF.text = fl_TextToDisplay;
addChild(fl_TF);
}
-
4. Re: Mouse-overs
OS86 Apr 8, 2011 10:41 PM (in response to Ka1i)Couldn't you just make a button of your text field? By physically making the button and putting your text field on the "Over" state of the button? That's what I thought of when I read this. I hope I helped. I'm just trying to answer your question.
-
5. Re: Mouse-overs
kglad Apr 9, 2011 9:00 AM (in response to OS86)(he doesn't want a textfield rollover to do anything - it's a movieclip rollover that triggers the textfield's alpha change.)