Main Page | Packages | Class Tree | Index | Help

com.bjc.resizers

class HResizer

MovieClip
  |
  +--com.bjc.core.BJCComponent
        |
        +--com.bjc.resizers.HResizer


class HResizer
extends BJCComponent

Enables smooth horizontal resizing of a predefined graphic element, keeping the left and right margins the same and stretching the middle. This is useful when you have a shape with curved or irregularly shaped edges, and you don't want the curves to stretch out.


Author:
Flashloaded - www.flashloaded.com

Example:
attachMovie("HResizer", "toolBar", 0);
toolBar.skin = "myToolBarSkin";
toolBar.leftMargin = 20;
toolBar.rightMargin = 20;
toolBar.width = 500;


Fields inherited from class com.bjc.core.BJCComponent

version

Property Summary

public
leftMargin: Number (write)
Sets how much of the left hand side of the graphic will not be stretched. Default value is 20 pixels.

public
leftMargin: Number (read)
Gets how much of the left hand side of the graphic will not be stretched.

public
margin: Number (write)
Sets the leftMargin and rightMargin to the same value.

public
margin: Number (read)
If leftMargin and rightMargin are equal, returns their value, otherwise returns undefined.

public
rightMargin: Number (write)
Sets how much of the right hand side of the graphic will not be stretched. Default value is 20 pixels.

public
rightMargin: Number (read)
Gets how much of the right hand side of the graphic will not be stretched.

public
skin: String (write)
Sets the skin to be used in the resizer. This is a string set to the linkage name of a movie clip containing a graphic. The movie clip must be set to export.

public
skin: String (read)
Gets the skin used in the resizer.

Properties inherited from class com.bjc.core.BJCComponent

disabledAlpha, enabled, focusTime, height, keyEnabled, style, width

Constructor

public
HResizer ( Void)


Method Summary

public static
create ( target: MovieClip, id: String, depth: Number, initObj: Object ): HResizer
Static method used to create an instance of a HResizer on stage at run time.

Methods inherited from class com.bjc.core.BJCComponent

draw, invalidate, move, remove, setSize



Property Documentation

leftMargin

public leftMargin: Number (write)
Sets how much of the left hand side of the graphic will not be stretched. Default value is 20 pixels.

Example:
attachMovie("HResizer", "toolBar", 0);
toolBar.skin = "myToolBarSkin";
toolBar.leftMargin = 20;
toolBar.rightMargin = 20;
toolBar.width = 500;

leftMargin

public leftMargin: Number (read)
Gets how much of the left hand side of the graphic will not be stretched.

Example:
myVar = toolBar.leftMargin;

margin

public margin: Number (write)
Sets the leftMargin and rightMargin to the same value.

Example:
attachMovie("HResizer", "toolBar", 0);
toolBar.skin = "myToolBarSkin";
toolBar.margin = 20;
toolBar.width = 500;

margin

public margin: Number (read)
If leftMargin and rightMargin are equal, returns their value, otherwise returns undefined.

Example:
myaVar = toolBar.margin;

rightMargin

public rightMargin: Number (write)
Sets how much of the right hand side of the graphic will not be stretched. Default value is 20 pixels.

Example:
attachMovie("HResizer", "toolBar", 0);
toolBar.skin = "myToolBarSkin";
toolBar.leftMargin = 20;
toolBar.rightMargin = 20;
toolBar.width = 500;

rightMargin

public rightMargin: Number (read)
Gets how much of the right hand side of the graphic will not be stretched.

Example:
myVar = toolBar.rightMargin;

skin

public skin: String (write)
Sets the skin to be used in the resizer. This is a string set to the linkage name of a movie clip containing a graphic. The movie clip must be set to export.

Example:
attachMovie("HResizer", "toolBar", 0);
toolBar.skin = "myToolBarSkin";
// "toolBarSkin" is the linkage name of a movie clip in the library, containing the stretchable graphic.
toolBar.margin = 20;
toolBar.width = 500;

skin

public skin: String (read)
Gets the skin used in the resizer.

Example:
myVar = toolBar.skin;


Constructor Documentation

HResizer

public function HResizer(Void)

Method Documentation

create

public static function create(target: MovieClip,
 id: String,
 depth: Number,
 initObj: Object): HResizer
Static method used to create an instance of a HResizer on stage at run time.

Parameters:
target
the movie clip to which the resizer will be attached.
id
the instance name given to the new resizer attached.
depth
the depth at which to attach the new resizer.
initObj
(optional) an object containing any properties you want to assign to the component when it is created
Returns:
a reference to the new resizer attached.

Example:
import com.bjc.controls.HResizer;
var newHResizer:HResizer = HResizer.create(_root, "myHResizer", 0);


The documentation was generated from the following file:


Copyright Flashloaded - www.flashloaded.com