Re: [Flashcoders] 2.5D playing cards - how to restore original image?

2009-10-21 Thread Ashim D'Silva
Hey Alex,

Once you've used a 3D feature, it has something like cacheAsBitmap
turned on internally that doesn't go off. You have to clear the 3d
matrix once you don't need it anymore.

mc.transform.matrix3D = null;

If I remember right, this will reset everything, so before you do it,
remember all the transformations you want to keep: x, y, rotation,
scaleX, scaleY... and then set those back.

Haven't dealt with this in a while, so I might be a bit off on it, but
I had to deal with it earlier, and this is approximately where you
should look.

Cheers,

Ashim

The Random Lines
My online portfolio
www.therandomlines.com



2009/10/21 Alexander Farber :
> Hello,
>
> I have a game with nice detailed playing cards (the only
> nice graphics in my app) which can be dragged around.
>
> On the MOUSE_DOWN event I add a shadow to filters
> and set scaleX = scaleY = 1.2. And on MOUSE_UP
> I remove shadow and set scaleX = scaleY = 1.
>
> Now I've decided to try the new 3D-features and
> instead of changing the scale I set card properties:
>   z = -100;
>   rotationY = 10;
> and on MOUSE_UP I set those back to zero.
>
> The dragged card looks geometrically correct, but
> not nice (it is distorted) - which is understandable...
>
> What annoys me is that when I release the mouse,
> the card looks even worse instead of going back to
> the original clean image.
>
> Does anybody please have an advice here?
>
> Thank you
> Alex
> ___
> 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


[Flashcoders] 2.5D playing cards - how to restore original image?

2009-10-21 Thread Alexander Farber
Hello,

I have a game with nice detailed playing cards (the only
nice graphics in my app) which can be dragged around.

On the MOUSE_DOWN event I add a shadow to filters
and set scaleX = scaleY = 1.2. And on MOUSE_UP
I remove shadow and set scaleX = scaleY = 1.

Now I've decided to try the new 3D-features and
instead of changing the scale I set card properties:
   z = -100;
   rotationY = 10;
and on MOUSE_UP I set those back to zero.

The dragged card looks geometrically correct, but
not nice (it is distorted) - which is understandable...

What annoys me is that when I release the mouse,
the card looks even worse instead of going back to
the original clean image.

Does anybody please have an advice here?

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