.
.
 
Frames Navigation
with Flash

This tutorial focuses on using Flash navigation for websites with frames. You've seen it done, we do it here, now you can too.

Dissymmetry Logo (5,214 bytes)
1) The first thing that needs to be done is to find the name of each frame in your frameset. This can be found by opening the HTML document with the frameset in a text editor like Notepad or an HTML editor. An easy way is to open the page in your browser and view its source. You are looking for an HTML tag that looks like this:
<frame name="main_frame" scrolling="auto" src="main.html" marginwidth="0" marginheight="10">
You should be able to tell which frame is which by taking a look at the "src" parameter in this tag. The correct frame is the one with the src parameter equal to the page that you wish to change. My main body frame is the target that I wish to change and its name is "main_frame".

2) Now in Flash, we need to create a button which calls the change to the page. Any where you can place action script you can call a change to a page, not just buttons. You can place a page change at the end of a movie, for instance. But to keep it simple, we will use a button. Insert the button on the main timeline of the movie and insert the following action script in it:

On(Release)
  GetUrl("tutorials.html", window="main_frame")
   // URL = String, Window = String
End On
To get the "Window" string parameter of the script, insert "main_frame" in the box labeled "Window". Of course, you would substitute the name of your own frame in place of "main_frame".

3) The provided list of items in Flash for the box labeled "Window" are the standard set of HTML frame designations based on relation rather than name. "_self" returns the frame in which the HTML file that contains the .swf file resides. "_blank" opens a new empty browser window with dimensions set by the users' browser setting when the window is not maximized. "_parent" returns the frame or page which is immediately above the page returned by "_self" in the document hierarchy tree. "_top" returns the entire browser window in which the HTML file resides.

Notes on using Flash with Frames Navigation: There are a few things to remember when using Flash with Frames.

  • The URL entered is processed by the browser as if it had come from the HTML code containing the .swf file, regardless of where the .swf file is located in relation to the destination file. There is a bug in earlier Mac versions that gives the URL in relation to the .swf file rather than the HTML. To get around this platform problem, it is a good idea to keep your .swf files in the same folder as the html files that will contain it.
  • If a frame is to contain only a Flash movie, set the frame tag size to the same as the movie dimension, and list the properties as in the tag as listed in the first step of this tutorial to keep from having scroll bars and allowing visitors to resize the frame. The other thing is to set the .swf file to "Exact Fit" when published from Flash. If your movie and frame do not match in size, you can use 100% for the size settings to make it stretch to the full frame size. This can give odd results in some browsers which will stretch the movie to the full size of the browser window rather than the full size of the frame that contains the movie!
 

.
Right-Bottom 006699.gif (866 bytes)

"The Internet is the foundation for a new industrial order. ... If you don't believe deeply, wholly...that the Net is going to change your business, you're going to lose."  - Fortune Magazine

All graphics on this site are copyrighted by their respective distributors and may not be duplicated, modified in any fashion or used in any way without consent.

Last Updated: 12/5/07

Home |  Tutorials |  Basic |  Intermediate |  Advanced |  Contact Us