Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I add an on(rollOver) event to a dynamic hyperlink?

Status
Not open for further replies.

ColonelBlue

Technical User
Jun 24, 2004
110
US
I have hyperlinks dynamically placed on a nav from an xml file where both link names and urls are extracted from.
I would love to add a rollover Effect so I can have some text pop up when a hyperlink is rolled over. Since it is a dynamic text box, the on rollover functions are grayed out.
I tried placing a movieclip over the link but of course now the hyperlink is covered up.

Is there another way?

Thanks in advance.
 
Place the text box inside a movieclip and animate that way.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Thanks pixl8r. I have tried that but what happens is the rollover works but the dynamic hyperlink is cancelled out by the movieclip. In other words the rollover works but click on it and nothing happens.

What makes it difficult is that the hyperlink and its linkname are both generated through actionscript which goes through the xml file.

At the present:
each dynamic text box is named sequentially top_txt[number].
So , If I placed that in a movieclip called , let's say ,top1, how can I make this work and have each movieclip relative to each dynamic text box? I couldn't get it to work.


Here is the part pf the code that does the aforementioned.


Code:
    var nd2 = 0;
	for(i=0;i<=75;i++) {
	_root.topnav1["top_txt"+i].styleSheet = format;
    jude1 = this.firstChild.childNodes[1].childNodes[nd2++].firstChild.nodeValue;
    output.htmlText= jude1; 
   _root.topnav1["top"+i] = this.firstChild.childNodes[1].childNodes[nd2++].firstChild.nodeValue;
   thaddeus= "<a class='topnav' href='"+ _root.topnav1["top"+i]+ "'><b>"+jude1+"</b></a><b> |</b>"; 
   _root.topnav1["top_txt"+i].htmlText=thaddeus;


Thanks again pixl8r, you're a god send.
 
I think you could right click the movie clip and go to arrange then send backward... I am working on a rollOver project now...
 
wait... okay... overlap the clip (without dyn. text.... so that your text will appear over the clip.. it works just about the same I think
 
Seems like what you should be doing is creating a template movieclip. Then filling that clip in your node iteration by using attachMovie.

Kind of long to explain though and unfortunately I don't have the time right now to write it out. In the mean time search Flash help for "movieClip.attachMovie".



Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top