A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Extreme Snowboarder!

  1. #1
    Senior Member
    Join Date
    Apr 2003
    Posts
    202

    Extreme Snowboarder!

    I've started making a snowboarding game and yes you guessed it, I've got a few problems. Okay, I want the jump to be behind the snowboarder if he is in front of it and if the snowboarder goes behind it, the jump will be in front. Thanks in advance!

    -Dakid928



    P.S. If I didn't explain it that well, let me know.

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    The jump? As the hill or something?
    You can change depth (thats what its called if object is in front of or behind other object) using command
    this.swapDepth(number);

    But it works best only if you attach/duplicate the objects on screen and dont draw them directly.

    As I dont know more about how have you built the game, you might want to explain better. How are you placing hero and "jumps" on stage? Do you want same "jump" to be sometimes in front of hero and sometimes behind it or do you have many "jumps", some in front of and some behind it.

  3. #3
    Senior Member
    Join Date
    Apr 2003
    Posts
    202
    Thanx a heep man !


    -Dakid928.

  4. #4
    Senior Member
    Join Date
    Apr 2003
    Posts
    202
    As I dont know more about how have you built the game, you might want to explain better. How are you placing hero and "jumps" on stage? Do you want same "jump" to be sometimes in front of hero and sometimes behind it or do you have many "jumps", some in front of and some behind it. [/QUOTE] [/B]



    The way I set it up, is the little man is on a hill. The little man is in the upper left hand side of the hill. jumps randomly come in diferent places.

  5. #5
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    umm, no, Im still not able to picture it. Is it side view? Top down? Perhaps you could show swf or picture of it.

    If the jumps come in different places, then I think you are able to put hero on dapth 100 for example and jumps that should be in front of him would go to depths 101...200. Jumps behind him would go on depths 1...99.

  6. #6
    Senior Member
    Join Date
    Apr 2003
    Posts
    202
    How do I put pictures in here?

  7. #7
    Illuminatus! fospher.com's Avatar
    Join Date
    Jan 2002
    Location
    5th Dimension
    Posts
    2,185
    Originally posted by tonypa
    But it works best only if you attach/duplicate the objects on screen and dont draw them directly.



    I will challenge that thought. swapdepth works either way.

    Just make sure to not duplicate your objects in a same level as another object - it will cause the preceding movie clip to disappear.

  8. #8
    leight.com.au leight's Avatar
    Join Date
    Sep 2002
    Location
    australia
    Posts
    1,437
    just attach the .jpg, .png, .bmp, .jpeg when you post. and then when you click on the attachment it will show.

    if you want it in your post, u gota have it on the net so you can go like this
    code:



    i needed to write it in as or something coz otherwise it would make that a link.

    hope it helps

  9. #9
    Senior Member
    Join Date
    Apr 2003
    Posts
    202
    Thanx guys!

  10. #10
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Originally posted by fospher.com


    I will challenge that thought. swapdepth works either way.

    Just make sure to not duplicate your objects in a same level as another object - it will cause the preceding movie clip to disappear.
    Try this:
    make 2 frames and 2 layers.

    in layer 1 frame 2 place action
    gotoAndPlay (1);

    in layer 2 make 1 keyframe that lasts over both frame.

    draw mc in layer 2. Give it instance name "mc".

    place action on mc:
    onClipEvent (load) {
    this.swapDepths(1);
    }

    How many movie clips is on stage when you run it? And tell me it works like expected.

  11. #11
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    Yeah, swapDepths with authortime content generates that nasty, nasty bug.

    When I first "discovered" that I just couldn't find any info on it. MM count it as a "feature" and not a bug, so theres not even a white paper about it ( Or wasn't when I was pulling my hair out about it ).

    Squize.

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