4. NlsScroller Options

Below are list of NlsScroller configurable properties.


4.1 Scroller Width and Height

Specifies the dimension of the scroller.


         var s = new NlsScroller("scroll1");
s.width = 250; //set scroller width
s.height = 150; //set scroller height


4.2 Scroll Mode

NlsScroller supports automatic scrolling and manual scrolling.


         var scr = new NlsScroller("scr1");
scr.mode = "AUTO"; //auto scrolling mode or scr.mode = "MANUAL"; //manual scrolling mode


4.3 Scroller Effect

Since version 1.2, NlsScroller introduces new plugable effects. There are 6 cross browsers effects supported:

  • NlsEffContinuous, This is default scoller effect, continuously scrolls contents.
  • NlsEffSlide, Slide effect, there are 3 types of slide effects supported: slide in, slide out and shift (sliding in next topic while sliding out current topic).
  • NlsEffFade, Fade effect, there are 2 types of fade effect supported, cross fade and linear fade.
  • NlsEffWipe, Wipe effect, horizontal, vertical and alternate wipe effect.
  • NlsEffIETrans, IE Visual Transition Filter (available on IE5.5+ only).
  • NlsEffBlank, Blank for amount of time before displaying next topic.


To specify scroller effect:

        var scr = new NlsScroller("scr1");
        
        scr.setEffect(new NlsEffFade("type=linear,speed=5,stepsnum=50"));        
      

Each effect has a set of parameters to control the behaviour of the effect. Detail of the effect and more complete examples will be covered in NlsScroller Effect.


4.4 Navigation Bar

Navigation bar is disabled by default. To enable the navigation bar:

        var scr = new NlsScroller("scr1");
        
        scr.showToolbar = false;
      

4.5 Topic Timeout

Specifies the amount of time for the scroller to change from current topic to next topic (in milliseconds). This property is available only in auto scroll mode. This property is not available in continuous scrolling.


        var scr = new NlsScroller("scr1");
        
        scr.speed=4000;
      

4.6 Pause on Mouse Over
If true, the scroller will stop scrolling when mouse hover the scroller.

        var scr = new NlsScroller("scr1");
        
        scr.stopOnMouseOver=true;