This content has been marked as final. Show 9 replies
you can embed a movieclip in your textfield using its linkage id and define mouse handlers for the movieclip, including your rollover and rollout handers.
how would I go about embedding a movie clip within a text field? could you give an example?
create a movieclip that contain a textfield with text. this will be your "link" that you want to respond to mouse events. give that movieclip a linkage id (say, movieclipID). you can then use:
so is mc1 a movie clip that I actually will have to create in the text field?
so, I would have to do:
then I could draw in the mc and give it the mouse handlers?
no, you don't create a movieclip in a textfield. you're going to embed a movieclip in your main (the one that will contain a link) textfield.
if you want that link to be text, create a movieclip in the authoring environment that contains a textfield (dynamic, static or input - it doesn't matter). if you want that link to be a graphic, create a movieclip that contains a graphic.
give the movieclip a linkage id.
you can now embed the movieclip in the textfield that you want to contain a link. use the above code to embed the movieclip in the textfield and to give the movieclip an instance name.
you can then assign mouse handlers as indicated above.
OOOHH! now I see what you're doing... Before I didn't realize that there was an img tag in the html text. That's a pretty nifty idea.
Now, for my purposes, I need an anchor tag with the word there to show up, and have mouse events for that anchor tag. Using this method, would it work to place the img tag movie clip hack then place the anchor tag and overlap the two?
there's no need.
the solution i gave is much more flexible the asfunction(). the asfunction is only satisfactory if your link is text AND you only need an on click event detected.
because you want text, put a textfield in your movieclip and not a graphic.
Ahhh... that makes sense! Awesome! Thanks for your help!