onload function won't run flash in NS7

Discussion in 'Javascript' started by btopenworld, Nov 6, 2003.

  1. btopenworld

    btopenworld Guest

    I have a Flash movie with parameter 'autoplay' set to false. The movie is
    started using a Macromedia javascript function via onload. This is OK in IE
    but Netscape 6 doesn't run the movie - it appears to be waiting for
    something, even though everything else is downloaded. If I set the movie to
    autoplay it runs fine but of course begins too early.

    This is the Macromedia script:

    function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
    var obj=MM_findObj(objStr);
    if (obj)
    eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
    }

    It calls the standard Macromedia findObj function - the movie is named
    'movie1'.

    Any ideas gratefully received.

    John
     
    btopenworld, Nov 6, 2003
    #1
    1. Advertising

  2. btopenworld wrote:

    > I have a Flash movie with parameter 'autoplay' set to false. The movie is
    > started using a Macromedia javascript function via onload. This is OK in IE
    > but Netscape 6 doesn't run the movie - it appears to be waiting for
    > something, even though everything else is downloaded. If I set the movie to
    > autoplay it runs fine but of course begins too early.
    >
    > This is the Macromedia script:
    >
    > function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
    > var obj=MM_findObj(objStr);
    > if (obj)
    > eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
    > }
    >
    > It calls the standard Macromedia findObj function - the movie is named
    > 'movie1'.
    >
    > Any ideas gratefully received.


    Scripting of Flash depends on the Netscape and the Flash version, if I
    remember it correctly then Netscape 6.0 and 6.1 can't script Flash and
    Netscape 6.2 and Netscape 7 can only do it with some Flash version 6.5x
    or later. And if you are using MM_something functions then better ask in
    a Macromedia Flash support group, if they provide something that doesn't
    work then they should fix it, and other users are more likely able to
    tell you whether it should work.
    Here in the group you will find hardly anyone suggesting to use eval, I
    guess
    if (obj && typeof obj[cmdName] != 'undefined') {
    if (cmdName == 'GotoFrame') {
    obj[cmdName](frameNum);
    }
    else {
    obj[cmdName]();
    }
    }
    should do without any need for eval.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Nov 6, 2003
    #2
    1. Advertising

  3. Paul Gorodyansky, Nov 7, 2003
    #3
  4. Paul Gorodyansky wrote:

    > Martin Honnen wrote:
    >> http://JavaScript.FAQTs.com/

    >
    >
    > Martin, your site does not work sowehow today (I used it before)... :(


    I can't remedy that myself as the whole www.faqts.com server has
    problems serving its content but I have asked the guys running faqts to
    look after it.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Nov 7, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Larry

    CSS layout problem with NS7

    Larry, Jan 3, 2004, in forum: HTML
    Replies:
    4
    Views:
    372
    Larry
    Jan 4, 2004
  2. Matthew
    Replies:
    0
    Views:
    422
    Matthew
    Jan 15, 2004
  3. d.
    Replies:
    1
    Views:
    134
    Aaron Bertrand - MVP
    Dec 5, 2003
  4. Matthew
    Replies:
    0
    Views:
    111
    Matthew
    Jan 15, 2004
  5. Oscar Monteiro

    event not working with firefox and NS7

    Oscar Monteiro, Feb 11, 2005, in forum: Javascript
    Replies:
    4
    Views:
    121
    Fred Oz
    Feb 13, 2005
Loading...

Share This Page