[flexcoders] Best practices for dynamically styling components in FlashBuilder 4.5

2011-09-13 Thread c0mpl3xxx
Hi all,
I'm trying to create a set of components for a video player app that require 
the ability to be styled via user supplied color options. Basically I have a 
set of buttons and text objects that will receive custom color properties from 
the user. This would be easy enough to accomplish using custom style properties 
on the components and a little CSS; however, I can't figure out how to make 
this work since the color data is dynamic and served up by the server (i.e. I 
can't hard-code or create any css style sheets during the build process).

I am looking for any ideas / best practices on how to accomplish the following:

1) Styling components using data supplied at run-time
2) Updating specific stylesheet properties at run-time (i.e. I want to change 
the fontSize value for a custom style called .h1).

Ideally I'd be able to link the various components to some stored properties 
(like css) and then just update those properties and have the components 
automatically respond. Any suggestions would be greatly appreciated!

Thanks!




[flexcoders] Re: Best practices for dynamically styling components in FlashBuilder 4.5

2011-09-13 Thread c0mpl3xxx
Thanks TH, That will help with updating the font sizes!

If anyone else has any other thoughts or suggestions on how to best manage 
updating the color styles of the buttons and other components, it would be 
greatly appreciated! 



[flexcoders] Re: Best practices for dynamically styling components in FlashBuilder 4.5

2011-09-13 Thread c0mpl3xxx

Note: As a potential solution, I have been trying to add some custom style 
properties to my various components (ie. fillColor, fillAlpha, etc.), then 
setting these properties via CSS. The thought was that I could then simply 
update those properties using the styleManager.getStyleDeclaration() method, 
and in my components, set the colors using getStyle(). The issue is that the 
compiler throws errors when I try to implement the custom styles in my 
stylesheet using a custom style. 

Example:

.myStyle {
 fillColor: 0x00;
 fillAlpha: .5;
}

The previous code would throw an error that the compiler did not recognize the 
style properties for fillColor or fillAlpha. If I can figure out a way to get 
past this, then I might have a solution... 


Thanks again!!


--- In flexcoders@yahoogroups.com, c0mpl3xxx ktyacke@... wrote:

 Hi all,
 I'm trying to create a set of components for a video player app that require 
 the ability to be styled via user supplied color options. Basically I have a 
 set of buttons and text objects that will receive custom color properties 
 from the user. This would be easy enough to accomplish using custom style 
 properties on the components and a little CSS; however, I can't figure out 
 how to make this work since the color data is dynamic and served up by the 
 server (i.e. I can't hard-code or create any css style sheets during the 
 build process).
 
 I am looking for any ideas / best practices on how to accomplish the 
 following:
 
 1) Styling components using data supplied at run-time
 2) Updating specific stylesheet properties at run-time (i.e. I want to change 
 the fontSize value for a custom style called .h1).
 
 Ideally I'd be able to link the various components to some stored properties 
 (like css) and then just update those properties and have the components 
 automatically respond. Any suggestions would be greatly appreciated!
 
 Thanks!





[flexcoders] Re: Best practices for dynamically styling components in FlashBuilder 4.5

2011-09-13 Thread c0mpl3xxx
So as it turns out, the reason that I was getting errors on my custom styles 
was that I was trying to use a pre-existing stylename (fillColor was already 
taken). It seems to be working somewhat well now and I might have my solution; 
however, I'd really like to hear any suggestions anyone still may have! =]




[flexcoders] Re: DateTimeAxis not displaying all values in collection

2009-10-21 Thread c0mpl3xxx
I've created an example that illustrates the issue described below:
http://kyletyacke.com/clients/coremd/datetimeaxis/

If you click on the displayLocalTime checkbox, you can see that setting this 
value to true causes all days in the month to be displayed; however, it breaks 
the alignment of the data points to their corresponding labels. If you set this 
value to false (uncheck the box), it does not display the 31st; however, the 
data points line up nicely..

Setting this value to true forces the datetimeaxis to use local time, if it is 
set to false, it references the UTC time values stored in the date objects 
passed in via the minimum at maximum properties. If anyone has any ideas it 
would be greatly appreciated!



--- In flexcoders@yahoogroups.com, c0mpl3xxx ktya...@... wrote:

 
 I'm having an issue when trying to use the DateTimeAxis to map a set of 
 values to a ColumnChart. The dataProvider for my chart includes a months 
 worth data (currently 31 days). I setup my DateTimeAxis with a minimum date 
 for the 1st of the month, and a maximum date for the 31st of the month. I 
 have setup a parseFunction to ensure that all my dates times are zeroed out 
 (i.e. initializing each date with zero prior to assigning the date values). I 
 had to do this to get the chart elements to line up properly. 
 
 The issue now seems to be with the displayLocalTime property. When I set this 
 property to false, all the chart elements line up nicely (i.e. they align to 
 the tick marks and space out evenly); however, the last date in the data set 
 (the 31st) does not show up in the chart. If I set the property to true, all 
 of the dates show up; however, the alignment of the data points does not 
 match up with the tick marks and looks sloppy.
 
 The only hack that I've seemed to get to work thus far is to set the maximum 
 date to be one day past the date that I want to be my actual maximum (in this 
 case that would be the 1st of the next month).
 
 Has anyone else run into this?
 
 Thanks!
 
 -Kyle





[flexcoders] DateTimeAxis not displaying all values in collection

2009-10-20 Thread c0mpl3xxx

I'm having an issue when trying to use the DateTimeAxis to map a set of values 
to a ColumnChart. The dataProvider for my chart includes a months worth data 
(currently 31 days). I setup my DateTimeAxis with a minimum date for the 1st of 
the month, and a maximum date for the 31st of the month. I have setup a 
parseFunction to ensure that all my dates times are zeroed out (i.e. 
initializing each date with zero prior to assigning the date values). I had to 
do this to get the chart elements to line up properly. 

The issue now seems to be with the displayLocalTime property. When I set this 
property to false, all the chart elements line up nicely (i.e. they align to 
the tick marks and space out evenly); however, the last date in the data set 
(the 31st) does not show up in the chart. If I set the property to true, all of 
the dates show up; however, the alignment of the data points does not match up 
with the tick marks and looks sloppy.

The only hack that I've seemed to get to work thus far is to set the maximum 
date to be one day past the date that I want to be my actual maximum (in this 
case that would be the 1st of the next month).

Has anyone else run into this?

Thanks!

-Kyle