# Help with Programmatic Animation

**URL:** <https://forum.kirupa.com/t/help-with-programmatic-animation/282876>\
**Category:** flash\
**Created:** [February 27, 2009, 11:26am UTC](https://forum.kirupa.com/t/help-with-programmatic-animation/282876 "2009-02-27T11:26:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![absameen](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@absameen](https://forum.kirupa.com/u/absameen)\
**Post date:** [February 27, 2009, 11:26am UTC](https://forum.kirupa.com/t/help-with-programmatic-animation/282876/1 "2009-02-27T11:26:23Z")

</div>

I’ve just learned the basics of programmatic animation in Actionscript 3.0 but I can’t seem to think of the right solution for this problem.

Here is what I’m trying to do: A ball moves at a certain speed from the left of the screen to the right end. If there’s a box in the way, it keeps bumping into it until the box breaks and it continues moving forward.

The box will have a set weight that will control how much it slides when it is bumped by the ball. The ball will be pushed back a bit when it bumps the box.

I have a very specific idea and all I need is a little help starting. How would you tackle this problem?
