By Vijayeta Tilak of Sonata Software Limited
This Article is all about exploring one of the features of a presentation document, Animation, using System.IO.Packaging API and ASP.NET
A presentation document can be animated by making changes in the contents of the file, ‘slideX.xml’
The ASP.NET application(downloadable) will give provisions to the user to animate a particular slide, and also choose the type of animation.
The application will upload a presentation document, animates the contents, and allows the user to download it to the local drive.
It provides the user with a GUI, to view the contents of each slide, and navigate through the contents.
The user hence, on viewing the contents, can choose the type of animation for each slide, or can even disable the option of animation for any slide. The types of animation options are ‘Fade’ and ‘Wipe’,and ‘Fly-In’.
The ‘File Upload’ controls allows the user to upload the presentation file to be animated into a virtual directory. The textboxes hold the Title and Subtitle of each slide.
The buttons, ‘Next’ and ‘Prev’ allow the user to navigate through the slides and view the contents.Each of the slides can be animated by selecting one of the choices.
The application also provides the user the option of downloading the animated file to the local drive through a hyperlink
The Slides are animated ,by introducing corresponding information in the ‘timing’ node of the SlideX.xml xml file.The ‘timing’ node of SlideX.xml holds the information regarding the type and duration of the animation. The sample would be,
<p:cTn id="1" dur="indefinite" restart="never" nodeType="tmRoot">
<p:seq concurrent="1" nextAc="seek">
<p:cTn id="2" dur="indefinite" nodeType="mainSeq">
<p:cTn id="3" fill="hold">
This is basically done by loading an XML document with the SlideX.xml, adding the entire ‘timing’ node to the document and it adding it back to the package.
The animated presentation document can be viewed once it’s downloaded to the local drive.