all groups > flash (macromedia) > march 2005 >
You're in the

flash (macromedia)

group:

External SWF in scrollpane


External SWF in scrollpane kjja
3/9/2005 11:16:27 PM
flash (macromedia):
I need to load about 80 images of book pages into a stand alone projector and
make them large enough to be readable.

First I converted the image files of the book's pages into movie symbols and
then referencing the movie symbols in a scroll pane so that the text of the
book would be large enough to be read on the screen. However, the published
file was HUGE (80+MB)! Althought this is a stand alone project (to go on a
CD), I'm worried about loading time.

To avoid unconscionable monopoly of the user's prospectively-slow machines, I
thought I might create an external swf for each of the books' pages and try
loading them into the scroll pane so that they could be displayed in large
format using a small footprint and not crater the users computer by loading
80MB at once. I'm having dificulty finding the code to do this.

Any help? Is there a better way to do this?

Re: External SWF in scrollpane rlc5611
3/9/2005 11:34:50 PM
Re: External SWF in scrollpane kjja
3/10/2005 12:38:24 AM
Re: External SWF in scrollpane fasterthanlight
3/10/2005 1:05:07 AM
Well, we all know that to use the scrollpane component, you must export the
movieclip content for actionscript through properties. So, create a new
movieclip. first frame, put your loadmovie command in it. Now, go to your
library, right click the movie clip you just made, click properties, and then
check 'Export for Actionscript'. give it a new name, or use the one it
suggests. Type that name into the scrollpane target path. And there you have
it.
Re: External SWF in scrollpane rlc5611
3/10/2005 3:59:22 AM
Give this a try and see if it helps. Do as fasterthanlight suggests with some
clip (the first JPG would be a good idea) placed into the library. Say just for
the purpose of this post that the scrollpane instance name is 'mypane' and the
clip you are going to put in the library is 'jpgclips'.
mypane.setScrollContent('jpgclips'); This loads the first jpg out of the
library and the scrollpane needs to do this so it can set up all its internal
assets. Once that first clip is loaded, you no longer need to use the library.
Now you can put in new jpgs as: mypane.tmp_mc.loadMovie('the_next_jpeg.jpg');
and, if the jpeg is a different size than the first one,
mypane.refreshPane();//to update the scroll bars to the size of the new jpeg.
and you may need to wait until the jpeg has been loaded enough so that the
scrollpane knows what size it will be before doing that. If the JPEG's are all
the same size, there is a simpler way of doing it. In that case, instead of
loading the jpeg directly from the library, place it inside a clip holder
within the movie clip and then load into the clip holder rather to tmp_mc
directly. If the clip holder were called 'picholder', the path for loading
jpegs would then be mypane.tmp_mc.picholder.loadMovie('the_next_jpeg.jpg');
Hope that makes sense. The advantage of doing this is that when you first load
a new jpeg, depending on the timing, the scrollpane could think the size is 0x0
and not add any scroll bars and, worse, not set a mask. By loading into a clip
holder within the content clip, you avoid this problem.
Re: External SWF in scrollpane kjja
3/10/2005 2:27:04 PM
AddThis Social Bookmark Button