Millie,
You can use HTML links, using them to call asfunction:"func_name", "variable"
Like this, which builds a list of headlines, with links to an array of news
stories.
var oneEntry:String = "<A HREF='asfunction:_root.addStory,"
+ i //index to the array of news stories
+ "'>"
+ tempLink + // headline, previously extracted
"</A><BR><BR>";
txtHeadlines += oneEntry;
A typical headline looks like this:
<A HREF='asfunction:_root.addStory,3>New Tug for EcTow</A><BR><BR>
When the headline clicked, the addStory function loads arrNews[ 3 ] into
the textarea which displays stories.
The only downside is that asfunction: can take only one variable, so you
may need it to point to an indicator function to accomplish more complex ends.
Hope this is helpful - Miles Thompson
At 05:38 AM 11/10/2005, Millie Niss wrote:
Hello---
I hope someone can help me with this problem, which I have had a bunch of
times in Flash: I often make hypertext in Flash by making an invisible
button and placing instances of it on a layer above the text I want to
make clickable. I make the button by having nothing in the up, over, or
down frames and a square in the hit frame. Then when you drag the button
onto the stage, it appears as a transparent blue square which you can
resize and place over the text you want people to click, and then you
define call-back functions on each instance to make it execute whatever
code is desired... (I can't use HTML links to do what I want since I want
complex Actionscript to execute when there is a click, not just to load a
web page...)
Unfortunately, when I test my movies sometimes, the acual hot area is not
quite where the blue area is in the authoring environment. I just did a
piece with 30 hyperlinked words this way, and the buttons had to be
positioned by trial and error and to make them work, they had to be put at
least 30 pixels offset from where it looked like they should be placed.
Does anyone have an explanation or fix for this? It happens only in some
projects and I always create the invisible buttn the same way. I am using
Flash MX 2004 Pro on a PC/Win XP.
Millie
www.sporkworld.org
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders