Categories
Featured jobs
» More ActionScript, Flash and Flex jobs.
» Advertise a job for free
Our network
Advertisement

 »  Home  »  Tutorials  »  Flash  »  Beginner  »  Spawning External Browser Windows (Pop-ups)

Spawning External Browser Windows (Pop-ups)

By Jesse Stratford | Published 09/9/2005 | Beginner | Rating:
Jesse Stratford
Jesse lives and works in Melbourne Australia. He is the Cofounder and a Director of http://ActionScript.org. A Flash enthusiast, teacher, author, freelancer and speaker Jesse enjoys participating in the http://ActionScript.org community and the wider Flash scene when he has time. 

View all articles by Jesse Stratford
Page 1 of 1
Written by: Jesse Stratford
Difficulty Level: Beginner
Requirements: Flash 4 or higher
Topics Covered: How to launch a customized browser window via Flash.
Assumed Knowledge: Basic HTML and basic Flash usage.

 
There is no source for this tutorial.

Most sites which use Flash nowadays involve popup windows of some form. A popup window is a browser shell or window which opens on demand. The joys of spawning popups using JavaScript rather than just opening a new browser window mainly revolve around the fact that we can set various properties, such as the window height and width. This tutorial covers how to make popup windows and launch them from a Flash file embedded in a html document, it does not cover popups for stand-alone flash files, like Macromedia Projector executables.

This is really very basic. You can get the whole thing working in only 2 steps:

1. Insert the base Javascript code into your HTML code between the HEAD tags (<head> Script goes here </head>). Copy and paste the script below:

<script language="JavaScript">

<!--

function spawnWindow(URL,Name,features) {

        window.open(URL,Name,features);

}

//-->

</script>

2. Enter your details into the Generator (left) and then add them to your flash button in the following form:

on (release) {

        getURL ("javascript:spawnWindow...");

}

Where the '...' is the rest of the code you generate.

That's it! You're done! Just make sure your HTML page doesn't get overwritten each time you publish your Flash movie because you will lose the base code and your code will do nothing!

Jesse Stratford is the Co-Master of ActionScript.org and a freelance Flash developer and teacher. He is based in Australia and enjoys all things Flash.

NB: If you have comments or feedback please feel free to email me, but please do not email me Flash questions; the forums are provided for that purpose and you will get a faster answer by posting you question there.

If you have found this tutorial helpful, I hope that you will take 30 seconds to visit The Hunger Site where, with just one click you can make a free donation of food to a starving person in a third-world country. We do not benefit financially from this action; it is purely an act of charity.
This tutorial is protected by International Intellectual Property Rights laws and may not be reproduced or redistributed in full or part, without the prior written consent of the author. Unauthorized reproduction of this tutorial or its contents may result in prosecution. I've worked hard on this tutorial, please don't steal it.

How would you rate the quality of this article?
1 2 3 4 5
Poor Excellent

Verification:
Enter the security code shown below:
img


Add comment

Spread The Word / Bookmark this content

Clesto Digg it! Reddit Furl del.icio.us Spurl Yahoo!

Comments
  • Comment #1 (Posted by maggie - maggie at akermarketing.com)
    Rating
    Hi, thanks for the article. Do you know if this works with internet explorer? I tried something similar, using javascript, and my window popped up when viewing the site in Safari, but not in IE.
     
Submit Comment



Search Entire Site
Add to Google
Advertisements
Article Options
Latest New Articles
Set up a simple IIS Server for Flash
by Peter McBride

Day 1 at FITC Toronto 2008
by Anthony Pace

Simple reflection effect with AS2
by Jean André Mas

ActionScript.org Meets Josh Tynjala (aka dr_zeus)
by ActionScript.org Staff

Rapidly Create Online Flash Movies to Help Users Market, Sell and Support Software and Hardware
by Sabrina F

mailing list
Enter your email address:
mailing list
Subscribe Unsubscribe
© 2000-2007 actionscript.org! All Rights Reserved.
Read our Privacy Statement and Terms of Use...
Our dedicated server is hosted and managed by WebScorpion Webhosting.