;

PDA

Click to See Complete Forum and Search --> : Flash, Javascript and the MAC


Orkman
08-16-2002, 01:10 PM
Hi there,

Ok I have a simple file that allows HTML hyperlinks to run Flash through Javascript functions. It runs great in Netscape and IE for PC, but for MAC i get an error. Here is the link:

http://********iw.com/crap.htm

Should work great for you on PC. I think the MAC has a problem with the:

function movieobject(moviename)
{
if (navigator.appName.indexOf ("Microsoft") !=-1)
{
return window[moviename]
}

else
{
return document[moviename]
}
}

I don't know if MAC IE 5.1 handles the script well.


Any ideas?

Thanks!

deadbeat
08-16-2002, 07:19 PM
Hi...

You can call Flash functions directly from an html link without the need for Javascript...using the asfunction protocol...

First, set up your Flash function, something like this:

function goSection(label){
_root.gotoAndPlay(label);
}

Then code your html links to use the asfunction, followed by the function name, then the argument...ie:

*A HREF="asfunction:goSection,sectionone"*Section One*/A*
*A HREF="asfunction:goSection,sectiontwo"*Section Two*/A*
*A HREF="asfunction:goSection,sectionthree"*Section Three*/A*

(Obviously, replace asterisks with < or > )

HTH,

K.

Orkman
08-16-2002, 07:26 PM
So no need for clumsy [moviename] code and the like?

Thanks for the tip i will give it a whirl!

Brook