A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: javascript/vbscript TERROR, HELP!

  1. #1
    Senior Member
    Join Date
    Feb 2000
    Posts
    226

    Question

    I downloaded a flash file including an html script file from somewhere that creates a clock using javascript and vbscript sending variables to the movie.

    I have been modifying the movie with several movieclips etc.

    If I load the html file the clock works fine but it turns out that each time a message is send to the flash movie all movieclips are effected. It seems that all the movies I made go back and play from frame 1, resulting in nothing as there is a constant interaction between the scripts and the movie.

    Is there somebody who has experience with this and is able to tell me what’s going on, the scripts tells specific movieclips to go to a specific frame all other movie clips go back to 1 and play?

    Raoul

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    195

    Question

    Could be any number of things.. a problem with the structure of your Flash movie, an incorrect JavaScript command..

    If you would like some help debugging it.. then I suggest starting with the JavaScript. Perhaps you could show me the specific code you are using?


    <EMBED src="/cgi-bin/ubb/Members/sigs/00000205.swf" quality=high WIDTH=500 HEIGHT=50 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED>

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    226

    Post

    Thanks scottris for trying to help me out here. I have this complicated idea, and I worked it out completely before trying it as I never bumped into this problem so it is actually quite frustrating that there seems to be a problem after all.

    Below is the code of the html page,

    <html>

    <head>
    <title>time zone</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    < !-- initial fscommand-->
    <script LANGUAGE="JavaScript">
    < !-- hide from old browsers

    // handle for the special case where we need different code for IE and NS
    var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

    // Handle all FSCommand messages from Shockwave Flash movie
    function clock2_DoFSCommand(cmd, args) {
    // IE and Navigator have slightly different document object models
    // IE treats objects as members of "id" while in Navigator,
    // embeded objects are members of "window.document.embeds[0]"
    var clock = InternetExplorer ? clock2 : document.embeds["clock2"]
    var OD = new Date();

    function getmin() {
    clock.TGotoFrame("_level0/min", OD.getMinutes());
    }
    function gethrs() {
    clock.TGotoFrame("_level0/hrs", OD.getHours());
    }
    function getdate() {
    clock.TGotoFrame("_level0/date", OD.getDate()-1);
    }
    function getmon() {
    clock.TGotoFrame("_level0/month", OD.getMonth());
    }
    function getwkd() {
    clock.TGotoFrame("_level0/weekday", OD.getDay());
    }
    function getsec() {
    clock.TGotoFrame("_level0/sec", OD.getSeconds());
    }

    // initial clock
    if ( cmd=="initclock" ) {
    getmin();
    gethrs();
    getdate();
    getmon();
    getwkd();
    getsec();
    }

    }
    // end hide-->
    </script>
    <script LANGUAGE="VBScript">
    < !--hide from old browsers
    // handle swf sent VBScript events to IE with AXcontrol
    Sub clock2_FSCommand(ByVal cmd, ByVal args)
    call clock2_DoFSCommand(cmd, args)
    end sub
    // end hide-->
    </script>
    < !--end initial fscommand-->


    <body bgcolor="#666666">

    <p align="center">
    <object classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://active.macromedia.com/flash3/cabs/swflash.cab#version=3,0,0,0"
    ID="clock2" NAME="clock2" WIDTH="500" HEIGHT="300" border="0" vspace="0" hspace="0">
    <param name="movie" value="clock2.swf">
    <param name="quality" value="high">
    <param name="salign" value="TR"><embed NAME="clock2" SRC="clock2.swf" WIDTH="500" HEIGHT="300"
    PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
    SWLIVECONNECT="true" TYPE="application/x-shockwave-flash" QUALITY="high" SALIGN="TR"
    border="0" vspace="0" hspace="0">
    </object>
    </p>
    </body>
    </html>



  4. #4
    Senior Member
    Join Date
    Feb 2000
    Posts
    226

    Post

    Sorry, some how I can't post the code. It causes errors and it isn't completely displayed!?

    I will try again

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