[Flashcoders] Tween a matrix transformation

2009-05-01 Thread Mendelsohn, Michael
Hi list...

I'm trying to think of the best way to tween a sprite that's been transformed, 
with all 6 props of its matrix property having been altered.  I use TweenLite a 
lot...should I write 6 lines of code, one for each matrix property? 

Any suggestions for the most optimal way to tween a matrix transform?

Thanks,
- Michael M.

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


Re: [Flashcoders] Tween a matrix transformation

2009-05-01 Thread Hans Wichman
Hi,

there is probably a better way, but one solution is to do: x* state1Matrix +
(x-1)*state2Matrix and tween x over 0..1

greetz
JC

On Fri, May 1, 2009 at 4:31 PM, Mendelsohn, Michael 
michael.mendels...@fmglobal.com wrote:

 Hi list...

 I'm trying to think of the best way to tween a sprite that's been
 transformed, with all 6 props of its matrix property having been altered.  I
 use TweenLite a lot...should I write 6 lines of code, one for each matrix
 property?

 Any suggestions for the most optimal way to tween a matrix transform?

 Thanks,
 - Michael M.

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

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


RE: [Flashcoders] Tween a matrix transformation

2009-05-01 Thread Jack Doyle
You could do this:

var matrix:Matrix = mc.transform.matrix;

TweenLite.to(matrix, 1, {a:1.5, b:0.2, c:0.2, d:1.5, tx:100, ty:100,
onUpdate:applyMatrix, onUpdateParams:[mc, matrix]});

function applyMatrix($mc:DisplayObject, $matrix:Matrix):void {
$mc.transform.matrix = $matrix; //for changes in the matrix to take
effect, it must be re-applied.
}

Jack

-Original Message-
From: Mendelsohn, Michael [mailto:michael.mendels...@fmglobal.com] 
Sent: Friday, May 01, 2009 9:31 AM
To: Flash Coders List
Subject: [Flashcoders] Tween a matrix transformation

Hi list...

I'm trying to think of the best way to tween a sprite that's been
transformed, with all 6 props of its matrix property having been altered.  I
use TweenLite a lot...should I write 6 lines of code, one for each matrix
property? 

Any suggestions for the most optimal way to tween a matrix transform?

Thanks,
- Michael M.




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


Re: [Flashcoders] Tween a matrix transformation

2009-05-01 Thread Joel Stransky

As with everything else you beat me to it Jack. Congrats on v11!

--Joel

On May 1, 2009, at 10:04 AM, Jack Doyle j...@greensock.com wrote:


You could do this:

var matrix:Matrix = mc.transform.matrix;

TweenLite.to(matrix, 1, {a:1.5, b:0.2, c:0.2, d:1.5, tx:100, ty:100,
onUpdate:applyMatrix, onUpdateParams:[mc, matrix]});

function applyMatrix($mc:DisplayObject, $matrix:Matrix):void {
   $mc.transform.matrix = $matrix; //for changes in the matrix to take
effect, it must be re-applied.
}

Jack

-Original Message-
From: Mendelsohn, Michael [mailto:michael.mendels...@fmglobal.com]
Sent: Friday, May 01, 2009 9:31 AM
To: Flash Coders List
Subject: [Flashcoders] Tween a matrix transformation

Hi list...

I'm trying to think of the best way to tween a sprite that's been
transformed, with all 6 props of its matrix property having been  
altered.  I
use TweenLite a lot...should I write 6 lines of code, one for each  
matrix

property?

Any suggestions for the most optimal way to tween a matrix transform?

Thanks,
- Michael M.




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

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


RE: [Flashcoders] Tween a matrix transformation

2009-05-01 Thread Mendelsohn, Michael
Wow, straight from the source!
Cheers Jack!

- MM


 You could do this:

 var matrix:Matrix = mc.transform.matrix;

 TweenLite.to(matrix, 1, {a:1.5, b:0.2, c:0.2, d:1.5, tx:100, ty:100,
 onUpdate:applyMatrix, onUpdateParams:[mc, matrix]});

 function applyMatrix($mc:DisplayObject, $matrix:Matrix):void {
$mc.transform.matrix = $matrix; //for changes in the matrix to take
 effect, it must be re-applied.
 }

 Jack


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


Re: [Flashcoders] Tween a Matrix

2007-01-10 Thread William Smith

You could create a custom function and then pass it to the transition
manager.

On 1/10/07, Hans Wichman [EMAIL PROTECTED] wrote:


Hi,
i think something a*Matrix1+(1-a)*Matrix2 with a sliding scale for a of 1
to
0 would do the trick.
Not sure though^^. I used something like that to tween falling snow into
text and back into snow again.

greetz
JC




On 1/10/07, Patrick Matte | BLITZ [EMAIL PROTECTED] wrote:

 Hi, is it possible to mx.transition.Tween a Matrix to another Matrix ?



 

 Patrick Matte
 Senior Flash Technical Lead
 Ph: 310-551-0200 x214
 Fax: 310-551-0022
 [EMAIL PROTECTED]

 BLITZ - 3415 South Sepulveda Boulevard, Suite 500 - Los Angeles, CA
 90034 - www.blitzagency.com http://www.blitzagency.com/



 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Tween a Matrix

2007-01-09 Thread Patrick Matte | BLITZ
Hi, is it possible to mx.transition.Tween a Matrix to another Matrix ?

 



Patrick Matte
Senior Flash Technical Lead
Ph: 310-551-0200 x214
Fax: 310-551-0022
[EMAIL PROTECTED] 

BLITZ - 3415 South Sepulveda Boulevard, Suite 500 - Los Angeles, CA
90034 - www.blitzagency.com http://www.blitzagency.com/  

 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Tween a Matrix

2007-01-09 Thread Hans Wichman

Hi,
i think something a*Matrix1+(1-a)*Matrix2 with a sliding scale for a of 1 to
0 would do the trick.
Not sure though^^. I used something like that to tween falling snow into
text and back into snow again.

greetz
JC




On 1/10/07, Patrick Matte | BLITZ [EMAIL PROTECTED] wrote:


Hi, is it possible to mx.transition.Tween a Matrix to another Matrix ?





Patrick Matte
Senior Flash Technical Lead
Ph: 310-551-0200 x214
Fax: 310-551-0022
[EMAIL PROTECTED]

BLITZ - 3415 South Sepulveda Boulevard, Suite 500 - Los Angeles, CA
90034 - www.blitzagency.com http://www.blitzagency.com/



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com