Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
riavietnam

TransformManager 9-slice scaling

Recommended Posts

Hi,

 

I have develop the picture frame and use TransformManager for the Scale. Could we use the approach 9-slice scaling with this TransformManager.

 

Thanks.

Link to comment
Share on other sites

TransformManager doesn't really concern itself with 9-slice scaling - it simply works on any DisplayObject and alters its transform.matrix values which is a pretty basic/fundamental thing in Flash. As far as I know, it doesn't interfere with 9-slice scaling but please let me know if you run into trouble.

Link to comment
Share on other sites

Hi,

 

My picture frame (holder: sprite) has two sprite child (one is the frame border outside, and the other is the content inside).

1. We can not use the scale9Grid property

Ex:

var slice9rect:Rectangle = new Rectangle(38, 38, 38, 38);

holder.scale9Grid = slice9rect;

 

item:TransformItem = manager.addItem( holder );

 

2. I have developed a successful 9-slice scaling sprite like below example:

http://uwantweb.com/projects/FlashFrame ... /Main.html

 

But when adding to the TransformItem, The transform is working as normal without the 9-slice scaling.

 

I do not know why :-(

Link to comment
Share on other sites

Right, the scale9Grid doesn't work on children (that's a Flash thing and has nothing to do with TransformManager). So if you apply a scale9Grid to an object and add that object to TransformManager, it should work okay (as far as I know) but if you apply a scale9Grid to an object and then put that INTO another Sprite/DisplayObjectContainer and that that container to TransformManager, the scale9Grid won't be effective. Again, that's unrelated to TransformManager.

Link to comment
Share on other sites

Hi,

 

I understood your explanation before. However, when I directly add the Displayobject (that is scaled nicely itself, no child related) to the TransformManager, it still not working with the 9-slice scaling. That is the problem.

Link to comment
Share on other sites

Hmm...I'm curious to see that. I just tried it myself yesterday and it worked fine for me with a slice9Grid although I must admit that TransformManager wasn't designed to work with scale9Grid. Can you send me a very simple FLA that demonstrates the issue so that I can publish it on my end and analyze things?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×