I implemented a slideshow:
And it transitions nicely from frame to frame without any problems. But, I also included a custom navigation control that uses the clientside API to change the current visible frame by the index.
The code appears to be working, except that whatever the previous slide was that was animated, it is not visible to go back to. For example, assume three slides:
Page is loaded
Slide[0] is displayed
Slide[0] fades out, as Slide[1] fades in
User clicks on NavigationButton[0]
"showItemByIndex(0)" is executed
RadRotator sets the current item index to 0
Slide[0] is still faded out, and a blank frame is displayed
In my tests, the previous frame is always invisible because it was faded out. I hope I explained this well enough. I used "Fade" instead of "CrossFade" for an animation, and it works fine, so I've implemented that although I prefer the cross fade.
<
telerik:RadRotator
ID
=
"radSlideShow"
runat
=
"server"
DataSourceID
=
"xmlSlideShowSource"
Width
=
"516px"
Height
=
"310px"
ItemWidth
=
"516px"
ItemHeight
=
"310px"
RotatorType
=
"SlideShow"
FrameDuration='<%$ AppSettings:SlideShowFrameDuration %>'
OnClientItemShown="radSlideShow_OnClientItemShown"
OnClientLoad="radSlideShow_OnClientLoad">
<
SlideShowAnimation
Duration='<%$ AppSettings:SlideShowFadeDuration %>' Type="CrossFade" />
<
ItemTemplate
>
<
a
href='<%# XPath("href") %>'>
<
img
src='<%# System.Configuration.ConfigurationManager.AppSettings("SlideShowImagesRelativePath") + XPath("filename") %>' alt='<%# XPath("description") %>' % style="border-width: 0px;" />
</
a
>
</
ItemTemplate
>
</
telerik:RadRotator
>
And it transitions nicely from frame to frame without any problems. But, I also included a custom navigation control that uses the clientside API to change the current visible frame by the index.
function
showItemByIndex(index) {
/* Be sure the slideShow RadRotator object is assigned */
if
(slideShow ==
null
)
return
;
/* Set the current frame index, 'false' to disable animation */
slideShow.set_currentItemIndex(index,
false
);
/* Reset the slideshow's timer, so that it doesn't just quickly change */
slideShow.stop();
slideShow.start();
/* Set the CSS of the button that the user clicked on */
setButtonByIndex(index);
}
The code appears to be working, except that whatever the previous slide was that was animated, it is not visible to go back to. For example, assume three slides:
Page is loaded
Slide[0] is displayed
Slide[0] fades out, as Slide[1] fades in
User clicks on NavigationButton[0]
"showItemByIndex(0)" is executed
RadRotator sets the current item index to 0
Slide[0] is still faded out, and a blank frame is displayed
In my tests, the previous frame is always invisible because it was faded out. I hope I explained this well enough. I used "Fade" instead of "CrossFade" for an animation, and it works fine, so I've implemented that although I prefer the cross fade.