philcrak
08-10-2001, 07:00 PM
The script below will allow an HTML link to control the flashObject. In otherwords, the 'link' will go to label 'labelName' in the flashObject timeline. My dilemma is making this work across frames. I need the 'link' in frameB to control the flashObject in frameA. I know that I am on the right path, but as the saying goes: so close but yet so far. Could someone please put me on the correct path?!
----------------------------------------------------
Frameset: frameA (contains flashObject)
frameB (contains HTML link)
Script:
<SCRIPT LANGUAGE="JavaScript">
<!--
var movieName = "topFrame.mgignav";
function thisMovie(movieName) {
// IE and Netscape refer to the movie object differently.
// This function returns the appropriate syntax depending on the browser.
if (navigator.appName.indexOf ("Microsoft") !=-1) {
return window[movieName]
} else {
return document[movieName]
}
}
// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
if (typeof(theMovie) != "undefined") {
return theMovie.PercentLoaded() == 100;
} else {
return false;
}
}
function golabel() {
if (movieIsLoaded(thisMovie(movieName))) {
thisMovie(movieName).TGotoLabel("_level1/","contact");
}
}
//-->
</SCRIPT>
HTML Link: <a href="#" onClick="golabel()">link</a>
----------------------------------------------------
"For once I wish someone would call me sir, without adding... you're making a scene." - Homer Simpson
----------------------------------------------------
Frameset: frameA (contains flashObject)
frameB (contains HTML link)
Script:
<SCRIPT LANGUAGE="JavaScript">
<!--
var movieName = "topFrame.mgignav";
function thisMovie(movieName) {
// IE and Netscape refer to the movie object differently.
// This function returns the appropriate syntax depending on the browser.
if (navigator.appName.indexOf ("Microsoft") !=-1) {
return window[movieName]
} else {
return document[movieName]
}
}
// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
if (typeof(theMovie) != "undefined") {
return theMovie.PercentLoaded() == 100;
} else {
return false;
}
}
function golabel() {
if (movieIsLoaded(thisMovie(movieName))) {
thisMovie(movieName).TGotoLabel("_level1/","contact");
}
}
//-->
</SCRIPT>
HTML Link: <a href="#" onClick="golabel()">link</a>
----------------------------------------------------
"For once I wish someone would call me sir, without adding... you're making a scene." - Homer Simpson