Thanks for the clarification!
Yes, the double hit on file size makes sense, that is why I am trying to get the css file approach correct. I am having some issues with it and assets.
One other thing.
You have the defaults, how do I create something similar and 'compile it in' when I make the SWC file.
I have had no luck with the library project doing this. Embeded assets inside the css file were not getting included. In a linked directory the css file in the library project wasn't even getting recognized and compiled into the SWC.
Any thoughts?
Is there any one that could give a 'quick and dirty' procedural step process for the benefit of this list?
Peace, Mike
This approach is fine, and it's what the mx.charts classes do.
But for the standard Flex components, we decided to use the defaults.css approach instead. That makes it possible to restyle them easily by editing a single CSS file. Also, if they get styled in this way via autogenerated code, there is no need to have the superceded class-initialization-code-that-sets-up-styles, which adds to SWF size.
- Gordon
From: [email protected] [mailto:flexcompone[EMAIL PROTECTED]] On Behalf Of Michael Schmalle
Sent: Tuesday, August 08, 2006 1:22 PM
To: [email protected]
Subject: [flexcomponents] Styles :: Revisted once again
Hi, knock knock, echo, echo
Can any Adobe peoplz tell me why
putting a variation of the following in a component class to initializes styles is bad?
// SizerOverlay
style = StyleManager.getStyleDeclaration ("SizerOverlay");
if (!style)
{
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("SizerOverlay", style, false);
}
if ( style.factory == null)
{
style.factory = function():void
{
this.cornerRadius = 5;
this.fillAlpha = 1;
this.fillColor = 0xffcc00;
this.horizontalCursorXOffset = -9;
this.horizontalCursorYOffset = -5;
this.leftDiagonalCursorXOffset = -9;
this.leftDiagonalCursorYOffset = -8;
this.realtimeResize = true;
this.realtimeResizeAlpha = 0;
this.rightDiagonalCursorXOffset = -9;
this.rightDiagonalCursorYOffset = -5;
this.sizerAlpha = 1;
this.sizerClientButtonRenderer = com.teotiGraphix.managers.sizerManagerClasses.SizerOverlayButton;
this.sizerOverlayAlpha = 0;
this.sizerOverlayOffset = true;
this.sizerOverlaySkin = mx.skins.halo.ButtonSkin;
this.sizerOverlayThickness = 10;
this.verticalCursorXOffset = -9;
this.verticalCursorYOffset = -9;
};
}
Since this is what the compiler actually does anyway.
Specifically,
// SizerOverlay
style = StyleManager.getStyleDeclaration("SizerOverlay");
if (!style)
{
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("SizerOverlay", style, false);
}
I am not really agreeing with littering my classes with if() checks everywhere for default styles.
Maybe something is not thought through all the way. If I am wrong, can someone from Adobe please clarify the exact procedure for initializing default styles and skins for a commercially distributed component?
Peace, Mike
--
What goes up, does come down.
--
What goes up, does come down. __._,_.___![]()
SPONSORED LINKS
Custom software development Database development software Embedded software development Offshore software development Software development
YAHOO! GROUPS LINKS
- Visit your group "flexcomponents" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- [flexcomponents] Styles :: Revisted once again Michael Schmalle
- RE: [flexcomponents] Styles :: Revisted once again Gordon Smith
- Re: [flexcomponents] Styles :: Revisted once aga... Michael Schmalle
- RE: [flexcomponents] Styles :: Revisted once... Gordon Smith
- RE: [flexcomponents] Styles :: Revisted ... Glenn Ruehle
- [flexcomponents] Re: Styles :: Revi... Renaun Erickson
- RE: [flexcomponents] Re: Styles... Glenn Ruehle
- [flexcomponents] Re: Styles... Renaun Erickson
- RE: [flexcomponents] Re: St... Glenn Ruehle
- Re: [flexcomponents] Re: St... Michael Schmalle
- Re: [flexcomponents] Re: St... Michael Schmalle
- [flexcomponents] Re: Styles... Renaun Erickson
- Re: [flexcomponents] Re: St... Michael Schmalle
Reply via email to
