Welcome to TalkGraphics.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2000
    Posts
    22

    Default

    I would like to open a html window form Flash which would have the size I want (using javascript)
    Flash file is called sitenadia.swf and is integrated in my html file as sitenadia.

    Hereafter is my code, can anybody tell me what is wrong? (of course it doesn't work : it open two windows, one of them contains [OBJECT])

    <HTML>
    <HEAD>
    <TITLE>sitenadia</TITLE>
    </HEAD>
    <BODY bgcolor="#000000" leftmargin="0" marginwidth="0" marginheight="0" topmargin="0">
    <!-- URL's used in the movie--> <A HREF=contact.htm></A> <A HREF=javascriptpenNewWindow('virginie.html','thewin','height=400, width=400,toolbar=no,scrollbars=yes')></A>

    <OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
    ID=sitenadia WIDTH=640 HEIGHT=480 name="sitenadia">
    <PARAM NAME=movie VALUE="sitenadia.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#000000>
    <EMBED src="sitenadia.swf" quality=high bgcolor=#000000 WIDTH=640 HEIGHT=480 swLiveConnect=true NAME=sitenadia TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ></EMBED>
    </OBJECT>
    </BODY>
    </HTML>
    IP

  2. #2
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    Where's your function "OpenNewWindow"? It's not defined anywhere. You can change that to window.open(...) and it should work. Alternately, check some of the earlier posts I made in responses to the same questions, like the one posted by Urban Fox titled "Java Script in Flash".


    hth,
    Deep (just a guy)

    <pre><font face="courier" size="2">,-----------------------------.

    | Pradeep Kumar Nair, B.Math |

    | Graphic/Multimedia Designer |

    | ICQ#: 39102360 |

    | Medius Communications, Inc. |

    | http://www.medius.com |

    `-----------------------------'</font></pre>
    Moderator - i/us Flash Forum
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

  3. #3
    Join Date
    Oct 2000
    Posts
    22

    Default

    Here is the code with window.open... What is wrong (still open two blank windows, one contains the [OBJECT] tag)


    <HTML>
    <HEAD>
    <TITLE>sitenadia</TITLE>
    </HEAD>
    <BODY bgcolor="#000000">
    < !-- URL's used in the movie-->
    <A HREF=javascript:window.open('artango.html','thewin ','height=400,width=400,toolbar=no,scrollbars=yes' )></A>

    <OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
    ID=sitenadia WIDTH=640 HEIGHT=480>
    <PARAM NAME=movie VALUE="sitenadia.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="sitenadia.swf" quality=high bgcolor=#000000 WIDTH=640 HEIGHT=480 swLiveConnect=true NAME=sitenadia TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
    </OBJECT>
    </BODY>
    </HTML>
    IP

  4. #4
    Join Date
    Oct 2000
    Posts
    22

    Default

    Here is the code with window.open... What is wrong (still open two blank windows, one contains the [OBJECT] tag)


    <HTML>
    <HEAD>
    <TITLE>sitenadia</TITLE>
    </HEAD>
    <BODY bgcolor="#000000">
    <!-- URL's used in the movie-->
    <A HREF=contact.htm></A> <A HREF=javascript:window.open('virginie.html','thewi n','height=400,width=400,toolbar=no,scrollbars=yes ')></A> <A HREF=javascript:window.open('artango.html','thewin ','height=400,width=400,toolbar=no,scrollbars=yes' )></A>

    <OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
    ID=sitenadia WIDTH=640 HEIGHT=480>
    <PARAM NAME=movie VALUE="sitenadia.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="sitenadia.swf" quality=high bgcolor=#000000 WIDTH=640 HEIGHT=480 swLiveConnect=true NAME=sitenadia TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
    </OBJECT>
    </BODY>
    </HTML>
    IP

  5. #5
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    Use this script in your HTML code (this is taken directly from Steve's earlier post), and then in your flash movie, use "getURL(javascript:launchwin('virginie.html', 'thewin'))

    <SCRIPT LANGUAGE="JavaScript"> var javascript_version = 1.0;</SCRIPT>
    <SCRIPT language="JavaScript1.1"> javascript_version = 1.1;</SCRIPT>
    <SCRIPT language="JavaScript">

    var newwin;

    function launchwin(winurl,winname)
    {
    //This launches a new window and then
    //focuses it if window.focus() is supported.
    newwin = window.open(winurl,winname,'height=400, width=400, toolbar=no, scrollbars=yes');

    if(javascript_version > 1.0)
    {
    //delay a bit here because IE4 encounters errors
    //when trying to focus a recently opened window
    setTimeout('newwin.focus();',250);
    }
    }
    </SCRIPT>

    If this doesn't work, then send your .fla to pknair@alumni.uwaterloo.ca and I'll have a look to see what's wrong.


    hth,
    Deep (just a guy)

    <pre><font face="courier" size="2">,-----------------------------.

    | Pradeep Kumar Nair, B.Math |

    | Graphic/Multimedia Designer |

    | ICQ#: 39102360 |

    | Medius Communications, Inc. |

    | http://www.medius.com |

    `-----------------------------'</font></pre>
    Moderator - i/us Flash Forum
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

 

 

Bookmarks

Posting Permissions

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