# Easy to solve problem with Preloader

**URL:** https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749
**Category:** flash
**Created:** [May 29, 2002, 3:43pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749 "2002-05-29T15:43:53Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 29, 2002, 3:43pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/1 "2002-05-29T15:43:53Z")

</div>

Good day,\r\r I’m trying to make a preloader for a movie. I followed the tutorial, “Preloaders Rererevisited”, to the letter and the preloader would not work. I also tried a tutorial at [actionscript.org](http://actionscript.org) but it didn’t work either. Does anyone know if you have to do something different in Flash MX? NOTE: Any URLs to the actual code or tutorials would be great, because I’m just learning the intermediate actionscript stuff. Thanks.\r\rZach

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 29, 2002, 4:15pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/2 "2002-05-29T16:15:49Z")

</div>

When you say, “it didnt work”, what exactly do you mean?\r\r

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 29, 2002, 5:10pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/3 "2002-05-29T17:10:54Z")

</div>

It means I followed the tutorials here:\r\r[pub40.ezboard.com/fkirupafrm24.showMessage?topicID=9.topic\r\rand here: \r\r[url=“http://actionscript.org/tutorials/intermediate/flash5\_preloaders/index.shtml”]actionscript.org/tutorials/intermediate/flash5\_preloaders/index.shtml](http://pub40.ezboard.com/fkirupafrm24.showMessage?topicID=9.topic)\r\rusing Flash MX and in the first one, the loading bar did not work. In the second one the movie would not preload or play. I followed everything exactly so I was wondering if it was different in MX than 5…or if anyone knew a different way than in the tutorials.\r\rZach\r

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 29, 2002, 5:14pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/4 "2002-05-29T17:14:17Z")

</div>

Jubba said he had trouble as well… Strange. Maybe if he’s found out what the trouble was…\r\rpom 0]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 29, 2002, 5:42pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/5 "2002-05-29T17:42:21Z")

</div>

Lets hope so, I’m so confused…:mad:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 29, 2002, 9:04pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/6 "2002-05-29T21:04:54Z")

</div>

can we see the code you are using? and what exactly is it doing? you are saying that it doesn’t work, but you aren’t telling us what it is doing. You need to give us specifics if you want us to debug your problem.\r\rThe only problem with mine is that I made a mistake when typing something. Other than that I was fine. The code in Upu’s tutorial does work. \r\rAs far as the load bar, make sure that you gave it an instance name.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 30, 2002, 9:52am UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/7 "2002-05-30T09:52:16Z")

</div>

Here is the code:\rtotalK=getBytesTotal()/1000;\rloadedK=getBytesLoaded()/1000;\rremainingK=totalK-loadedK;\rpercentageK=(loadedK/totalK)\*100;\rsetProperty(“bar”,\_xscale,percentageK);\rif(loadedK\>=totalK&&totalK!=0){\rgotoAndPlay(3);\r}\r\rI don’t know how to describe the problem other than Iput it in as described in the tutorial, along with the other go to and play code for the loop, and it will not preload the movie. The loading bar stays on the screen while the movie plays and doesn’t fill up or anything. Prehaps I did not give it an instance name. \r\rAm I supposed to put this code in a separate scene or what? I tried it like that but it didn’t work either.\r\r–Z\r

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 30, 2002, 12:02pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/8 "2002-05-30T12:02:57Z")

</div>

try changing this \r\rif(loadedK\>=totalK&&totalK!=0){\r\rto:\r\rif(remainingK\<=0 && loaded!=0){\r\r\rthen, when you test the movie, you know that you can’t just press CONTROL+ENTER once, right? you have to press it twice to get the preloader to work. And make sure that you put the Loadbar on its own layer and make the frames only two long. can you e-mail the fla. [jedick1@binghamton.edu](mailto:jedick1@binghamton.edu) I’ll take a look

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 30, 2002, 1:52pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/9 "2002-05-30T13:52:54Z")

</div>

Awesome. I’ll send it now. The .fla doesn’t have a preloader added, just the movie. If you could stick it in there, it would probably give me a better idea of how to do it. Didn’t know you had to press ctrl + enter twice either…well, it’s on it’s way, thanks again…Zach.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 30, 2002, 2:33pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/10 "2002-05-30T14:33:25Z")

</div>

Zach. Click here to and it will take you to a page where you can dl the FLA that i fixed.\r\r[www10.brinkster.com/jubba…oller.html](http://www10.brinkster.com/jubbaorf/flashFlas/Scroller.html)\r\rtake a look at the code and try to understand what I did. In order to view the preloader inside of Flash, you have to press CONTROL+ENTER to test the movie and then once it is up you have to press CONTROL+ENTER again. If you have any questions ask.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 30, 2002, 3:09pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/11 "2002-05-30T15:09:33Z")

</div>

AhHhhhhhhh…now I see.\r\rI didn;t have the @#%$ bar instance named did I? So Flash didn’t know what it was supposed to load, right? Cool. I’ll retain this as a template for future reference. \r\rQUESTION:::: Is it possible to make loading “bars” from other shapes, maybe a skewed circle that fills from top to bottom or something?\r\rThanks for the assist. I’m just starting to get a grip on action script. Every little bit helps. By the way what did you think of the movie itself? Did it run smoothly and look OK? Any suggestions?\r\rZach

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 30, 2002, 3:22pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/12 "2002-05-30T15:22:33Z")

</div>

it ran smoothly wasn’t too bad. Many many frames though…\r\ras far as other shapes, yes you can. You can pretty much do anything. It just takes some time and imagination.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 30, 2002, 8:19pm UTC](https://forum.kirupa.com/t/easy-to-solve-problem-with-preloader/1749/13 "2002-05-30T20:19:43Z")

</div>

Ahhh, that was a nice nap…\r\rYeah, there are alot of frames. I have no idea how to reduce the size. Oh well, much to learn. Thanks man.\r
