|
9. References
9.1. NlsScroller Properties and Methods
Below is the list NlsScroller properties:
| mode |
Specifies scroller mode, AUTO for auto scrolling or MANUAL for manual scrolling. |
| width |
Specifies scroller width |
| height |
Specifies scroller height |
| speed |
Specifies the amount of time for scroller to change from current topic to next topic (in miliseconds).
This property is not avaliable in MANUAL mode and Continuus scroll. |
| showToolbar |
Specifies whether to displays navigation bar, the default value is false. |
| stopOnMouseOver |
Specifies whether to stop the scroller when mouse hover the scroller, default value is true. |
| content |
Array of content. |
Below is the list NlsScroller's methods and functions:
| render() |
This method renders or displays the scroller.
Arguments:
- plc, element id where the scroller will be rendered.
If omitted, the scroller will be generated at where the method is called.
|
| setContent() |
Sets content to scroller
Arguments:
|
| setEffect(eff) |
Sets scroller effects
Arguments:
- eff, Instance of NlsEffxxx object.
|
| loadDynamicContent() |
Load contents from server with AJAX.
Arguments:
- url, loads content handler.
- autoLoadTime, the amount of times (in milliseconds) for the scroller to reload/refresh content.
By default the value is null, content is loaded once only.
|
| start() |
Starts/restarts the scroller. When this method called, the scroller will reposition
the contents and start scrolling from the first topic. |
| stop() |
Stops the scroller temporarily. |
| resume() |
Call this method if you want to resume scrolling after you stop the scroller using stop() method. |
| next() |
Scrolls next topic. This method available in manual scroll mode only. |
| prev() |
Scrolls to previous topic. This method available in manual scroll mode only. |
9.2. NlsScroller Effect
For more detail information about scroller effect, please check NlsScroller Effect.
| NlsEffContinuous |
Standard (default) scroller effect, continuously scrolls the contents.
Arguments:
-
conf, comma separated key value pair parameter.
Below are supported parameters:
- direction, scrolling direction, possible value up, down, left and right. Default value is up
- speed, scrolling speed in milliseconds, default is 40ms.
- step, scrolling step, default value is 1.
- delay, topic delay, scroller scrolls a topic and stop for the amount of specified time before continue to next topic. Default value is 0 (continuous scroll)
Browsers compatibility:
Supported on all NlsScroller's compatible browsers.
Example code:
scroller.setEffect(
new NlsEffContinuous("direction=right,speed=50,step=1,delay=1000")
);
|
| NlsEffSlide |
Slide in, slide out and shift effect.
Arguments:
-
conf, comma separated key value pair parameter.
Below are supported parameters:
- type, possible value shift, in and out. Default value is shift.
- direction, scrolling direction, possible value up, down, left and right. Default value is up
- speed, sliding speed, in milliseconds. Default value is 10.
- stepsnum, number of steps to slides from start to finish, default value is 40.
Browsers compatibility:
Supported on all NlsScroller's compatible browsers.
Example:
scroller.setEffect(
new NlsEffSlide("type=shift,direction=up,speed=10,stepsnum=40")
);
|
| NlsEffFade |
Linear and cross fade effect.
Arguments:
-
conf, comma separated key value pair parameter.
Below are supported parameters:
- type, possible value:
- linear, current content fades out followed by next topic fades in.
- cross, current topic is fading out while next topic is fading in.
Default value is linear.
- speed, fading speed, in milliseconds
- stepsnum, number of steps to fades from start to finish, default value is 50.
Browsers compatibility :
Supported on all NlsScroller's compatible browsers except Opera. In Opera the effect will be defaulted to Continuous Scroll.
Example:
scroller.setEffect(
new NlsEffFade("tyle=linear,speed=5,stepsnum=50")
);
|
| NlsEffWipe |
Horizonal, vertical and alternate wipe effect.
Arguments:
-
conf, comma separated key value pair parameter.
Below are supported parameters:
- type, possible value vertical, horizontal, alternate.
Default value is alternate
- speed, wipe speed, in milliseconds. Default value is 5.
- stepsnum, number of steps to wipes from start to finish, default value is 100.
Browsers compatibility :
Supported on all NlsScroller's compatible browsers.
Example:
scroller.setEffect(
new NlsEffWipe("type=alternate,speed=5,stepsnum=100")
);
|
| NlsEffBlank |
Temporary blank before change to next topic.
Arguments:
-
conf, comma separated key value pair parameter.
Below are supported parameters:
- speed, amount of times in milliseconds the scroller goes blank before displaying next topic.
Browsers compatibility :
Supported on all NlsScroller's compatible browsers.
Example:
scroller.setEffect(
new NlsEffBlank("speed=600")
);
|
| NlsEffIETrans |
IE Transition filter effect.
Arguments:
-
ieTransEff, array of IE Visual Transition Filter class.
You can define more that one transition class in this array.
Browsers compatibility :
Supported on IE 5.5+ only. On other browsers, the effect will be defaulted to Continuous Scroll.
Example:
scroller.setEffect(
new NlsEffIETrans(["progid:DXImageTransform.Microsoft.Fade(Overlap=1)"])
);
|
|