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

startAutoPlay isn't working

3 Answers 118 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Dwertz
Top achievements
Rank 1
Dwertz asked on 17 Dec 2008, 06:24 PM
I'm using the Q3 Rotator to make a slideshow. It has pause/play/left/right buttons. The RotatorType is set to FromCode. The left and right buttons are working as expected. The Play button doesn't want to work, though. Using the startAutoPlay() method advances a single frame, but doesn't start automatic advance. The resume() method does the same thing. Is there something I'm doing wrong?

Incidentally, if I set the RotatorType to "AutomaticAdvance", the pause/left/right buttons work as expected. The play button behaves the same way, though, using either the resume() or startAutoPlay() method - it only advances one frame.

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 20 Dec 2008, 09:52 AM
Hi Dwertz,

When the property RotatorType is set to "FromCode", the behavior of the control is fully controlled by code, including the AutoPlay functionality - that is why it is not working as expected in your scenario. 

If you want to keep this setting, but still have the AutoPlay feature, you must change the rotator type by using its client-side API and then to call startAutoPlay() method:


function StartPlay() 
var oRotator = GetRadRotator(); 
oRotator.set_rotatorType(Telerik.Web.UI.RotatorType.AutomaticAdvance); 
oRotator.startAutoPlay(); 
return false
}  

I hope this helps.

Regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dwertz
Top achievements
Rank 1
answered on 22 Dec 2008, 02:12 PM
Thank you, that works for getting the AutoPlay started initially. However, now I find that I can't get the automatic rotation started after using the .pause() method. I've tried the resume() method, both by itself and in combination with the code above. What is the correct way to resume automatic rotation from the paused state?
0
Fiko
Telerik team
answered on 23 Dec 2008, 08:05 AM
Hi Dwertz,

When the rotator is stoped (paused) programmatically and it is set to AutomaticAdvance mode you can resume rotation by calling start() instead startAutoPlay() function of RadRotator's object e.g. :

function StartPlay() 
    var oRotator = GetRadRotator(); 
    if (oRotator.get_rotatorType() == Telerik.Web.UI.RotatorType.AutomaticAdvance) 
    { 
        oRotator.start(); 
    } 
    else 
    { 
        oRotator.set_rotatorType(Telerik.Web.UI.RotatorType.AutomaticAdvance); 
        oRotator.startAutoPlay(); 
    } 
    return false


Greetings,
Fiko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Rotator
Asked by
Dwertz
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Dwertz
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or