Sample 10 - Controlling the Animation via JavaScript

This example shows how you can enhance the user interface experience by controlling the animation externally via JavaScript.
Control and appearance of the Gallery are effected entirely via the XML file 3dgalleryv2.xml (Help File).






The following function calls are available:

InvokeImageClick(index)
Executes a mouse click on a Gallery image.
index: the index of the image on which the click should be effected.
Sample: animation.InvokeImageClick(0);

InvokeDetailPageClose()
Closes the DetailPage and returns to the 3D Gallery.
Sample: animation.InvokeDetailPageClose();

InvokeAnimationStop()
Stops rotation of the 3D Gallery.
Sample: animation.InvokeAnimationStop();

InvokeAnimationStart()
Starts rotation of the 3D Gallery.
Sample: animation.InvokeAnimationStart();


Settings in ClickMe.html:
var element = document.getElementById("galleryv2");
element.InvokeImageClick(0);

var element = document.getElementById("galleryv2");
element.InvokeDetailPageClose();

...