This content has been marked as final. Show 6 replies
will the circles bounce off each other, too?
No the circles don'l need to bounce off each other.
Hope that makes it easier.
it would make it easier but i already have an experiment that i created where the circles (more like billiard balls) bounce off each other and the table edges.
i have it on my home computer so i'll check it in a few hours when i get home.
here's the code with balls bouncing off each other. i used four movieclips boxleft, boxright, boxtop, boxbottom to form a rectangular border and there's a ball movieclip with linkage id = ballID
Thanks for the code!
However I tried it and it's not working yet. I think it probably has something to do with the Movie Clips I created.
Just to clarify, the things I need to add are:
- a ball MC called ballMC
- four MCs called boxleft, boxright, boxtop, boxbottom
Should I place all these MCs on the stage?
What are the names I should give each MC instance?
Hope this makes sense.
only the box movieclips are onstage to form the border encasing the balls. you can set their _alpha to 0 if you don't want them visible.
but you need a ball moviecip with a LINKAGE ID = ballID. remove the ball movieclip from the stage, find it in the library, right click it, click linkage, tick export for actionscript and in the linkage id box type: ballID, then click ok and retest.