Groups | Blog | Home
all groups > flash actionscript > february 2005 >

flash actionscript : need help with preloader


garroyo
2/1/2005 9:39:16 PM
I have a preloader that has worked fine for me on several occasions. However,
in this circumstance I am having some trouble with it. It works, but for some
reason the percentage complete and the status bar does not appear until it has
reached about 90%. I've done some debugging. I have two files online. One
that works and one that doesn't.
http://www.audioartstudios.com/version2/swf/vt2a.swf and
http://www.audioartstudios.com/version2/swf/vt2b.swf The only difference
between the two is what I have in the library. I did not make any changes
anywhere else in the file. What I added to the library are several pictures,
buttons, and mc's. This changed the swf size from 57K to 379K. The files size
should not make a difference, and in fact has not mattered in the past when I
have created swf's with the same preloader and with a larger file size. This
is the code I use for my preloader: onClipEvent (enterFrame) { loading =
_parent.getBytesLoaded(); total = _parent.getBytesTotal(); percent =
100*loading/total; percentage = Math.round(percent) + '%'; loadBar._width =
percent; if (percent>99) { _parent.gotoAndPlay(2); } } The preloader is built
in a mc and the above code is placed on the mc. The preloader is only on the
first frame and the only other image on the first frame is a 1 pixel border.
The swf stops on the first frame and does not move to frame 2 until the
preloader is complete. I could really use some help, or better yet, an answer.
I need to have those images in the library and will make use of them on the
timeline once I have the preloader fixed.
Peter Blumenthal
2/3/2005 1:10:49 PM
Any content that exists in the library with a linkage ID for later use by
actionscript is by default exported on the first frame, as are components.
this sounds like the root of your problem to me. Tag off 'Export in first
frame' in Linkage properties, and place the item at the end of the timeline,
somewhere where it will not be visible to the user.


garroyo
2/8/2005 10:30:32 PM
saral ( IIL_DELHI )
2/15/2005 9:49:37 AM
Hi,
Place the preloader on different screen which will execute first and then
your movie.
enjoy!!!!!!!!!!!!

saral

[quoted text, click to view]

AddThis Social Bookmark Button