I too agree that this is a very useful feature. To the original post - is
there any reason that you can't drop back to URLLoader. and when the png
comes in (you now have access to the width/height) set its dimensions and
invalidate the size of the container? The only reason that any clipping
container wouldn't work as expected. is if the children are sneaking through
the creation phase without a size. You could certainly use the 'phantom
child' to force clipping from the start - I would suggest trying an
alternate load strategy that allows you to keep children in line. 

 

Rick Winscot

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Doug McCune
Sent: Tuesday, April 15, 2008 1:48 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: What would cause a Canvas subclass to not clip
its content?

 

Being able to set clipContent to false is very useful. Even if there was an
additional flag to force clipping at all times, I would also want to ability
to turn off clipping at all times (which is what clipContent="false" already
does).

Doug

On Tue, Apr 15, 2008 at 10:43 AM, esaltelli <[EMAIL PROTECTED]> wrote:

Let's make sure that the clipContent property is deprecated when that 
enhancement is added ;)



--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ,
"Doug McCune" <[EMAIL PROTECTED]> wrote:
>
> But then what would I do with these arcane bits of framework 
knowledge
> I have stored up? My life would lack meaning.
> 
> But yeah, I'd vote for that enhancement request. Something like a
> forceClipping boolean on all containers that support content 
clipping?
> 
> Doug
> 
> On Mon, Apr 14, 2008 at 9:59 AM, Ben Clinkinbeard

> <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> >
> > Does anyone besides me think it would be nice to be able to force 
content
> > clipping for scenarios like this? Dealing with an extra child can 
be a bit
> > of a pain sometimes, like in my current component. If anyone else 
thinks its
> > worthy I will file an enhancement request.
> >
> > Ben
> >
> >
> >
> > On Mon, Apr 14, 2008 at 12:36 PM, Ben Clinkinbeard

> > <[EMAIL PROTECTED]> wrote:
> > > Holy hell Batman, that worked like a charm. Thanks!
> > >
> > >
> > >
> > >
> > >
> > >

> > > On Mon, Apr 14, 2008 at 12:29 PM, Doug McCune <[EMAIL PROTECTED]> wrote:
> > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Every once in a while I'll drop a dummy UIComponent child 
into a
> > > > canvas and set it to have an x position of -1. That will 
force the
> > > > canvas to clip it's children. A canvas only applies the 
clipping mask
> > > > if it checks its children and thinks that one of them extends 
beyond
> > > > the bounds. If you have a dummy UIComponent with x at -1 then 
it will
> > > > always force clipping.
> > > >
> > > > Doug
> > > >
> > > >
> > > > On Mon, Apr 14, 2008 at 6:14 AM, ben.clinkinbeard

> > > > <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > I have a Canvas subclass that creates a number of SWFLoader 
children.
> > > > > The SWFLoaders each dynamically load a PNG. When the PNG 
finishes
> > > > > loading it is positioned via swfLoader.content.x = 
someNumber. The
> > > > > problem is that when these PNGs hang over any edge of the 
Canvas
> > > > > subclass they are not clipped. At first I thought maybe 
dynamic
> > > > > content was the issue but I created a test case and 
dynamically loaded
> > > > > and positioned PNGs were correctly clipped.
> > > > >
> > > > > Any ideas what the problem could be?
> > > > >
> > > > > Thanks,
> > > > > Ben
> > > > >
> > > > >
> > > >
> > >
> > >
> >
> >
>

 

 

<<image001.jpg>>

<<image002.jpg>>

Reply via email to