This is a migrated thread and some comments may be shown as answers.

Scrolling is not Smooth

3 Answers 115 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Marbry
Top achievements
Rank 1
Marbry asked on 28 Oct 2011, 03:07 PM
How do I set the rotator to continuously and smoothly scroll text?

It's scrolling, but because the items are of different lengths this appears to cause it to constantly speed up and slow down to fit the item in within the ScrollDuration I'm assuming.  This gives it a very jerky appearance.

The items are coming off an RSS feed so I won't know ahead of time what the lengths are.

3 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 31 Oct 2011, 02:25 PM
Hello Marbry,

Have you looked at this demo, it also pulls from an RSS feed as well.

http://demos.telerik.com/aspnet-ajax/rotator/examples/livexml/defaultcs.aspx

If that doesn't work for, perhaps you should post what your Rotator markup looks like.
0
Marbry
Top achievements
Rank 1
answered on 31 Oct 2011, 03:49 PM
Yes, I've seen that.  I think the only reason that it looks fairly smooth is that the items are templated to all be the same size.

This is just horizontally scrolling the text continuously in a single line, so the width of each item varies as the length of the text varies.

<telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="xmlDS" Width="750px" Height="25px" RotatorType="AutomaticAdvance" ScrollDuration="7000" FrameDuration="1" PauseOnMouseOver="False" Font-Size="Large" Font-Bold="True" ForeColor="White" Font-Names="Arial" SlideShowAnimation-Type="None">
                    <ItemTemplate>
                        <span style="filter:alpha(opacity=90);">
                            <%# System.Web.HttpUtility.HtmlEncode(XPath("title").ToString())%>     
                        </span>
                    </ItemTemplate>
                </telerik:RadRotator>

This is a common way to use this, there should be a way to do this.  Perhaps a setting for the control to just treat all items as one big one and scroll that based on a character per second rate or something.

I'm also experiencing an odd issue with a 2nd rotator on the page.  It has one item, and it scrolls until it nearly fills the width with text, then slows dramatically, stops and starts over so that it never shows the last part of the text.  There is also a significant delay before it starts scrolling.
0
Slav
Telerik team
answered on 01 Nov 2011, 04:43 PM
Hello Marbry,

The RadRotator control is designed to scroll items with the same size, otherwise an unexpected behavior may occur, as the one that you have experienced. You can consider using any of the following approaches in order to implement the desired scenario:

1. Populate the RadRotator with items that have equal width. This way the animation speed will always be the same.
2. Use the client event of the RadRotator OnClientItemShown in order to change the Scroll Duration, depending on the width of the currently displayed item. This can be achieved via the client method set_scrollDuration of the rotator control, described in this help article.
3. Use the RadTicker control instead, which is quite useful for displaying horizontal lines of text.

As for the second RadRotator on your page, please ensure that there is enough space in the viewport for displaying the content of the rotated item and that the properties Width, Height, ItemWidth, ItemHeight are specified. The help article How to configure RadRotator will give you useful information for setting a properly functioning RadRotator control on your page.

Note that I am not aware of the exact setup of the second rotator control. If you are still unable to resolve the problem, please open a regular support ticket and send a sample, runnable project that isolates the issue so that we can examine it locally and provide a more to the point answer.

Best wishes,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Rotator
Asked by
Marbry
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Marbry
Top achievements
Rank 1
Slav
Telerik team
Share this question
or