PDA

View Full Version : Need advice on Loading external files


MondoMan
03-31-2003, 07:04 PM
I'm a little new to ActionScript so bear with me if this is a stupid question:

Problem: I have a nav header file done in Flash. Within this this header I have a picture/quote that my client has requested load randomly from a number of pictures/quotes. My first thought was to create multiple SWF files that load randomly via JS. But I feel a more streamlined solution would be to load the random images into a layer in the main SWF file.

Question: Does anyone have experience with this? Is this the best way to do it? Does anyone have a "randomizer" type script they could offer up?

Any help would be very appreciated! TIA, MondoMan

Jesse
03-31-2003, 09:21 PM
Try the library:
http://www.actionscript.org/actionscripts_library/main/search.cgi?query=load+random
There is code for loading random SWFs, JPEGs, and quotes all on that page.

MondoMan
03-31-2003, 10:45 PM
That script looks easy to deal with...thanks. Does the "level" refer to a level name within the parent file? The flash documentation isn't totally clear on "levels"?

Jesse
04-02-2003, 09:41 AM
Levels are like layers of paper in Flash. More like layers of transparencies. Your content all starts on _level0 and when you use loadMovieNum or just loadMovie with a layer target, you can specify the new target level. The higher the level, the higher up the 'stack' of transparencies it is. SO content on level0 is hidden by overlapping content on level1. I'm tired so that's a poor description but it should do.