I gave this a go, (and fixed up a few things) but for some reason, the
function rootateLoop is never actually called. Would you have any idea
why?

On 14/11/05, Robert Wąs <[EMAIL PROTECTED]> wrote:
> Simple recipe:
> carMC.rotateButton.onRelease=function(){
> this._parent.intvId=setiInterval(this._parent."rootateLoop")
> }
> carMC.onPress=function(){
> this.pressed=true
> }
> carMC.onRelease=function(){
> clearInterval(this.intvId)
> }
> //you have registration point in centre of car
> carMC.rootateLoop=function(){
> if(!this.pressed)return
> var rotation=Math.atan(Math.tan(this._ymouse/this._xmouse))*180/Math.PI
> /*
> there some stuff with cyclic's properties of tangent function, type:
>   if(this._xmouse>0 && this._ymouse<0)
> {
> rotation= -1 *rotation
> }
> //sory but not have free time for real results
> */
> this._rotation==rotation
>
> }
>
> Robert Wąs
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to