A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Know action scipt, c if u can answer this one

  1. #1
    hello,
    can anyone tell me what the action script would look like if
    i wanted to bounce a ball around a shape that looks like this;
    ______
    / \
    / \
    / \
    / \
    / \
    /________________\

    i will be thankfull for any help you can give

    thanx
    Gadgets

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Posts
    203
    I guess you could have the ball moving with something like this._y = this._y - 5;, then when it comes in contact with the wall to have it go the other direction:

    if (this.hitTest(_root.wallmc)) {
    this._y = this._y + 5;
    }

    I don't know, I'm really tired and haven't tried it, so I guess you could give it a shot. Or you could wait for the Heavyweights to reply.

    Just an idea here...

  3. #3
    Senior Member Olorin's Avatar
    Join Date
    Aug 2000
    Posts
    1,151
    Have a look in the flashkit movies section, there are several great examples of bouncing balls, complete with downloadable fla's.

    Olorin

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