Solved

Flash - detect word clicked

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Some Flash in IE doesn't display properly, but does in Chrome 4 628
Error 2032 in all the browser 6 2,838
playing flash video on kiosk at startup 6 410
Software Restriction Policy 8 865
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…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

831 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