|
-
Flash Intermediate
[MX] Loading Bar
Ok, I don't know how to say this without sounding stupid, but...
I started a game, and it seems great, but I forgot to put in a loading bar.
How stupid is that!!??
is there any way I can put one in without messing the whole thing up?
In the process of designing a quirky little game engine called gulp. Check out it's progress below: @ my blog.
---
Check out my blog at XenElement.com
-
that depends,
just make a backup of your fla file and try one of the many preloader tutorials out there
http://www.google.com/search?hl=en&c...er&btnG=Search
it basicly goes like this in most cases:
you put this code on the very first frame and the whole game after that (e.g frame 2 or better 3 or so:
PHP Code:
stop();
onEnterFrame = function(){
var a = int(_framesloaded);// in case of Null or undefined it returns 0
var b = int(_totalframes);//same here
if (a == b && b > 0){
delete onEnterFrame;
play();
}else{//preloading...
var p = a/b;
trace("movie Loaded: "+int(p*100)+" %");
}
}
what it does is for example if you have set your framerate to 32 fps it checks 32 times per second if the loaded bytes of your flash movie match the total to be loaded bytes.
Anytime between that it traces out the loaded state in percentage,- you can switch that with a textfield displaying the progress of whats been loaded so far- but then dont forget to embed the digit characters or else anyone else sees a ugly times new roman font without anti- aliasing.
-
Flash Intermediate
Thanks, its a big help. Btw nice job with your game, cant wait to see ur next entries to the competition.
In the process of designing a quirky little game engine called gulp. Check out it's progress below: @ my blog.
---
Check out my blog at XenElement.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|