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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic links in Flash using existing code

Status
Not open for further replies.

aesper1

Technical User
Jan 21, 2002
2
0
0
US
Dynamic links in Flash using existing code

To All:

I have run into difficulties trying to incoporporate exisiting navigation into Flash. Any help/advice would be greately appreciated!

I am trying to implement a Flash navigation in place of a sites current navigation. The current links in the html are dynamically created using Javascript and ASP. The link code appears as below:

<a href=&quot;javascript:<%=Namespace(&quot;showContent&quot;)%>('home');&quot;>HOME</a>

I need to use a similar structure as above for Flash in order to create the links dynamically within Flash, but have been unsuccessful simply adding the above code in a manner such as:

getURL (&quot;javascript:<%=Namespace(&quot;showContent&quot;)%>('home')()&quot;);

I do have the javascript function within the html page that the Flash file is embedded on as well as the ASP function. The Javascript code for the function is as follows:

<script language=&quot;JavaScript&quot;>
doContentSwitch = true;
function <%=Namespace(&quot;showContent&quot;)%>(content) {
if (content != &quot;&quot;) {
doContentSwitch = true;
isLink = false;
isLink = (isLink || (content.indexOf(' > -1));
isLink = (isLink || (content.indexOf('file://') > -1));
isLink = (isLink || (content.indexOf('ftp://') > -1));
if (isLink) {
document.location = &quot;<%=hostPath%>?page=header&headerTabName=url&headerContentURL=&quot; + escape(content);
}
else {
document.location = &quot;<%=hostPath%>?page=header&headerTabName=&quot; + content;
}
}
}
<%
Select Case (selectedTabName)
Case &quot;&quot;, &quot;none&quot;:
contentURL = &quot;&quot;
Case &quot;url&quot;
contentURL = Trim(Request(&quot;querystring:headerContentURL&quot;))
Case Else
contentURL = hostPath & &quot;?page=&quot; & selectedTabName
End Select
If (contentURL <> &quot;&quot;) Then
%>
parent.frames.<%=contentFrame%>.location.replace(&quot;<%=contentURL%>&quot;);
<%
End If
%>
</script>


Thanks in advance for any help!
- Alysen
(Interactive Multimedia Developer, Baltimore, MD)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top