# AS3: Preloading slides for a Slideshow best practice question

**URL:** <https://forum.kirupa.com/t/as3-preloading-slides-for-a-slideshow-best-practice-question/282160>\
**Category:** flash\
**Created:** [February 18, 2009, 12:56pm UTC](https://forum.kirupa.com/t/as3-preloading-slides-for-a-slideshow-best-practice-question/282160 "2009-02-18T12:56:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tripaz](https://avatars.discourse-cdn.com/v4/letter/t/e495f1/32.png) [@tripaz](https://forum.kirupa.com/u/tripaz)\
**Post date:** [February 18, 2009, 12:56pm UTC](https://forum.kirupa.com/t/as3-preloading-slides-for-a-slideshow-best-practice-question/282160/1 "2009-02-18T12:56:27Z")

</div>

hi all,  
basically I’m looking for the best way to preload slides for a slideshow. The application isn’t really a slideshow app, its a video player that listens for cuepoints based on the stream time. If a cuepoint is triggered a new slide (1.swf … 199.swf) is loaded into a container.  
Since some of the cuepoints are only seconds apart, I am looking for a way to preload all the slides in the background and then show the right slide at the right time. Since the user can skip into the video, I need to be able to always show the right slide at that time.

To explain this: IN AS2 the player worked this way.

- a slides.swf file was loaded that contained all the slides 1-200 on sepearte frames.  
so in the app when a cuepoint was fired I just said:  
gotoAndPlay(cuepoint.name) where name was a number from 1-200.

In AS3 I would now like to load seperate slide files 1.swf 2.swf - 200.swf.  
how do target for example 60.swf if that cuepoint is fired? Do I need to do displaylist stacking swapchild stuff or what? and how do i do that?

To Consider:

1. Some of the presentations have 200+ slides (20-60k each). --\> can I actually preload them all without performance problems.

[LIST]  
[\*]maybe only preload 5 slides from current position (needs to be plus minus 5) since you can skip back and forward. And you can jump withing the video.  
[/LIST]  
2. How do I do this. My cuepoints xml will have all the slide urls etc, but how do I load all of the slides and then bring them to the front when needed.

Thx in advance for any suggestions

EDIT: ok found something.  
I just load all the images sequentially, --\> Event.COMPLETE --\> load next slide.  
then when I reach a cuepoint and the loader loads the slides url it seems to be cached already and thereby is preloaded.

nor sure if this is a good way to do it.
