all groups > macromedia flash sitedesign > august 2005 >
You're in the

macromedia flash sitedesign

group:

buttons which download more of a site - how?


buttons which download more of a site - how? M_Brown
8/30/2005 12:00:00 AM
macromedia flash sitedesign:
I've seen a lot of sites where you press a button on a flash site and some more
of the site is downloaded. It's a great way of designing a site which has a
lot of data in it but I don't know how it is done. Can anyone tell me how to
do it, or give me the terminology and I'll do some searchs for tutorials.

Hope you can help.

Mark
Re: buttons which download more of a site - how? Centerpoint Computer
9/1/2005 9:07:50 AM
Firstly, remove DATA from your vocabulary unless you're actually talking about
connecting to a data source, which is certainly possible, but I have no idea
yet how to do this.

What you are seeing is a main SWF file that has fairly simple action script
that calls additional external content, be it another SWF file, or a JPG image,
based on various triggers like button presses.

An example would be the site that I'm working on right now that I just started
at http://209.200.94.235/laceyart

The banner that you see is actually another SWF file that is being loaded on
frame 1 of the main SWF timeline.

On the actions layer of the main timeline, the root timeline, in frame 1, I
have the following code:

banner_mc.loadMovie("banner.swf");
stop();

This loads the banner automatically when the timeline reaches frame 1 and then
stops as indicated. The stop isn't really necessary considering there is only
1 frame in the main timeline. The animation in the banner that you see is in
the banner.swf file.

If you wanted to create a button to initiate this, you would first create the
button, and any up/down/over states that you preferred, then place the button
on the stage in the main timeline. Click the button and then open the action
script panel (F9). In the panel, type something like this:

on (release) { movieinstancename.loadMovie("flashfile.swf");

}

This should cause flash to load the external file "flashfile.swf" into your
movie clip which you need to create and add to the stage. It also must have an
instance name so it can be "targeted" so to speak.

Someone correct me if I'm wrong please!
AddThis Social Bookmark Button