Main Page | Packages | Class Tree | Index | Help

com.bjc.resizers

class VResizer

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


class VResizer
extends BJCComponent

Enables smooth vertical resizing of a predefined graphic element, keeping the top and bottom 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("VResizer", "navMenu", 0);
navMenu.skin = "navMenuSkin";
navMenu.topMargin = 20;
navMenu.bottomMargin = 20;
navMenu.height = 500;


Fields inherited from class com.bjc.core.BJCComponent

version

Property Summary

public
bottomMargin: Number (write)
Sets how much of the bottom of the graphic will not be stretched. Default value is 20 pixels.

public
bottomMargin: Number (read)
Gets how much of the bottom of the graphic will not be stretched.

public
margin: Number (write)
Sets the topMargin and bottomMargin to the same value.

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

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.

public
topMargin: Number (write)
Sets how much of the top of the graphic will not be stretched. Default value is 20 pixels.

public
topMargin: Number (read)
Gets how much of the top of the graphic will not be stretched.

Properties inherited from class com.bjc.core.BJCComponent

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

Constructor

public
VResizer ( Void)


Method Summary

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

Methods inherited from class com.bjc.core.BJCComponent

draw, invalidate, move, remove, setSize



Property Documentation

bottomMargin

public bottomMargin: Number (write)
Sets how much of the bottom of the graphic will not be stretched. Default value is 20 pixels.

Example:
attachMovie("VResizer", "navMenu", 0);
navMenu.skin = "navMenuSkin";
navMenu.topMargin = 20;
navMenu.bottomMargin = 20;
navMenu.height = 500;

bottomMargin

public bottomMargin: Number (read)
Gets how much of the bottom of the graphic will not be stretched.

Example:
myVar = navMenu.bottomMargin;

margin

public margin: Number (write)
Sets the topMargin and bottomMargin to the same value.

Example:
attachMovie("VResizer", "navMenu", 0);
navMenu.skin = "navMenuSkin";
navMenu.margin = 20;
navMenu.height = 500;

margin

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

Example:
myVar = navMenu.margin;

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("VResizer", "navMenu", 0);
navMenu.skin = "navMenuSkin";
// "navMenuSkin" is the linkage name of a movie clip in the library, containing the stretchable graphic.
navMenu.topMargin = 20;
navMenu.bottomMargin = 20;
navMenu.height = 500;

skin

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

Example:
myVar = navMenu.skin;

topMargin

public topMargin: Number (write)
Sets how much of the top of the graphic will not be stretched. Default value is 20 pixels.

Example:
attachMovie("VResizer", "navMenu", 0);
navMenu.skin = "navMenuSkin";
navMenu.topMargin = 20;
navMenu.bottomMargin = 20;
navMenu.height = 500;

topMargin

public topMargin: Number (read)
Gets how much of the top of the graphic will not be stretched.

Example:
myVar = navMenu.topMargin;


Constructor Documentation

VResizer

public function VResizer(Void)

Method Documentation

create

public static function create(target: MovieClip,
 id: String,
 depth: Number,
 initObj: Object): VResizer
Static method used to create an instance of a VResizer 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.VResizer;
var newVResizer:VResizer = VResizer.create(_root, "myVResizer", 0);


The documentation was generated from the following file:


Copyright Flashloaded - www.flashloaded.com