JC Loader - Properties
Overview | Properties | Methods | Events | ActionScript 3.0 usage | User Manual
Most of these properties can be set in the JC Loader Panel (Window > Other Panels > JCLoader Panel), also can be set from XML, using the xmlPath optional parameter.
Property | Type JC Loader Panel |
Description |
alignMode | String yes |
The type of horizontal and vertical alignment used for the content. Possible values: topLeft, topMiddle, topRight, centerLeft, centerMiddle, centerRight, bottomLeft, bottomMiddle, bottomRight. The default value is topLeft. |
builtInPreloader | Boolean yes |
Specifies whether the component's own preloader will be displayed. Note: When testing the component on your local computer, it will not display the preloader if it is loading content from your local disk, since the loading process is very fast in this case. The preloader will only be displayed if the JC Loader component loads content from the Internet. The default value is true. |
content | Object no |
A reference to the content loaded into the component. If the content is an external file (image or flash clip), the property returns a reference to the Loader class instance. If the content is a Flash clip, the property returns a reference to the instance of the clip loaded from the library. |
currentTransitionType | String no |
[read-only] Specifies the type of the transition currently applied on the content. Possible values are show and hide. Useful when a JCLoaderEvent.TRANSITION_END is dispatched and you want to find out the type of transition that has just finished. Possible values are show, hide and swap. |
height | Number no |
Sets the height of the JC Loader instance. The content will be displayed depending on the size of the JC Loader component and the value of the scaleMode property. |
hideAutoPLay | Boolean yes |
Specifies whether the content will hide automatically, using the hide transition, after being displayed for a time interval specified by the hideDelay property. The default value is false. Note: After the auto hide transition ends the content is unloaded from the loader. |
hideDelay | Number yes |
The time interval measured in seconds between the end of the show transition and the beginning of the hide transition. This is actually the time interval during which the content is displayed. This value is taken into consideration only if hideAutoPlay is set to true. The default value is 2. Note: After the auto hide transition ends, the content is unloaded from the loader. |
hideTransition | IFlashEffSymbol no |
A reference to the instance of the pattern used for the hide transition. When used from code, this reference is created separately by using the pattern's constructor. Otherwise the hide pattern can be selected from JCLoader Panel -> Hide tab -> Pattern list. |
hideTransitionName | String no |
The full path and class name of the pattern used for the hide transition. This hide transition switches the content from a visible state to an invisible state, using an effect provided by the selected pattern. If you need to apply a hide transition on the loaded content, first you have to set that pattern to the JC Loader instance either by setting the hideTransitionName or the hideTransition property or by selecting a pattern in JCLoader Panel -> Hide tab -> Pattern list. |
initialContentHeight | Number no |
The original height of the content, before applying any scale modes on it. The value can be accessed after the content has loaded. |
initialContentWidth | Number no |
The original width of the content, before applying any scale modes on it. The value can be accessed after the content has loaded. |
isTargetVisibleAtEnd | Boolean no |
Controls the way the content looks after the effect applied on it has ended. If true, the content will be displayed in the original form (might slightly differ in position from the content with the effect applied on it). If false, the content will remain in the final state after the effect has ended. This final state is not necessarily the original content; it might by only a copy of it, on which the actual effect was applied. If removeEffect() is called during the show on the JC Loader instance and the property is set to true after the transition stops and the object displayed will be the original content and not the BitmapData copy of it. If the property is set to true, it is recommended that the x and y coordinates of the JC Loader instance are integer values, otherwise you may experience some position shifting after the transition has ended and the content is displayed in the initial state. The default value is true. |
isTransitioning | Boolean no |
[read-only] Specifies whether there is a transition going on (true) or not (false). |
loaderContext | LoaderContext no |
A LoaderContext object, which has properties that define the following:
If the context parameter is not specified or refers to a null object, the loaded content remains in its own security domain. |
scaleMode | String yes |
The type of scaling applied on the content. Possible values:
The default value is scaleCrop. |
showTransition | IFlashEffSymbol no |
A reference to the instance of the pattern used for the show transition. This reference is created separately by using the pattern's constructor. Otherwise the show pattern can be selected from JCLoader Panel -> Show tab -> Pattern list. |
showTransitionName | String no |
The full path and class name of the pattern used for the show transition. This show transition switches the content from an invisible state to a visible state, using an effect provided by the selected pattern. If you need to apply a show transition to the loaded content, first you have to set that pattern to the JC Loader instance either by setting the showTransitionName or the showTransition property or by selecting a pattern in JCLoader Panel -> Show tab -> Pattern list. |
source | String yes |
The class name (linkage id) or the file path and name of the content that will be loaded by the JC Loader instance. The JC Loader is able to load display objects from the Library of your project or external images (.jpg, .png, .gif) and .swf files. |
swapDelay | Number yes |
Used by the swap transition - the time interval, measured in seconds, from the start of the hide transition on the currently displayed content until the start of the next show transition on the newly loaded content. In case of a swap delay of 0 seconds, the hide and show transitions will start at the same time. The default value is 0. |
swapType | String yes |
The way consecutive contents will be displayed. Possible values are JCLoader.SWAP_TYPE_SHOW, JCLoader.SWAP_TYPE_HIDE and JCLoader.SWAP_TYPE_HIDE_AND_SHOW
The swap transition (hide/show/hideAndShow) only takes place if the source property is set to a new value (a new content is loaded). The show transition will always take place on the first loaded content but only of the show transition pattern is defined. When setting the swapType property, please make sure that the appropriate transitions are defined: a show transition pattern if swapType is "show", a hide transition pattern if swapType is "hide" or both show and hide transition patterns if swapType is "hideAndShow". The default value is hideAndShow. |
width | Number no |
Sets the width of the JC Loader instance. The content will be displayed depending on the size of the JC Loader component and the value of the scaleMode property. |
xmlPath | String no |
The path and name of the .xml file used to set up the current JC Loader instance. If such a file is defined and set to the component instance, then when the component initializes, the settings from the .xml file will override any other settings done through the JC Loader Panel or through ActionScript code (if those were made before setting the xmlPath property). |
Overview | Properties | Methods | Events | ActionScript 3.0 usage | User Manual