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="javascript:<%=Namespace("showContent"
%>('home');">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 ("javascript:<%=Namespace("showContent"
%>('home')()"
;
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="JavaScript">
doContentSwitch = true;
function <%=Namespace("showContent"
%>(content) {
if (content != ""
{
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 = "<%=hostPath%>?page=header&headerTabName=url&headerContentURL=" + escape(content);
}
else {
document.location = "<%=hostPath%>?page=header&headerTabName=" + content;
}
}
}
<%
Select Case (selectedTabName)
Case "", "none":
contentURL = ""
Case "url"
contentURL = Trim(Request("querystring:headerContentURL"
)
Case Else
contentURL = hostPath & "?page=" & selectedTabName
End Select
If (contentURL <> ""
Then
%>
parent.frames.<%=contentFrame%>.location.replace("<%=contentURL%>"
;
<%
End If
%>
</script>
Thanks in advance for any help!
- Alysen
(Interactive Multimedia Developer, Baltimore, MD)
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="javascript:<%=Namespace("showContent"
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 ("javascript:<%=Namespace("showContent"
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="JavaScript">
doContentSwitch = true;
function <%=Namespace("showContent"
if (content != ""
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 = "<%=hostPath%>?page=header&headerTabName=url&headerContentURL=" + escape(content);
}
else {
document.location = "<%=hostPath%>?page=header&headerTabName=" + content;
}
}
}
<%
Select Case (selectedTabName)
Case "", "none":
contentURL = ""
Case "url"
contentURL = Trim(Request("querystring:headerContentURL"
Case Else
contentURL = hostPath & "?page=" & selectedTabName
End Select
If (contentURL <> ""
%>
parent.frames.<%=contentFrame%>.location.replace("<%=contentURL%>"
<%
End If
%>
</script>
Thanks in advance for any help!
- Alysen
(Interactive Multimedia Developer, Baltimore, MD)