Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make image in gallery load only when needed? 1

Status
Not open for further replies.

primativ

Technical User
Jul 3, 2003
4
US
I am trying to build a gallery of images in flash with a chooser menu in the first frame of the timeline and the graphics set up on the following frames of the same timeline. This involves buttons using code like:

on (release) {
gotoAndPlay (55);
}

The problem I run into is that when trying to access a graphic stored near the end of the timeline, flash tries to load all the images that are located before it on the timeline. This can really bog things down on slower bandwidths.
I really just want flash to load an image when it is asked for. Is there a way to make flash load only images visible on the screen?
 
load them dynamically.

Insert>New Symbol>Movie Clip

click back to main timeline and open the library. drag a copy of the empty clip you just made onto the stage and through properties give it an instance name (clip, say)

if the images are in the same folder as the swf then

on (release) {
loadMovie("some.jpg",clip);
}
this way your movie is only 1 frame and only the pics people want to see are loaded.

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top