Hello,

Your aware that alpha values in AS3 are from 0 to 1 ?

When you say;

" Regardless of the value, it seems that if you set the alpha of a VBox, it applies it
to the skin anyway, whether you want to override the behavior or not."

When you set the alpha of any instance it effects the instance of itself and it's children which in this case would be the borderSkin instance.

I don't understand why you wouldn't be able to set the alpha of a DisplayObject which RectBorder is.

As far as using getStyle() with an actuall property, I think Adobe changed the implementation of getStyle() (Adobe can comment on this [ can you get non-defined style properties with getStyle() ?? ] ). I think it is more strict now.

:: this.alpha

It would return 1 if the skin is fully opaque. IE alpha = 100%

Anyway, I don't understand the problem really ;-) I know why I am writting this becasue I didn't relaize that the values of alpha had changed in as3.

Peace, Mike


On 3/5/06, Jono Spiro <[EMAIL PROTECTED]> wrote:
Preface: I'm extending a RectBorder and am trying to paramterize the
coloring, etc., and have one problem with two ways to go about it --
neither of which I can figure out. In one sense this is a more general
problem...

Problem: In a programmatic skin I'm writing, I cannot get access to
the 'alpha' value of an object, say a VBox where I set the borderSkin
to my subclass. I *can* get access to "backgroundColor" thought, for
instance.

Proposal 1) When I need the value: getStyle("alpha") -- this always
returns 0. Or just saying `this.alpha' always returns 1. Regardless of
the value, it seems that if you set the alpha of a VBox, it applies it
to the skin anyway, whether you want to override the behavior or not.
Ugh.

Proposal 2) More generally, what if I want to instantiate my skin
subclass with a constructor -- not just the default constructor, but
including values like alpha and keeping them privately? Skins must
provide default constructors, otherwise they don't compile -- is there
a way to provide constructor arguments to a skin, and then use it? I
tried instantiating a skin like this, and passing the instance to
borderSkin, but it didn't do anything. (dataBinding would be an ideal
solution, so the skin gets redrawn).

Cheers,
Jono :~)


--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to