Skip to main content
April 9, 2007
Question

onMouseOver dynamic text

  • April 9, 2007
  • 9 replies
  • 750 views
I have some dynamic text and i would like to have a small popUp ( hover captions ) with further instruction to appear onMouseOver some specific words in that text. I have been able to do it onMouseOver images but How can i do it over text?

Thanks
This topic has been closed for replies.

9 replies

kglad
Community Expert
Community Expert
April 11, 2007
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.
April 11, 2007
Any ideas on HOW could i get a Hover Caption to works onRollOver text?
April 10, 2007
Ok I tried with the asfunction() but it only works on(press) and i would like my function to triger onMouseOver a specific word.
Is that posible at all?
kglad
Community Expert
Community Expert
April 10, 2007
that's correct: asfunction() only works onPress and i know no work-around to make it work onRollOver.
kglad
Community Expert
Community Expert
April 9, 2007
check flashkit.com. they may have a tutorial on the asfunction.
April 9, 2007
any tutorial on asfunction()? my text is already htmlText.
I found this adobe Doc , i think i can get it to work.

Thanks a lot.
kglad
Community Expert
Community Expert
April 9, 2007
then you'll need to use an html enabled textfield and the asfunction().
April 9, 2007
Thanks again, I think i didn't frace the problem properly, what i need, is to have the action "my popUp" to triger ONLY onMouseOver a specific word (for example: Over "is") from you example code.

With you code as it is, the onRollover Function will triger the action over the WHOLE text.

Since it is not scrolling text i guess i could place a movie clip on top of a specific word, i was just wondering if i could do it withing the text field, or withing the actual dynamic text, like on flash8 with css i can get a link to be underlined.
April 9, 2007
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?
kglad
Community Expert
Community Expert
April 9, 2007
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:

kglad
Community Expert
Community Expert
April 9, 2007
create a movieclip and add your textfield to that movieclip. then add mousehandlers to the movieclip.