dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Bounce =) Should be easy. Not!

  1. #1
    Mental Deficit Nionicle's Avatar
    Join Date
    Mar 2002
    Location
    Utah, Hyrum
    Posts
    1,348

    Bounce =) Should be easy. Not!

    ok ok


    picture this

    a ball bouncing around the stage
    easy

    now there is a wall 100 by 100 in the center of the stage
    hard.
    help
    please
    =)
    I can only postulate the probability of performing at a paramount level of perfection praised by the pulchritudinous paragon whose only practice is to preserve such a paradigm.

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Posts
    368
    i'd use getBounds to find the four edges of the square. if the ball was to the left of the left edge before it hit, then it should most likely bounce back to the right. if it was above the top edge, it should most likely bounce back up. you might have some inconsistencies if it hits close to a corner, but overall, should be ok.

  3. #3
    Mental Deficit Nionicle's Avatar
    Join Date
    Mar 2002
    Location
    Utah, Hyrum
    Posts
    1,348
    hmmmmm
    bit-101 thanx. too hard to explain ill upload an fla.


    Ill upload an fla of what i mean.



    ps thanx for the gravity tutorial.
    I can only postulate the probability of performing at a paramount level of perfection praised by the pulchritudinous paragon whose only practice is to preserve such a paradigm.

  4. #4
    Mental Deficit Nionicle's Avatar
    Join Date
    Mar 2002
    Location
    Utah, Hyrum
    Posts
    1,348
    Here it is.

    the white rectangle in the middle is what i want the ball to bounce off of.
    Attached Files Attached Files
    I can only postulate the probability of performing at a paramount level of perfection praised by the pulchritudinous paragon whose only practice is to preserve such a paradigm.

  5. #5
    Senior Member
    Join Date
    Jan 2002
    Posts
    368
    i understood what you meant in the first post. my answer is one way to go about it.

  6. #6
    Mental Deficit Nionicle's Avatar
    Join Date
    Mar 2002
    Location
    Utah, Hyrum
    Posts
    1,348
    ahahah is getbounds flash mx?

    Thanx dawg
    I can only postulate the probability of performing at a paramount level of perfection praised by the pulchritudinous paragon whose only practice is to preserve such a paradigm.

  7. #7
    Mental Deficit Nionicle's Avatar
    Join Date
    Mar 2002
    Location
    Utah, Hyrum
    Posts
    1,348
    what is target coordinate space?
    I can only postulate the probability of performing at a paramount level of perfection praised by the pulchritudinous paragon whose only practice is to preserve such a paradigm.

  8. #8
    Senior Member
    Join Date
    Jan 2002
    Posts
    368
    target coord space is like a viewpoint. are you looking at the bounds from the stage coords or the movie clip coords?

    for instance, 100x100 movieclip in center stage. from its coord space, its bounds are -50, +50 on x and -50, +50 on y.

    from root, the bounds are something like 225, 325 on x, 150, 250 on y.

  9. #9
    Mental Deficit Nionicle's Avatar
    Join Date
    Mar 2002
    Location
    Utah, Hyrum
    Posts
    1,348
    Im not sure how to approach this with get bounds.

    Would this be in the ball movieclip?

    vars = _root.MovieClip
    vars.getBounds(_root.movieClip)
    if (_x > vars){
    }
    ?

    I know thats not right just attempting.
    I can only postulate the probability of performing at a paramount level of perfection praised by the pulchritudinous paragon whose only practice is to preserve such a paradigm.

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