Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: fs command - 2nd posting
From: Simon Webster
Date: Thu, 27 Apr 2000 12:09:28 +0100

Hi all, apologises if this appears twice.

I'm trying to call a particular frame in my movie from an html page. The
javascript used is as follows

<script language="JavaScript"><!--
var moviename = "rm";
var movie_ready = "false";

function movieobject(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]
}
}
function go()
{
if(movie_ready == "false")
{
while(movie_ready == "false")
{
if(movieobject(moviename).PercentLoaded() ==
100)
{

movieobject(moviename).GotoFrame(100);
movie_ready = "true";
}
}
}

else
{
movieobject(moviename).GotoFrame(100);
}
}
// -->
</script>

This script works fine if it is on the page where the swf is embedded.
However, if I am calling it from a different html file it doesn't work, the
error "movieobject has no properties. " (due, I believe, to it requiring the
ID and NAME tags which are not present unless the movie is embedded into the
html page).

How do I get around this? Should I be using a different script?

All help welcomed on this wet, cold and windy day.

Simon


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]