# Interactive Cube with reflection and floor

**URL:** <https://forum.kirupa.com/t/interactive-cube-with-reflection-and-floor/292724>\
**Category:** flash\
**Created:** [July 17, 2009, 11:42pm UTC](https://forum.kirupa.com/t/interactive-cube-with-reflection-and-floor/292724 "2009-07-17T23:42:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelanimator](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@michaelanimator](https://forum.kirupa.com/u/michaelanimator)\
**Post date:** [July 17, 2009, 11:42pm UTC](https://forum.kirupa.com/t/interactive-cube-with-reflection-and-floor/292724/1 "2009-07-17T23:42:33Z")

</div>

I’m building this in Flash.  
[http://www.croog.com/interactivecuberoom](http://www.croog.com/interactivecuberoom)

As you can see, when the mouse moves left and right, the cube (with reflection too) spins.  
It’s really just a stream of frames that change based on the mouse X position. Simply done to show the concept. Pretty easy

Now, Firstly, how do I make this box also react to the mouse’s vertical movement and then have the cube, and the reflection, and the floor react to that mouse movement as well.  
I also want to restrict the vertical movement as well so that you couldn’t go past a certain angle. Like you couldn’t be allowed to flip it upside-down for example. You would have to stay within certain controllable boundaries.  
Also, as a controllable option, it would be nice if it had some sort of bounciness/friction to the interaction with the mouse.

Any solid help?  
Thank You.
