Hi,
I can't seem to find how I can make the images in the imageviewer scroll by, automatically.I thouht that was possible? Client script maybe?Friendly greetings,
Jurgen
You can use the "NavigateNext()" client method to simulate pressing of Next button, thus simulating animation. You can call this method form an:
document.setInterval('wivObject.naviageNext()', 3000)
for exmaple. You can adjust the animation duration to make sure that you "click" next, exactly when the scrolling finishes. You could also be more creative by handling client side itemHover event (or something like that) to stop the automatic animation calling, and resume it back when item is unhovered.
Cheers
Cant' get it to work. Error: 'SetInterval not supported for this object'I wrote a funtion to initialize the WebImageViewer, and that works except for the setInterval.<script id="igClientScript" type="text/javascript"> function InitImg() { var iv = $find("WiHome")var scrollAnimations = iv.get_scrollAnimations(); scrollAnimations.set_type($IG.ScrollAnimation.Page); .. document.setInterval('WiHome.NavigateNext()', 3000);
}</script>
And the imageviewer:<ig:WebImageViewer ID="WiHome" runat="server" Height="150px"
StyleSetName="RedPlanet" Width="900px" ClientEvents-Initialize="InitImg">
</ig:WebImageViewer>
Do I need to set the interval somwhere else? Or is it not available for my Object version, 11.1, framework 3.5?Friendly greetings,Jurgen
Hi, sorry for the missleading. It is window.setInterval(..), not document.setInterval().
Everything esle seems fine.
Hi,window.setInterval does work, thank you. So this works fine:--------------------------------------------------------------------------------
<script id="igClientScript" type="text/javascript"> var imageViewer = null; function InitImg(MyImgV) { imageViewer = MyImgV; var scrollAnimations = imageViewer.get_scrollAnimations();
scrollAnimations.set_type($IG.ScrollAnimation.Page);
var pageAnimation = scrollAnimations.get_pageAnimation();
pageAnimation.set_equationType($IG.AnimationEquationType.EaseIn);
pageAnimation.set_duration(100);
window.setInterval('imageViewer.navigateNext();', 1500);
}
</script>
--------------------------------------< ig:WebImageViewer ID="WiHome" runat="server" Height="150px" StyleSetName="RedPlanet" Width="900px" Initialize="InitImg"> <ClientEvents Initialize="InitImg" /></ig:WebImageViewer>
----------------------------------------------------------
(a better editor for this forum would be nice)
Thanx again,Jurgen,