E-merald web-engineering Flash components
E-merald web-engineering Contact Site map
 
Home Components Support Purchase
Components

ActionScript Properties

InheritanceMovieClip > UIObject class > ThreeDimensionalChanger class

Setting a property of the ThreeDimensionalChanger class with ActionScript overrides the parameter of the same name set in the Property inspector or Component inspector.

Properties inherited from the UIObject class

The following table lists the properties the ThreeDimensionalChanger class inherits from the UIObject class.

Property Description
UIObject.height The height of the object, in pixels. Read-only. Enabled at runtime after publishing SWF file containing the component.
UIObject.left The left edge of the object, in pixels. Read-only.
UIObject.scaleX A number indicating the scaling factor in the x direction of the object, relative to its parent. Enabled at runtime after publishing SWF file containing the component.
UIObject.scaleY A number indicating the scaling factor in the y direction of the object, relative to its parent. Enabled at runtime after publishing SWF file containing the component.
UIObject.top The position of the top edge of the object, relative to its parent. Read-only.
UIObject.visible A Boolean value indicating whether the object is visible (true) or not (false).
UIObject.width The width of the object, in pixels. Read-only. Enabled at runtime after publishing SWF file containing the component.
UIObject.x The left edge of the object, in pixels. Read-only.
UIObject.y The top edge of the object, in pixels. Read-only.

Properties unique to the ThreeDimensionalChanger class

The following table lists properties of the ThreeDimensionalChanger class.

Property Description
ThreeDimensionalChanger.changeEffect Specifies the type of a 3D rotation effect that is used for changing an image.
ThreeDimensionalChanger.currentImage Read-only; returns the current image in the "Images Collection".
ThreeDimensionalChanger.delay A number that indicates (in seconds) how long each image "holds" before automatically displaying the next image in que.
ThreeDimensionalChanger.direction Specifies the direction of rotation while changing images.
ThreeDimensionalChanger.displayMode Controls the automatic playback of the "Images Collection".
ThreeDimensionalChanger.firstImage Read-only; returns the first image in the "Images Collection".
ThreeDimensionalChanger.granularity Defines the degree of detail and the rendering quality while rotating an image.
ThreeDimensionalChanger.keyboardControl Determines whether 3D Image Changer uses default keyboard handling to navigate through the images in collection when the component instance has focus.
ThreeDimensionalChanger.lastImage Read-only; returns the last image in the "Images Collection".
ThreeDimensionalChanger.length Read-only; the number of images in the "Images Collection".
ThreeDimensionalChanger.lockMode Determines whether 3D Image Changer is enabled or disabled to "store" user interactions.
ThreeDimensionalChanger.nextImage Read-only; returns the next image in the "Images Collection".
ThreeDimensionalChanger.preloaderAlpha A number that indicates the transparency percentage for the preloader animation.
ThreeDimensionalChanger.preloaderColor The color of the preloader animation.
ThreeDimensionalChanger.preloaderLocation Specifies the location of the preloader in relation to the static image borders.
ThreeDimensionalChanger.preloaderMode Determines whether the preloader is visible or hidden when loading images.
ThreeDimensionalChanger.preloaderType Specifies the preloader appearance.
ThreeDimensionalChanger.previousImage Read-only; returns the previous image in the "Images Collection".
ThreeDimensionalChanger.repeatMode Instructs 3D Image Changer how to behave when reaching the final image in the "Images Collection".
ThreeDimensionalChanger.rotation A number that indicates the degree of rotation of images while their 3D rotation.
ThreeDimensionalChanger.rotationPlane Defines the plane of rotation while changing images.
ThreeDimensionalChanger.scaleContent Determines whether the content scales to fit the changer, or the changer scales to fit the content.
ThreeDimensionalChanger.visualEffect Specifies the type of a visual effect to be applied to a component instance.
ThreeDimensionalChanger.visualEffectQuality Determines the depth or intensity of the visual effect.
ThreeDimensionalChanger.visualEffectSpeed Determines the speed of increasing and decreasing of the visual effect.
ThreeDimensionalChanger.xml Read-only; returns the XML object that represents the content of the downloaded configuration XML file.
ThreeDimensionalChanger.xmlEnable Defines the method that is used for adding graphic objects to internal "Images Collection".
ThreeDimensionalChanger.xmlFilePath The name of configuration XML file.

ThreeDimensionalChanger.changeEffect

Usage

myChanger.changeEffect

Description

Property; a string that specifies the type of a 3D rotation effect that is used for changing an image. This property can be one of five predefined values: "prismatic quadrangular", "prismatic triangular", "cylindrical convex", "cylindrical concave", or "plane rectangular". The default value is "prismatic quadrangular".

Example

The following example sets the changeEffect property to "prismatic triangular":

myChanger.changeEffect = "prismatic triangular";


ThreeDimensionalChanger.currentImage

Usage

myChanger.currentImage

Description

Property (read-only); returns the current image in the "Images Collection".

Example

The following example sets the value of image_num to the index of the current image:

var image_num:Number;
image_num = myChanger.getImageIndex(myChanger.currentImage);


ThreeDimensionalChanger.delay

Usage

myChanger.delay

Description

Property; a number that indicates (in seconds) how long each image "holds" before automatically displaying the next image in que. This property accepts any positive number or 0 (including fractional values) and is enabled at displayMode property set to "auto-forward" or "auto-backward". If delay is equal to 0, the images are displayed continuously. The default value is 3.

Example

The following example sets the delay property to 5:

myChanger.delay = 5;


ThreeDimensionalChanger.direction

Usage

myChanger.direction

Description

Property; a string that specifies the direction of rotation while changing images. There are two values available (the default value is "CWW"):

  • CCW   "counterclockwise": top-down (for Rotation Plane set to "vertical") or from left to right (for Rotation Plane set to "horizontal");
  • CW     "clockwise": bottom-up (for Rotation Plane set to "vertical") or from right to left (for Rotation Plane set to "horizontal").

This is valid for Display Mode parameter set to "auto-forward" or "manual" when moving forward through the "Images Collection" (to every next image). If Display Mode parameter is set to "auto-backward", the directions of rotation are opposite of listed above. Also, if moving backward through the "Images Collection" (to every previous image), the directions of rotation are opposite of listed above.

Example

The following example sets the direction property to "CW":

myChanger.direction = "CW";


ThreeDimensionalChanger.displayMode

Usage

myChanger.displayMode

Description

Property; a string that specifies the playback mode of the "Images Collection". By default, it is set to "manual," which means 3D Image Changer will display the first image, stop and await user input. Changing this to "auto-forward" or "auto-backward" will instruct 3D Image Changer to automatically display the next image in que after the delay timer has expired.

Example

The following example sets the displayMode property to "auto-forward":

myChanger.displayMode = "auto-forward";


ThreeDimensionalChanger.firstImage

Usage

myChanger.firstImage

Description

Property (read-only); returns the first image in the "Images Collection".

Example

The following example compares the current image with the first image, and if they are equal — sets the value of changer_stop to "true":

if (myChanger.currentImage == myChanger.firstImage) {
changer_stop = true;
}


ThreeDimensionalChanger.granularity

Usage

myChanger.granularity

Description

Property; defines the degree of detail and the rendering quality while rotating an image. In numerical expression, it is the height or the width (depending on whether the Rotation Plane parameter is set to "vertical" or "horizontal") of segments into which the image is split when rotating. The smaller the segments, the more the image is smoothed and anti-aliased, and vice versa. At the same time, reducing the value of granularity, you slow down the speed of rotation by increasing the time of rendering. This property can be an integer between 1 and 100 pixels. The default value is 10.

Example

The following example sets the granularity property to 8:

myChanger.granularity = 8;


ThreeDimensionalChanger.keyboardControl

Usage

myChanger.keyboardControl

Description

Property; determines whether 3D Image Changer uses default keyboard handling to navigate through the images in collection when the component instance has focus. This property can be either "true" or "false". The default value is "false".

Example

The following example sets the keyboardControl property to "true":

myChanger.keyboardControl = true;


ThreeDimensionalChanger.lastImage

Usage

myChanger.lastImage

Description

Property (read-only); returns the last image in the "Images Collection".

Example

The following example compares the current image with the last image, and if they are equal — sets the value of changer_stop to "true":

if (myChanger.currentImage == myChanger.lastImage) {
changer_stop = true;
}


ThreeDimensionalChanger.length

Usage

myChanger.length

Description

Property (read-only); the number of images in the "Images Collection".

Example

The following example displays the number of images currently in the "Images Collection":

trace("The total number of images: " + myChanger.length);


ThreeDimensionalChanger.lockMode

Usage

myChanger.lockMode

Description

Property; determines whether 3D Image Changer is enabled or disabled to "store" user interactions. That means 3D Image Changer can react differently to navigation commands (such as "gotoNextImage", etc.) while changing (rotating) images. This property can be either "true" or "false" (the default value is "false"):

  • true     3D Image Changer ignores any navigation command.
  • false   3D Image Changer stores up to 3 navigation commands running every next of them after the previous one has been completed. If the commands are opposite to each other in direction (for example, "gotoNextImage" — "gotoPreviousImage"), 3D Image Changer reverses rotation immediately not waiting for the end of the movement.

Example

The following example sets the lockMode property to "true":

myChanger.lockMode = true;


ThreeDimensionalChanger.nextImage

Usage

myChanger.nextImage

Description

Property (read-only); returns the next image in the "Images Collection".

Example

The following example compares the next image with the image at index 10, and if they are equal — sets the displayMode property to "manual":

if (myChanger.nextImage == myChanger.getImageAt(10)) {
myChanger.displayMode = "manual";
}


ThreeDimensionalChanger.preloaderAlpha

Usage

myChanger.preloaderAlpha

Description

Property; a number that indicates the transparency percentage for the preloader animation. This property accepts any number at or between 0 and 100. The default value is 100.

Example

The following example sets the preloaderAlpha property to 70:

myChanger.preloaderAlpha = 70;


ThreeDimensionalChanger.preloaderColor

Usage

myChanger.preloaderColor

Description

Property; the color of the preloader animation. The property accepts hex values. The default value is "FFFFFF".

Example

The following example sets the preloaderColor property to "FF6600" (orange):

myChanger.preloaderColor = "FF6600";


ThreeDimensionalChanger.preloaderLocation

Usage

myChanger.preloaderLocation

Description

Property; a string that specifies the location of the preloader in relation to the static image borders. This property can be one of five predefined values: "center", "top-left", "top-right", "bottom-left", or "bottom-right"; the default value is "center".

Example

The following example sets the preloaderLocation property to "top-left":

myChanger.preloaderLocation = "top-left";


ThreeDimensionalChanger.preloaderMode

Usage

myChanger.preloaderMode

Description

Property; determines whether the preloader is visible or hidden when loading images. This property can be one of two predefined values: "always visible" or "always hidden". The default value is "always visible".

Example

The following example sets the preloaderMode property to "always hidden":

myChanger.preloaderMode = "always hidden";


ThreeDimensionalChanger.preloaderType

Usage

myChanger.preloaderType

Description

Property; a string that specifies the preloader appearance. This property can be one of four predefined values: "spiral", "progress bar", "progress circle", "text string". The default value is "progress circle".

Example

The following example sets the preloaderType property to "progress bar":

myChanger.preloaderType = "progress bar";


ThreeDimensionalChanger.previousImage

Usage

myChanger.previousImage

Description

Property (read-only); returns the previous image in the "Images Collection".

Example

The following example compares the previous image with the image at index 10, and if they are equal — sets the displayMode property to "manual":

if (myChanger.previousImage == myChanger.getImageAt(10)) {
myChanger.displayMode = "manual";
}


ThreeDimensionalChanger.repeatMode

Usage

myChanger.repeatMode

Description

Property; instructs 3D Image Changer how to behave when reaching the final image in the "Images Collection". There are two values available:

  • false   Auto-playback stops and Display Mode changes to "manual" (if previously set to "auto-forward" or "auto-backward").
  • true     The collection restarts with either the first image (Display Mode set to "auto-forward" or "manual"), or the last image (Display Mode set to "auto-backward").

The default value is "true".

Example

The following example sets the repeatMode property to "false":

myChanger.repeatMode = "false";


ThreeDimensionalChanger.rotation

Usage

myChanger.rotation

Description

Property; a number that indicates the degree of rotation of images while their 3D rotation. The smaller the angle, the more the rotation is smooth, and vice versa. At the same time, reducing the value of rotation, you slow down the speed of rotation by increasing the time of rendering.

You can select any integer between 1 and 180 degrees; but the real value of rotation angle will be the one from the table that is the closest to the selected number for correspondent Change Effect.

This property overrides the Rotation Angle parameter value set during authoring. The default value for rotation is 10.

Example

The following example sets the rotation property to 15:

myChanger.rotation = 15;


ThreeDimensionalChanger.rotationPlane

Usage

myChanger.rotationPlane

Description

Property; a string that defines the plane of rotation while changing images. This property can be either "horizontal" or "vertical". The default value is "vertical".

Example

The following example sets the rotationPlane property to "horizontal":

myChanger.rotationPlane = "horizontal";


ThreeDimensionalChanger.scaleContent

Usage

myChanger.scaleContent

Description

Property; determines whether the content scales to fit the changer, or the changer scales to fit the content. This property can be one of two predefined values: "fit changer" or "fit image". The default value is "fit image". For more information, see the Scale Content parameter.

Example

The following example sets the scaleContent property to "fit changer":

myChanger.scaleContent = "fit changer";


ThreeDimensionalChanger.visualEffect

Usage

myChanger.visualEffect

Description

Property; a string that specifies the type of a visual effect to be applied to a 3D Image Changer instance. This property can be one of four predefined values: "none", "blur", "grayscale", "brightness". The default value is "none" (no visual effect applied to a 3D Image Changer instance). For more information, see the Visual Effect parameter.

Example

The following example sets the visualEffect property to "blur":

myChanger.visualEffect = "blur";


ThreeDimensionalChanger.visualEffectQuality

Usage

myChanger.visualEffectQuality

Description

Property; determines the depth or intensity of the visual effect. This property can be one of three predefined values: "low", "medium", "high". The default value is "medium".

Example

The following example sets the visualEffectQuality property to "low":

myChanger.visualEffectQuality = "low";


ThreeDimensionalChanger.visualEffectSpeed

Usage

myChanger.visualEffectSpeed

Description

Property; determines the speed of increasing and decreasing of the visual effect. This property can be one of five predefined values: "minimum", "low", "medium", "high", "maximum". The default value is "medium".

Example

The following example sets the visualEffectSpeed property to "high":

myChanger.visualEffectSpeed = "high";


ThreeDimensionalChanger.xml

Usage

myChanger.xml

Description

Property (read-only); returns the XML object that represents the content of the downloaded configuration XML file.

Example

This is the configuration XML file for a 3D Image Changer instance named "myChanger". The file contains the list of graphic files to be loaded by the component, and additional attributes for each element. The code below shows how to access the attribute values looping through the XML node's child nodes.

<?xml version="1.0" encoding="UTF-8"?>
<zodiacpath="pictures/" width="300" height="150">
<img src="aries.jpg" name="Aries" ruler="Mars" element="Fire" pole="Positive"/>
<img src="taurus.jpg" name="Taurus" ruler="Venus" element="Earth" pole="Negative"/>
<img src="gemini.jpg" name="Gemini" ruler="Mercury" element="Air" pole="Positive"/>
<img src="cancer.jpg" name="Cancer" ruler="Moon" element="Water" pole="Negative"/>
<img src="leo.jpg" name="Leo" ruler="Sun" element="Fire" pole="Positive"/>
<img src="virgo.jpg" name="Virgo" ruler="Mercury" element="Earth" pole="Negative"/>
<img src="libra.jpg" name="Libra" ruler="Venus" element="Air" pole="Positive"/>
<img src="scorpio.jpg" name="Scorpio" ruler="Pluto" element="Water" pole="Negative"/>
<img src="sagittarius.jpg" name="Sagittarius" ruler="Jupiter" element="Fire" pole="Positive"/>
<img src="capricorn.jpg" name="Capricorn" ruler="Saturn" element="Earth" pole="Negative"/>
<img src="aquarius.jpg" name="Aquarius" ruler="Uranus" element="Air" pole="Positive"/>
<img src="pisces.jpg" name="Pisces" ruler="Neptune" element="Water" pole="Negative"/>
</zodiac>

for (var aNode:XMLNode = myChanger.xml.firstChild.firstChild; aNode != null; aNode = aNode.nextSibling) {
trace("Name: " + aNode.attributes.name);
trace("Ruler: " + aNode.attributes.ruler);
trace("Element: " + aNode.attributes.element);
trace("Pole: " + aNode.attributes.pole);
}


ThreeDimensionalChanger.xmlEnable

Usage

myChanger.xmlEnable

Description

Property; defines the method that is used for adding graphic objects to internal "Images Collection". There are two options available:

  • false   The user adds and edits the items in the Values dialog box (opened from Images Collection text box within the Parameters tab for 3D Image Changer component).
  • true     The user specifies the name of configuration XML file that contains the list of graphic files to be loaded into 3D Image Changer.

The default value is "false".

Example

The following example sets the xmlEnable property to "false":

myChanger.xmlEnable = "false";


ThreeDimensionalChanger.xmlFilePath

Usage

myChanger.xmlFilePath

Description

Property; the name of configuration XML file. The default value is "images.xml" (in this case, the XML file must be saved in the same directory as the SWF file that contains a 3D Image Changer component).

Example

The following example sets the xmlFilePath property to "flowers/tulips.xml":

myChanger.xmlFilePath = "flowers/tulips.xml";


© E-MERALD. All rights reserved.
© Designed by Fox.net.ua.