Search This Blog

Showing posts with label css. Show all posts
Showing posts with label css. Show all posts

Tuesday, April 17, 2007

Gradient Background for Box via CSS

.gradientStyle {
borderStyle: applicationControlBar;
fillColors: #FF0000, #0000FF;
fillAlphas: 1, 1;
highlightAlphas: 0, 0;
}

Tuesday, April 10, 2007

Flex Preloader

package myComponents
{
import mx.preloaders.*;
import flash.events.ProgressEvent;

public class DownloadProgressBarSubClassMin extends DownloadProgressBar
{
public function DownloadProgressBarSubClassMin()
{
super();
// Set the download label.
downloadingLabel="Downloading app..."
// Set the initialization label.
initializingLabel="Initializing app..."
// Set the minimum display time to 2 seconds.
MINIMUM_DISPLAY_TIME=2000;
}

// Override to return true so progress bar appears
// during initialization.
override protected function showDisplayForInit(elapsedTime:int,
count:int):Boolean {
return true;
}

// Override to return true so progress bar appears during download.
override protected function showDisplayForDownloading(
elapsedTime:int, event:ProgressEvent):Boolean {
return true;
}
}

}

You can use your custom class in a Flex application, as the following example shows:


mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
preloader="myComponents.DownloadProgressBarSubClassMin">

mx:Application>

CSS Style Example for Preloader:

ProgressBar {
borderColor: #cc0066;
barColor: #000000;
trackColors: #009999, #99ffcc;
color: #000000;
paddingLeft: 7;
paddingRight: 11;
textIndent: 14;
trackHeight: 21;
verticalGap: 20;
}