![]() | ||||||||||
| ||||||||||
You can control scroller behaviour by using toolbar. You should use "scroll" property to describe this toolbar view and actions. To specify this property use construction like this:
"scroll": { "type":"auto", "step":5, "timer":30, "dir":"e", "pause":1500, "cycle":true, "ctrlstyle": { "width":70, "height":30, "align":"center" }, "ctrlpos": { "x":10, "y":180 }, "control": [ { "type":"button", "act":"stop", "text":"[ Stop ]" }, { "type":"button", "act":"pause", "text":"[Pause]" }, { "type":"button", "act":"start", "text":"[ Start ]" }, { "type":"button", "act":"rew", "text":"[ Rew ]" } ] } "type" - Scrolling type. If value is "auto" all scroller objects are appeared as though you see a slide show. If value is "control" you should press button to see the next picture. Default value is "auto". For any other value it's possible to step back and forward from item to item. Of course, it's possible to control the scrolling in both of those modes, but available operations are slightly different. "step" - Step to go by step-by-step, in pixels. "timer" - Timeout between scrolling steps, in milliseconds. "dir" - Describes the scrolling direction. It can go in one of four directions: n = north (up), s = south (down), e = east (to the right), w = west (to the left). "pause" - Pause between items are scrolled from one to another, in milliseconds. "cycle" - Specifies whether to cycle the scrolling/slideshow when the last item is reached. "ctrlstyle" - Describes the style settings common for all scrolling controls. See Scroller Style to learn more about scroller style. "ctrlpos" - Start offset for positioning controls that don't have exact position s pecified. JS syntax: ctrlpos: { x:0, y:0 } "ctrldir" - Describes how controls are distributed if no coordinates are specified for them. Possible values are: h = horizontally (to the right), v = vertically (down). "control" - Array of scrolling controls:
You can see an example and complete code here - Scroller configuration. Read more about CodeThatScroller >>
|