Solved

Flash - detect word clicked

Posted on 2004-03-25
3
143 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
  • 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now