Okay so I've always never been able to get preloaders to work with actionscript 2.0. Now that I've moved on to 3.0 I STILL can't get them to work. I've tried many tutorials and still I have not been able to get them to work. Can someone suggest me to a tutorial that works for them?
(This doesn't need to be answered, but I was thinking of just including it because I have a 2nd question :3) Random Extra Question: I've had a bracket broken for about 1 month on the very right tooth(my right) and I'm worried that it might mess up my progress. Thankfully I'm going in in a week, but it's been, like I said, 1 month already Does anyone know if this will be a huge drawback?
@Darkroot Thank you :3 Even if it doesn't work there is one tutorial that will for sure work, it's just the sketchy way of doing it so I didn't want to learn some lame "turn your problems into a feature" way -_-
@Whiskeyed Hahahaha yep. That's Armor Games for you XD
You could also look at something called 'factoryClass', though it's only usable if you don't compile using Flash I believe. Some info about it can be found here if you're interested!
So I finally got it to work, but once I added all my .as files to it to get the actual content in... It didn't work 0_0. I don't know why the .as files are affecting how my actionscript runs on just on frame of my timeline frames.
I know for a fact it doesn't involve the preloader, because it alone works fine.
I decided that I should make everything use .as files. So I'm trying to transfer it over.
You're on the right track, but I think I know what's going wrong here.
To summarize, you want a loadBar instance that extends movieclip. The thing you're missing though is the constructor, the function that gets executed when creating the loadBar. (Btw, naming convention: all classes start with a capital, though it's not mandatory)
Now, if you use this as Document Class, it should be allright. Note however that if you don't have the loadtext or loadBar instances on the timeline, it will still generate errors! I've also renamed the class to LoadBar, otherwise the removechild (loadBar) could generate errors as well, since the code doesn't know if it should remove a movieclip called loadBar or the class loadBar. In any case, you'll need to rename the .as to LoadBar.as
I hope this helps, and if you run into more errors, please do post them here since they can give a lot of insight as to what is actually going wrong
I just went with the 3 frame method which works for me. I just tried your code, but it did not work for me. I didn't get any errors, but the loadbar would just sit there and nothing would happen.