This article explains the use of the Flash Lite Slider component and API.
Contents |
The Flash Lite Slider component is a flexible and scalable user interface component that allows Flash Lite developers to create mobile user interfaces easily, using Flash Lite.
Slider component can be downloaded here.
Installation of the Slider component is easy. Execute the components MXP file and follow the simple instructions in Adobe Extension Manager to complete the installation process. Restart Adobe Flash CS4 after installation.
Note: Component FLA and AS files should appear in the directories [INSTALL PATH]\Flash CS4\en\Configuration\Components\Forum Nokia and [INSTALL PATH]\Flash CS4\en\Configuration\Classes\com\forumnokia. In some setup environments, the files may appear under the wrong language directories (for example, fi instead of en). In such cases, the files should be manually moved to the correct directories as specified above.
fscommand2("DisableKeypadCompatibilityMode");
fscommand2("FullScreen", true);
fscommand2("SetQuality", "high");
Stage.scaleMode = "noScale";
Stage.align = "TL";
_focusrect = false;
var myEvent:String = mySlider.onChangeEvent();
mySlider.addEventListener(myEvent, myListener);
function myListener(eventObject:Object):Void {
if (eventObject.type == myEvent) {
switch (eventObject.target) {
case _level0.mySlider :
// My Slider action here
break;
default :
break;
}
}
}
The skin of a slider component is composed of 7 different parts, as can be seen below. This structure enables the slider interface to be scalable and easily skinnable.
Skins have separate MovieClips for Up and Down states of the slider. The structure of these parts is defined below:
_skins
Note: Each new custom skin must follow the same folder structure, with linkage identifiers named accordingly.
Inspectable parameters help customise the Slider component from the Component Inspector panel (Shift + F7). All inspectable parameters can also be controlled via ActionScript with the component APIs.
| Parameter | Description | Value |
|---|---|---|
| Skin | Defines the slider skin linkage identifier path. For instance, for the mySkin value, the slider would search for the skin components under the Slider.mySkin.* linkage path. | Skin identifier string |
| Fill Enabled | Enable or Disable the Fill over the background bar | Boolean |
| Maximum | Maximum value of Slider. | Number |
| Minimum | Minimum value of Slider. | Number |
| Snap Interval | Increment by which the value is increased or decreased as the user moves the slider thumb. | Number |
| Value | Start value. | Number |
public function setSkin( path:String ): Void;
Sets a new path for the skin. Reconstructs the component.
public function enableComponent() :Void;
Makes the component react to user input.
public function disableComponent() :Void;
Makes the component stop reacting to user input.
public function onChangeEvent():String;
Calls the slider component’s change event.
public function onStartDragEvent():String;
Calls the slider component’s startDrag event.
public function onStopDragEvent():String;
Calls the slider component’s stopDrag event.
No related wiki articles found