# CS4 /AS2 : Problem with Detecting Collisions between moving/ tweening objects

**URL:** <https://forum.kirupa.com/t/cs4-as2-problem-with-detecting-collisions-between-moving-tweening-objects/330502>\
**Category:** flash\
**Created:** [January 30, 2013, 2:38pm UTC](https://forum.kirupa.com/t/cs4-as2-problem-with-detecting-collisions-between-moving-tweening-objects/330502 "2013-01-30T14:38:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Plug\_Head](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@Plug\_Head](https://forum.kirupa.com/u/Plug_Head)\
**Post date:** [January 30, 2013, 2:38pm UTC](https://forum.kirupa.com/t/cs4-as2-problem-with-detecting-collisions-between-moving-tweening-objects/330502/1 "2013-01-30T14:38:31Z")

</div>

Here’s the thing

I am working on project where:  
[LIST]  
[_]A rectangle is rotating. Think of a clock. Programmed with a tween.  
[_]There is a generator. On click it produces a square, duplicate of a movieclip. This square can be dragged across the screen. The code for dragging is written on the original movieclip which is not on scene. Generator and square are different movie clips  
[_]I want to program a collision detection between the square and the rotating rectangle.  
[_]The hitTest function doesn’t work. . I have programmed collisions between moving objects before (bullets/enemies) and I can’t figure out what’s wrong.  
[/LIST]  
Help is more than appreciated.
