Easy to solve problem with Preloader

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 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

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

It means I followed the tutorials here:\r\rpub40.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\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

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

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

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.

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

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. [email protected] I’ll take a look

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.

Zach. Click here to and it will take you to a page where you can dl the FLA that i fixed.\r\rwww10.brinkster.com/jubba…oller.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.

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

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.

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