Hi,
So, I’m working on a banner which will be using a lot of techniques usually used in games, such as collision detection and user interaction to change the direction and of a movieclip.
I have a movieclip on the scene that starts out moving around the screen at a certain x and y speed:
[COLOR=Blue] this.xspeed=-1;
this.yspeed=0.25;[/COLOR]
This movieclip is reflected back when it hits the edges of the scene (xspeed or yspeed is reversed). Lets say that when the movieclip hits the right edge of the scene and is reflected, I also want it to rotate +30 degrees. However, if has already been rotated 30 degrees and hits that same right edge again, it should rotate back to the original angle.
Any thoughts on how to accomplish this?
Also, beneath that main movieclip is a shadow. This shadow should shrink or grow and decrease or increase its alpha-value, depending on the y-coordinate of the main movieclip (or distance between the shadow and the main movieclip).
How would I best deal with this situation?