ࡱ> !Root Entryp|YrRASH+˧Contents(?Page 1Mn Page 2A  "#$%&')*+,-./012Root Entryp|YrRASH@˧Contents?Page 1Mn Page 2A Symbol 2;PSymbol 1  !"#$%&'()*+,-./0123456789:<=>?@BCDEFGHIJKLNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrCPicPage CPicLayer CPicFrame CPicSprite` `c?. ~? 9 TweenBarOOU0 6( f </)= " F#C!<-!   4&DD)J*I6NI4M4V<4H<$$3Z^00*0Z!M0 !4 4&CBf9 5 $# 9 5*VGm2~My  [4<24D6$2n  -3(>4Ri44 44*QE7*?2`/ R+#4E'Y5a-K-  ^K\.?9 ''9!;)z$R)F36^03w0 4S1Ud?A MaskO (^0 6(  </)= " F#C!<-!   4&DD)J*I6NI4M4V<4H<$$3$ !4 4&CB0^00*0Z!M  -9 5 $# 9 5*VGm2~My  [4<24D6$2n  E0(>4Ri44 44*Q7*(?2`/ R+#4E'Y5a-K-  ^D?9 ''9!;).41U06^03w0 4SZ$R)Fd?<//This is here to make sure the loadBar doesn't start playing when we don't want // it to. By default, Flash will play all movie clips unless the programmer states // otherwise. stop(); LinesOOCPicPage CPicLayer CPicFrame CPicShapesr000? Layer 1OCPicPage CPicLayer CPicFrameCPicText B Eras Bold ITC"(Content Goes Here @o Eras Bold ITCf"(This isn't the best example, since there is really no point to have a Loading Bar for such a small Flash file. If you run this Flash movie, you most likely won't even see the Loading Bar before it loads the content.?M Layer 1OCPicPage CPicLayer CPicFrame CPicSpriteJ Jd& loaderBar?Z VisualO?>U//Figure out the percentage of the movie that is loaded by first // asking Flash how big the total movie is - getBytesTotal(); // then repeatedly asking Flash how much of the movie is loaded - // getBytesLoaded(); ... Then, simple math to figure out the percentage. total_bytes = _root.getBytesTotal(); loaded_bytes = _root.getBytesLoaded(); percentage = int(loaded_bytes / total_bytes * 100); //The only trick here is to make sure the movie clip - loaderBar - // has exactly 100 frames. That way, you can tell the bar to go to // the correct position which will show the correct percentage. // Note: All the movie clip pointed to by 'loaderBar' (loadBar) contains // a relatively simple animation. Just a bar tweening from point A to // point B under a mask. loaderBar.gotoAndStop(percentage); //Now, all this does is constantly ask Flash whether or not frame 1 of Scene 2 // is loaded. (In this example all the content of the Flash movie starts at // Scene 2, frame 1.) If the frame is loaded, go to it and play it. Now, what you // may want to do, if you have a big movie, is ask Flash if the last frame of your movie // is loaded. If that's the case, you just need to change the ifFrameLoaded(..) statement. // ex: ifFrameLoaded("Scene 4", 58) ifFrameLoaded("Scene 2", 1) { gotoAndPlay("Scene 2", 1); } //This isn't really needed, as Flash will play the movie by default, but is kind of nice to have. // This will make sure Flash goes to the next frame - which will return it back to this frame to // make a somewhat endless recursion until the ifFrameLoaded(..) standards are met. play();?M}//Loop it back to the front so it keeps updating the getBytesLoaded() and the ifFrameLoaded(..) // functions. gotoAndPlay(1); CodeOO) CDocumentPagePage 1Scene 1?u?Page 2Scene 2}?>?Symbol 2tweener? Symbol 2?Symbol 1loadBar? Symbol 1t?phhhhh  CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3ff`zf*]hSymbol 2;PSymbol 1  !"#$%&'()*+,-./0123456789:<=>?@BCDEFGHIJKLNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrie, you most likely won't even see the Loading Bar before it loads the content.?M Layer 1OCPicPage CPicLayer CPicFrame CPicSpriteJ Jd& loaderBar?Z VisualO?>U//Figure out the percentage of the movie that is loaded by first // asking Flash how big the total movie is - getBytesTotal(); // then repeatedly asking Flash how much of the movie is loaded - // getBytesLoaded(); ... Then, simple math to figure out the percentage. total_bytes = _root.getBytesTotal(); loaded_bytes = _root.getBytesLoaded(); percentage = int(loaded_bytes / total_bytes * 100); //The only trick here is to make sure the movie clip - loaderBar - // has exactly 100 frames. That way, you can tell the bar to go to // the correct position which will show the correct percentage. // Note: All the movie clip pointed to by 'loaderBar' (loadBar) contains // a relatively simple animation. Just a bar tweening from point A to // point B under a mask. loaderBar.gotoAndStop(percentage); //Now, all this does is constantly ask Flash whether or not frame 1 of Scene 2 // is loaded. (In this example all the content of the Flash movie starts at // Scene 2, frame 1.) If the frame is loaded, go to it and play it. Now, what you // may want to do, if you have a big movie, is ask Flash if the last frame of your movie // is loaded. If that's the case, you just need to change the ifFrameLoaded(..) statement. // ex: ifFrameLoaded("Scene 4", 58) ifFrameLoaded("Scene 2", 1) { gotoAndPlay("Scene 2", 1); } //This isn't really needed, as Flash will play the movie by default, but is kind of nice to have. // This will make sure Flash goes to the next frame - which will return it back to this frame to // make a somewhat endless recursion until the ifFrameLoaded(..) standards are met. play();?M}//Loop it back to the front so it keeps updating the getBytesLoaded() and the ifFrameLoaded(..) // functions. gotoAndPlay(1); CodeOO) CDocumentPagePage 1Scene 1?u?Page 2Scene 2}?>?Symbol 2tweener? Symbol 2?Symbol 1loadBar? Symbol 1t?phhhhh  CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3ff`zf*]h