all groups > flash actionscript > april 2007 >
You're in the

flash actionscript

group:

onMouseOver dinamic text


onMouseOver dinamic text Txar?n
4/9/2007 7:32:31 PM
flash actionscript:
I have some dinamic text and i would like to have a small popUp with further
instruction to apear onMouseOver some words in that text. I have been able to
do it onMouseOver images but How can i do it over text?

Thanks
Re: onMouseOver dinamic text kglad
4/9/2007 7:44:33 PM
Re: onMouseOver dynamic text Txar?n
4/9/2007 8:01:32 PM
Thanks kdlad!
Could you be more specific? I am not to familiar with adding mousehandlers!
Do you mean that mouse will react on a specific word? I'm a bit confused.
Could you maybe point me to some tutorial?
Re: onMouseOver dynamic text kglad
4/9/2007 8:06:17 PM
click insert/new symbol/movieclip. add a textfield to the movieclip stage.
give it an instance name (say tf).

drag the movieclip from the library to the main timeline stage and give it an
instance name (say mc).

you can then use:



mc.tf.text="this is your text";
mc.onRollOver=function(){
// add your popup
}
Re: onMouseOver dynamic text Txar?n
4/9/2007 8:15:07 PM
Thanks again, I think i didn't frace the problwm properly, waht i need it is
tho have the action "my popUp" to triger ONLY onMouseOver a one word (say Over
"is) from you example code.

With you code as it is the onRollover Function will triger the action over the
WHOLE text.
Re: onMouseOver dynamic text kglad
4/9/2007 8:32:50 PM
Re: onMouseOver dynamic text Txar?n
4/9/2007 8:40:10 PM
Re: onMouseOver dynamic text kglad
4/9/2007 9:01:01 PM
Re: onMouseOver dynamic text Txar?n
4/10/2007 12:00:00 AM
Ok I got the asFunction bit clear but it only works on(press) and i would like my function to triger onMouseOver.
Re: onMouseOver dynamic text kglad
4/10/2007 1:46:07 PM
Re: onMouseOver dynamic text Txar?n
4/11/2007 12:00:00 AM
Re: onMouseOver dynamic text kglad
4/11/2007 3:47:05 PM
i know no easy way. you'll need to apply movieclips over the key words and
attach rollOver behavior to them.

i'm pretty fluent with actionscript and i think creating a function that would
do this for any textfield/font would take me an hour.

i know how to do it, but there are always issues to resolve when using
autoSize and that would be necessary to find the location of the various key
words.
AddThis Social Bookmark Button