| 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!
|