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!