This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > September 2005 > buttons which download more of a site - how?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author buttons which download more of a site - how?
M_Brown

2005-08-30, 7:39 pm

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

Centerpoint Computer

2005-09-01, 7:22 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!

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews