Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: Re: Opening new document in new window |
From: | Laura Hamilton |
Date: | Sun, 3 Dec 2000 01:51:27 GMT |
Renu Vora wrote:
This must be simple, but I am not able to do it.
How do I get an HTML page to open in a new window(as against the same
browser window in which the animation is playing) on a button click within a
flash animation?
-----------------------------------------
These instructions are from:
http://www.moock.org/webdesign/flash/launchwindow/launchwindow-javascript.ht
ml
1) Add a getURL action to a frame or a button.
2) In the URL field (was "Network URL" in Flash 2) of the getURL action,
enter:
javascript:launchwin('yourpage.html' , 'newwindow' , 'height=150,width=300')
For each window you want to pop up, just change the filename "yourpage.html"
to match the name of the file you want to appear in the new window. You can
also change the height and width, or add as many extra features as are
supported by the window.open method. For a list of those features, and for
more information on the javascript used in the window launcher, visit
javascript utopia's article on the subject.
3)In your HTML document where your movie lives, you'll need to add the
javascript with the "launchwin" function that pops up the window. Here's the
code:
<HTML>
<HEAD>
<TITLE>Your Page Title Goes Here</TITLE>
<!--
Popup Window
Version 2.0
Last Updated: May 7, 1999
Code maintained at: http://www.moock.org/webdesign/javascript/
Copy permission granted for non-commercial uses. Written by Colin Moock.-->
<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,winfeatures)
{
//This launches a new window and then
//focuses it if window.focus() is supported.
newwin = window.open(winurl,winname,winfeatures);
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>
</HEAD>
<BODY>
Place your movie here.
</BODY>
</HTML>
Good luck,
Laura Hamilton
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]