First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: Jeffrey F. Hill | Website: http://www.flash-db.com


This tutorial describes a method of using JavaScript within your Flash movie without using any external JavaScript in the html your movie is embedded in. For the example we are going to be creating pop-up windows. This tutorial starts off with the basic method involved then goes into some more advanced effects. And finally finishes off by describing how to dynamically update the movie located in your pop-up with JavaScript from your parent movie.


This becomes a powerful method because it enables you to include JavaScript in any Flash movie regardless of where it is located. For example with this tutorial you can open up a new window (with specific dimensions, location, and browser features) from a banner ad or from your Flash footer for various message boards, regardless of what JavaScript is located in the document in which it is embedded. Traditionally you would have to include predefined JavaScript in the html document that the movie is embedded in. After we go over the basic technique we will be going into various effects using JavaScript such as shaking the pop-Up window, moving the pop-up once loaded, opening and closing the pop-up at specific delay times, scrolling to a specific location in your pop-up, etc etc. Then goes on to explain how to control that pop-up from the parent movie timeline - using this you can for example shake a pop-up window you previously opened at a specific time or event in your Flash movie. Some features will not be available to all browsers as well as when you are opening a pop-up window not located on the same server as the parent movie. The example for this tutorial provides you with a JavaScript code generator that you can use to create all the effects we will be covering plus more. Every single JavaScript property, method, and function related to pop-up windows was attempted to be included for use in the Auto-Code Generator - for this reason some will not be available to all browsers (most will though). You can use/review the auto-code generator at this link http://www.flash-db.com/PopUp In the end of this document I provided a brief overview of how to use the Auto-Code Generator, but it should be fairly self explanatory.

» Level Intermediate

Added: 2002-01-09
Rating: 9 Votes: 149
(10 being the highest)
» Author
Jeffrey Hill is a freelance web developer from Boulder, Colorado. He specializes in creating and developing dynamic database driven Flash content and applications. Specialty's include SQL, PHP, Perl, and XML.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.