A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Flash, Javascript and the MAC

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    124
    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!


  2. #2
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    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.

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    124

    Whoah

    So no need for clumsy [moviename] code and the like?

    Thanks for the tip i will give it a whirl!

    Brook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center