Users browsing this thread: 5 Guest(s)
[GAME][IN DEVELOPMENT] Fl1p
#14
I think he shouldn't jumpittyjump when you keep the button pushed.

The first room with white walls was a bit glitchy, I kept jumping against the black part but it would work randomly rather than as expected.

Inmidst room three or four, I was magically thrown back to an intro screen.

I'll just drop my usual preloader code here in case it could help you?
Code:
stop(); // important. Prevents the game from startinjg before loading.

addEventListener(Event.ENTER_FRAME, loading); // tell flash that we want to call that function every time

function loading(e:Event):void
{
    var total:Number = this.stage.loaderInfo.bytesTotal;        // total size of the flash
    var loaded:Number = this.stage.loaderInfo.bytesLoaded;    // loaded part
    
    if (total <= 0) {
        total = 1;    // prevents a divide-by-zero INFINITY error
    }
    
    // I have a loading bar movieclip that's basically a rectangle which I scale here.
    bar_mc.scaleX = loaded/total;
    // also some text thingies to display the loaded bytes and percentage
    txt_percent.text = Math.floor((loaded/total)*100)+ "%";
    txt_bytes.text = Math.floor(loaded / 1000) + "/" + Math.floor(total / 1000) + " KB";
    
    if (total <= loaded){
        gotoAndStop(2); // go to next frame (actual game)
        // you could also enable a "START" button here instead.
        removeEventListener(Event.ENTER_FRAME, loading); // we don't need that any longer!
    }

}
Thanked by: puggsoy


Messages In This Thread
[GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 03-02-2012, 10:37 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by Sengir - 03-02-2012, 06:10 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 03-03-2012, 03:44 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by SimplyMatt - 03-04-2012, 05:11 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 03-04-2012, 08:25 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by SimplyMatt - 03-04-2012, 09:23 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 03-29-2012, 04:18 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by Shade - 03-29-2012, 06:14 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by Skorpion - 03-29-2012, 07:55 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 03-30-2012, 08:21 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by Butler - 03-30-2012, 01:18 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 06-24-2012, 03:52 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 08-07-2012, 02:46 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by Previous - 08-07-2012, 03:08 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 08-07-2012, 03:42 PM
RE: [GAME][IN DEVELOPMENT] Fl1p - by Previous - 08-08-2012, 05:15 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 08-08-2012, 09:13 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by TheShyGuy - 08-08-2012, 12:22 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 08-08-2012, 04:00 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by Sengir - 08-08-2012, 01:01 AM
RE: [GAME][IN DEVELOPMENT] Fl1p - by puggsoy - 08-08-2012, 09:29 AM

Forum Jump: