Solved

Flash - detect word clicked

Posted on 2004-03-25
3
184 Views
Last Modified: 2010-04-03
I am aware there are a few manually setup methods to have flash look like you clicked on a hot/hyperlinked word and do something. I am building many elearning frames and I want certain words to link to glossary. Is there a generic way to obtain "word clicked" which would allow me to simply set color for that word in design time - then in my handler code for the paragraphs - have code that says... if color attribute blue then go look it up term ____ in glossary?
0
Comment
Question by:nphoenix
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 10684808
wouldn't it be simpler to hyperlink the word? Are you using static or dynamic text?
0
 

Author Comment

by:nphoenix
ID: 10686403
can you direct me to or briefly describe how to "hyperlink" the word and have it hit a flash function? Dynamic or static is open option.
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 250 total points
ID: 10686499
okay, if you want the text to run a function call, you need to use whats known as asFunction.

to do this, you need to make the text field in which the text including the hyperlinked text a dynamic textfield with the render text as html option selected. the box that looks like <>....

then, in your timeline put the following code.

function doGlossary() {
      //put whatever code it is here for your flash function
}
testtext.htmlText = "Hello there <A HREF='asfunction:doGlossary>Click here</a>";

so you must change the testtext to the instance name of your textfield - in the example above, the click here part becomes the active link, which when clicked will run the doGlossary function.

make sense?

blu. :-)



0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question