A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: need help making fscommand work with this

  1. #1
    Member
    Join Date
    Jul 2001
    Posts
    56
    hi i posted this a couple of days ago with no response i i dont suppose theres a hope of it getting seen 3 pages deep, anyway i need help making the fscommand in this script work.

    <HTML>
    <HEAD>
    <TITLE>stuff</TITLE>
    </HEAD>

    <script LANGUAGE="JavaScript">
    <!-- Hide

    function stuff_DoFSCommand(command, args)
    {
    if ( command == "this1" )
    {
    myWin=window.open("", "Click_Image_to_Close_Window", "width=480,height=326,status=no,toolbar=no,menubar =no,,scrollbars=no");
    myWin.document.open();
    myWin.document.write("<html><head><title>Click Image to Close Window");
    myWin.document.write("</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 link=#000000>");
    myWin.document.write("<center><a href='javascript:close()'>");
    myWin.document.write(args);
    myWin.document.write("</a>");
    myWin.document.write("</font></center>");
    myWin.document.write("</body></html>");
    myWin.document.close();
    }
    }
    // done hiding -->
    </script>

    <script LANGUAGE="VBScript">
    <!--
    Sub stuff_FSCommand(ByVal command, ByVal args)
    call stuff_DoFSCommand(command, args)
    end sub
    // done hiding -->
    </script>

    <BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <OBJECT WIDTH=764 HEIGHT=548 ID="stuff">
    <PARAM NAME=movie VALUE="stuff.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#FFFFFF>
    <EMBED src="stuff.swf" name="stuff" quality=high bgcolor=#FFFFFF WIDTH=764 HEIGHT=548></EMBED>
    </OBJECT>
    </BODY>
    </HTML>

    ps ive checked to see that my command name is "this1"

  2. #2
    Senior Member
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    437
    Have you tested your script to make sure that your script is correct? Test it by placing a link in your HTML page, so when you click on that link, it will pass param to the script and triger the script. If the result is what you got then you know that your FScommand is screwed up, then post your FScommand code so we can look at.


  3. #3
    Member
    Join Date
    Jul 2001
    Posts
    56
    yep ok i guess your right, i replaced args with "junktext", but i dont know what could be wrong with it

    on (release) {
    fscommand ("this1", "<img src=\"images/Untitled-26.jpg\" border=1><br>");
    }

    thats my fscommand, the wierd thing is that at one point it opened the window, meaning that the script worked at one point then stopped working, i was editing it and playing around with it but i dont see what else could be wrong. fscommand isn't really that complicated so its got to be looking me right in the face grrrrrr

  4. #4
    Senior Member
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    437
    Code:
    on (release) { 
    fscommand ("this1", "TEST TEST TEST TEST"); 
    }
    Try this code and see if this work. If you can only open the window but doesn't not see "TEST TEST TEST TEST" then you know there is a bug in your script. If you see TEST TEST TEST TEST then you know your syntax "<img src=\"images/Untitled-26.jpg\" border=1><br>" is wrong.

  5. #5
    Member
    Join Date
    Jul 2001
    Posts
    56
    The window just wont open, it appears as if nothing at all happens, it used to start thinking (ya know the mouse icon changed) but now it does nothing...

    If someone could see the syntax arror in this it would be really helpful,im sure it has to be this as the flash script to tell this to work is really simple.

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Location
    Not on the dole any more
    Posts
    1,040
    This might sound patronising, but are you sure the problem isn't that it is working, but on a window that's already been created and is now behind all your other windows? This script won't create a new window every time it's run, unless the original 'new window' is shut down. It'll just keep writing to the first 'new window', regardless of whether it's at the front or not.

  7. #7
    Senior Member
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    437
    That maybe the case.

  8. #8
    Member
    Join Date
    Jul 2001
    Posts
    56
    LOL no thats not the problem,
    on the windows i create like this inside of flash i included an onfocus command to bring the window to the top when you click it each time (if you sent it to the back) that was done since i posted this, and i didn't see any reason in fixing that.

    Anyway the problem is that thats alot of text in 1 actionscript thats repeated 27 times, theoretically this should be alot easier
    Hang on tho, eventually ill be putting this page on the flash check forum on this site if i can get this problem solved.

  9. #9
    Member
    Join Date
    Jul 2001
    Posts
    56
    oh yea, and yes i know about the 2 ","s on the 15th line.

    and thnx for the responses anyway.

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