[Flashcoders] flip in same postion

2008-06-11 Thread sense co moh
Hi
I have Video playing in the center of the stage and I'm using button to filp it 
function filp(event:MouseEvent):void {
 
 mySampleMC.scaleY *= -1;
}

mySampleMC.addEventListener(MouseEvent.CLICK, flip);

but the problem when I flip it change Y postion and go up ,
I wnat to flip it and keep it in same postion 
Help please
Thanks
Bassam



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flip in same postion

2008-06-11 Thread Ashim D'Silva
two options:
1. put it inside another container at object.y = (object.height/2)*-1; and
then negetive scale the container.
or
2. move the y of the object as you scaleY, so for the code below, add
mySampleMC.y = orginalY - mySampleMC.height;

2008/6/10 sense co moh [EMAIL PROTECTED]:

 Hi
 I have Video playing in the center of the stage and I'm using button to
 filp it
 function filp(event:MouseEvent):void {

  mySampleMC.scaleY *= -1;
 }

 mySampleMC.addEventListener(MouseEvent.CLICK, flip);

 but the problem when I flip it change Y postion and go up ,
 I wnat to flip it and keep it in same postion
 Help please
 Thanks
 Bassam



 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Random Lines 3D
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders