[Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread eric e. dolecki
I am looking to take a DO (movieclip), and stretch just the side edges, leaving the middle unstretched... so take an image, cut in 4 vertical pieces, and stretch the outside pieces out horizontally by like 15%. I could use DisplayObjects above the main one and just stretch those horizontally, but

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread Rich Shupe
Eric, if you're saying you want to manipulate the first and last 15% of a display object without creating anything else, I don't think that's possible. The closest I can think of that will accomplish that is using a displacement map filter in conjunction with resizing. That might get you what you

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread eric e. dolecki
While I don't seem to be able to do this easily, I am applying scale9grid to sorta do what I want. I was hoping for incremental stretching on the sides... maybe that is something I'll be able to do using a hydra filter or something in FP10. On Tue, May 20, 2008 at 12:47 PM, Rich Shupe [EMAIL

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread Steven Sacks
Maybe this will work? Make two copies of the original MovieClip (if you're loading an image, load it once into the first clip, then when it's done loading, load it into the two others) for a total of three. Mask the left and right pieces to the width you want to show. Mask the middle

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread eric e. dolecki
That was going to be an approach... and I would apply the stretch to the sides loaded in on top by hand in Photoshop (cementing the effect -- bad voodoo there). Then I thought it might be cool to do it using the BitmapData class somehow instead so I didn't need to worry about any cleanup, etc. as

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread Rich Shupe
You can almost certainly write a Hydra filter for this. You can do it AS-native with BitmapData. 9-slice scaling can't do what you're hoping for, as I understand it. It will only scale the top and bottom centers when scaling left and right, the left and right centers when scaling up and down, the

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread eric e. dolecki
crud. anyone remember how to load a filter? ;) On Tue, May 20, 2008 at 2:27 PM, Rich Shupe [EMAIL PROTECTED] wrote: You can almost certainly write a Hydra filter for this. You can do it AS-native with BitmapData. 9-slice scaling can't do what you're hoping for, as I understand it. It will

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread Rich Shupe
Eric, I know this isn't the root of what you were asking, but here's a class by Thibault Imbert that brings 9-slice scaling to bitmaps. Not on point, but related: http://www.bytearray.org/?p=118 And if anyone is interested, donate to his book. And if there are any fluent French speakers willing