MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 102

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

To create an ActionScript class to use as the skin and provide different states, the skin can read the
style property of the skin to determine the state. The following table shows the
borderStyle
border style that is set for each skin:
Property
falseUpSkin
falseDownSkin
falseOverSkin
falseDisabled
trueUpSkin
trueDownSkin
trueOverSkin
trueDisabledSkin
To create an ActionScript customized Accordion header skin:
Create a new ActionScript class file.
1.
For this example, name the file RedGreenBlueHeader.as.
Copy the following ActionScript to the file:
2.
import mx.skins.RectBorder;
import mx.core.ext.UIObjectExtensions;
class RedGreenBlueHeader extends RectBorder
{
static var symbolName:String = "RedGreenBlueHeader";
static var symbolOwner:Object = RedGreenBlueHeader;
function size():Void
{
var c:Number; // color
var borderStyle:String = getStyle("borderStyle");
switch (borderStyle) {
case "falseup":
case "falserollover":
case "falsedisabled":
c = 0x7777FF;
break;
case "falsedown":
c = 0x77FF77;
break;
case "trueup":
case "truedown":
case "truerollover":
case "truedisabled":
c = 0xFF7777;
break;
}
102
Chapter 6: Components Dictionary
Border style
falseup
falsedown
falserollover
falsedisabled
trueup
truedown
truerollover
truedisabled

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents