Yup, same here.  Perhaps someone else on the list will try the code.

package {
    import flash.display.Graphics;
    import mx.graphics.RectangularDropShadow;
    import mx.skins.RectangularBorder;
    public class CustomBorder extends RectangularBorder {

        private var dropShadow:RectangularDropShadow;

        public function CustomBorder() {
        }

        override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
        {
            super.updateDisplayList(unscaledWidth, unscaledHeight);
            var cornerRadius:Number = getStyle("cornerRadius");
            var backgroundColor:int = getStyle("backgroundColor");
            var backgroundAlpha:Number = getStyle("backgroundAlpha");
            graphics.clear();
            // Background
            drawRoundRect(0, 0, unscaledWidth, unscaledHeight, {tl: 0, tr:cornerRadius, bl: cornerRadius, br: 0}, backgroundColor, backgroundAlpha);
            // Shadow
            if (!dropShadow)
                dropShadow = new RectangularDropShadow();
            dropShadow.distance = 8;
            dropShadow.angle = 45;
            dropShadow.color = 0;
            dropShadow.alpha = 0.4;
            dropShadow.tlRadius = 0;
            dropShadow.trRadius = cornerRadius;
            dropShadow.blRadius = cornerRadius;
            dropShadow.brRadius = 0;
            dropShadow.drawShadow(graphics, 0, 0, unscaledWidth,unscaledHeight);
        }
    }
}

 

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
    <mx:Script>
        <![CDATA[
       
       import CustomBorder;
       import mx.controls.Alert;

        ]]>
    </mx:Script>
<mx:VBox borderSkin="CustomBorder"
 backgroundColor="0xCCCC99"   
 backgroundAlpha="0.8"
 cornerRadius="14"
 paddingLeft="20"
 paddingTop="20"
 paddingRight="20"
 paddingBottom="20">
 
    <mx:Label text="Text Goes Here"/>
    <mx:LinkButton label="LinkButton" click="Alert.show('hello');"/>
   
</mx:VBox>


 
</mx:Application>

--- In [email protected], "Chris Simeone" <[EMAIL PROTECTED]> wrote:
>
>
> I'm using Flash Player version 9.0.16.0
>
> --- In [email protected], "bill_sahlas" bsahlas@ wrote:
> >
> >
> > I've tried reproducing it using the link to the doc example
> >
> <http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html
> /w\
> > whelp.htm?context=LiveDocs_Parts&file=00000816.html> and cannot
> confirm
> > the bug/errors that you reported here. It works as I'd expect. What
> > flash player version are you on?
> >
> >
> > --- In [email protected], "Chris Simeone" <simspace@>
> wrote:
> > >
> > > Hi All,
> > >
> > > I believe I found a Programmatic Skinning bug in Flex.
> > >
> > > Whenever I set the "borderSkin" property to a custom skin class,
> the
> > > flash player hangs in all browsers, the CPU peaks around 95% and
> > memory
> > > is consumed rapidly.
> > >
> > > After waiting for about 10 minutes I get the following...
> > >
> > > [SWF] C:\Documents and Settings\Chris.Simeone\My Documents\Flex
> > > Builder 2\Skinning-Lessons\bin\gridBorders-debug.swf - 408,071
> bytes
> > > after decompression
> > > undefined
> > > at
> > >
> > mx.core::UIComponent/getClassStyleDeclarations()
> [C:\dev\GMC\sdk\framewor\
> > \
> > > ks\mx\core\UIComponent.as:6810]
> > > at
> > >
> > mx.styles::StyleProtoChain$/mx.styles:StyleProtoChain::addProperties
> ()[C\
> > \
> > > :\dev\GMC\sdk\frameworks\mx\styles\StyleProtoChain.as:142]
> > > at
> > >
> > mx.styles::StyleProtoChain$/mx.styles:StyleProtoChain::addProperties
> ()[C\
> > \
> > > :\dev\GMC\sdk\frameworks\mx\styles\StyleProtoChain.as:173]
> > >
> > > (FYI: The previous error line is repeated 191 times)
> > >
> > > I tried tracing my custom skin class (by setting breakpoints) but
> none
> > > of the code ever fires - the debugger never goes into the code.
> > >
> > > When I remove this line from my CSS file -
> > > borderSkin:ClassReference('GridBorders'); - the application runs
> fine.
> > >
> > > To test this further, I grabbed the example on the bottom of this
> page
> > > <http://livedocs.macromedia.com/flex/2/docs/00000816.html> where
> the
> > > "borderSkin" property is set on the VBox tag. The same exact error
> > > occurs.
> > >
> > > I tested other programmatic skinning examples that use upSkin,
> > downSkin,
> > > etc and they all work fine. I only have this problem when
> assigning a
> > > skin class to the "borderSkin" property.
> > >
> > > Would someone please confirm this is bug? I followed the
> programmatic
> > > skins recipe to the letter.
> > >
> > > Thanks
> > > Chris Simeone
> > >
> >
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to