A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [MX04] Pre-loader for level?

Hybrid View

  1. #1
    I hunt, therefore i am
    Join Date
    Aug 2006
    Location
    Wolverhampton, England
    Posts
    57

    [MX04] Pre-loader for level?

    hi all, ok ive got a game im working on, the links in my signature, anyway at the end of each level i have a portal, which when the main character touches, gotoAndPlays the next level, i was wondering if i could put kind of like a pre-loader before every level, of an animation of the character say walking through the portal, but i don't really want to move all my frames across to fit it in, anyway i can get a movie clip on my last frame, which plays everytime you touch a portal, but you still goto the frame where the portal sends you, i also have this with some holes which when you touch, it plays an animation of you falling, but restarts the game, anyway to get it so it knows what level you are on, and just restarts the level, but all from one "falling" movie clip. If i am unclear in anyway let me know!

    Thanks in advance
    Dog: "Master, you left me in the cold rain, my fur matted, soaking through, did you forget where? Come find me and take me home"

    Try my new game, which im constantly improving! Chrome http://www.newgrounds.com/portal/view/350275
    Arrow keys to move

  2. #2
    Please, Call Me Bob trogdor458's Avatar
    Join Date
    Aug 2006
    Location
    Pensacola, FL
    Posts
    915
    use a variable for that:
    levelimon++
    gotoAndPlay(yourpreloader);
    then on the last frame of yourpreloader:
    gotoAndPlay(levelimon);
    or something similer, your levels may consume more than one frame, not to mention you need to initiate the variable before doing the ++ thing

    when you say preloader, i imagined actually loading it, but thats unneccesary if you can load it all at one time (unless its just that huge of a game)

    better yet, move the levelimon++ to yourpreloader, you dont need to, but it seems more efficeint in a way

  3. #3
    I hunt, therefore i am
    Join Date
    Aug 2006
    Location
    Wolverhampton, England
    Posts
    57
    hi thanks for the reply, its not so much a preloader, but a little animation that plays at the end of every level showing the main charcter leaving the screen, would i have to put frame tags at the start of each level saying level1, level2 ?
    Dog: "Master, you left me in the cold rain, my fur matted, soaking through, did you forget where? Come find me and take me home"

    Try my new game, which im constantly improving! Chrome http://www.newgrounds.com/portal/view/350275
    Arrow keys to move

  4. #4
    I hunt, therefore i am
    Join Date
    Aug 2006
    Location
    Wolverhampton, England
    Posts
    57
    check the link in my sig. i want it so everytime you touch the portal it show you leaving through the portal before it changes frame
    Dog: "Master, you left me in the cold rain, my fur matted, soaking through, did you forget where? Come find me and take me home"

    Try my new game, which im constantly improving! Chrome http://www.newgrounds.com/portal/view/350275
    Arrow keys to move

  5. #5
    Please, Call Me Bob trogdor458's Avatar
    Join Date
    Aug 2006
    Location
    Pensacola, FL
    Posts
    915
    i alr4eady told you the answer
    an alternative is to attach a huge movieclip with your animation inside at the start of each level, and then have it remove itself after its done playing, but your person would able to move while it played, so thats a problem

    try my first suggestion

    your games a bit messy...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center