Solved

Flash - detect word clicked

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

738 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