Symbian3/SDK/Source/GUID-1AF99DF6-C5BE-5713-940D-5E9FBD43F123.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 12:39:03 +0100
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
permissions -rw-r--r--
Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-1AF99DF6-C5BE-5713-940D-5E9FBD43F123" xml:lang="en"><title>Animation
example</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-6F2D66DB-B099-4D4F-8F98-720B4A67C24A"><title>Description</title> <p>This example is a UI application, which
demonstrates how to create and play basic and sprite animations. It implements
all the standard classes required by any application using UI controls such
as an application, a document, an application UI and a view. </p> <p>The application
provides UI controls to create a sprite animation and a basic client-side
animation. It also provides UI controls to control the behavior
of an animation such as, start, stop, pause, resume and move. </p> <p>The
application plays an animated <filepath>.gif</filepath> file both as a basic
client-side animation and a server-side sprite animation. It performs the
following tasks in the order they are listed to create the basic and sprite
animations: </p> <ol id="GUID-5860A908-A761-5431-AB6E-EEBE4D7CF0FE">
<li id="GUID-33C9AD3D-8067-5A28-8C83-38A97C03C549"><p>Creates an object of
the <xref href="GUID-467B3417-C343-3637-B3AE-C1971C4C0BE3.dita"><apiname>CICLAnimationDataProvider</apiname></xref> class. </p> </li>
<li id="GUID-87DA4E47-1D76-5C16-BE0F-3F64AC00063B"><p>Loads the animated <filepath>.gif</filepath> file
into the object. </p> </li>
<li id="GUID-86DA1F4B-A2BA-56FD-B06E-8F369572B320"><p>Configures the animation
to play in an infinite loop using <xref href="GUID-7B02B3D6-D460-3274-8CE6-839549E6EFD3.dita"><apiname>TAnimationConfig</apiname></xref>. </p> </li>
<li id="GUID-2BB161BD-24E0-5961-8EDD-9ED0C37C0D2E"><p>Creates objects of <xref href="GUID-12B29886-1D43-37ED-8DC0-6F43D3E591E8.dita"><apiname>CBasicAnimation</apiname></xref> and <xref href="GUID-6BB621FF-F799-357C-BEAC-9767D68E7D50.dita"><apiname>CSpriteAnimation</apiname></xref> classes by passing the data provider object as an argument. </p> </li>
<li id="GUID-5568FAA9-8C74-5828-8AC9-1325C1AE16F0"><p>Starts animations with
the <xref href="GUID-7B02B3D6-D460-3274-8CE6-839549E6EFD3.dita"><apiname>TAnimationConfig</apiname></xref> object as an argument. </p> </li>
</ol> <p>Once both the animations are started, the window server will automatically
draw the animations onto the window by calling the <codeph>Draw()</codeph> method. </p> </section>
<section id="GUID-9A796309-6E8C-498C-ADCE-B45821142563"><title>Download</title> <p>Click on the following link to download
the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-00c88af8-a2db-4fe9-af89-545d8b91ea98.zip" scope="external">AnimExample.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-00c88af8-a2db-4fe9-af89-545d8b91ea98.html" scope="peer">browse</xref> to view the example code. </p> </section>
<section id="GUID-8540B854-4D8F-465C-98A1-CE8D4BEC55C0"><title>Class summary</title> <ul>
<li id="GUID-04DF6CC6-085A-5F96-9981-D6926F9193C3"><p> <xref href="GUID-E36E2F07-09E7-32BC-BB83-14DF9232E7D9.dita"><apiname>CEikApplication</apiname></xref> </p> </li>
<li id="GUID-3902EF29-2C1D-59AE-A4FE-AECDFADDAC85"><p> <xref href="GUID-B33A8A56-D1BE-3E3D-B5AC-F644A5C764DB.dita"><apiname>CEikDocument</apiname></xref> </p> </li>
<li id="GUID-7A376E96-1E0A-5844-97BC-B753DF809A6B"><p> <xref href="GUID-1185F595-0488-3E93-8D60-6B3A1A3AC32E.dita"><apiname>CEikAppUi</apiname></xref> </p> </li>
<li id="GUID-E193DEF2-CCC9-5235-B948-D8E3EF7D7E3C"><p> <xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita"><apiname>CCoeControl</apiname></xref> </p> </li>
<li id="GUID-29DAD5A9-4A75-594F-A494-C73BE9578704"><p> <xref href="GUID-067293BF-B28C-3CEC-92F4-1351A795EA7F.dita"><apiname>CActive</apiname></xref> </p> </li>
<li id="GUID-86EF37C0-7777-5B34-8351-13FC36B5B931"><p> <xref href="GUID-12B29886-1D43-37ED-8DC0-6F43D3E591E8.dita"><apiname>CBasicAnimation</apiname></xref> </p> </li>
<li id="GUID-9EB00957-5039-5AF8-85B1-06BAB817D586"><p> <xref href="GUID-6BB621FF-F799-357C-BEAC-9767D68E7D50.dita"><apiname>CSpriteAnimation</apiname></xref> </p> </li>
<li id="GUID-D0F82278-65D0-55C2-B13B-6D27ED119321"><p> <xref href="GUID-467B3417-C343-3637-B3AE-C1971C4C0BE3.dita"><apiname>CICLAnimationDataProvider</apiname></xref> </p> </li>
<li id="GUID-D13D4CF7-8C2B-531D-892A-25EBE837E452"><p> <xref href="GUID-7B02B3D6-D460-3274-8CE6-839549E6EFD3.dita"><apiname>TAnimationConfig</apiname></xref> </p> </li>
</ul> </section>
<section id="GUID-8A4B78B0-F836-4873-B2AF-E7332438E24D"><title>Build</title> <p>The <xref href="GUID-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5.dita">Symbian
platform build process</xref> describes how to build an application. But,
use <codeph>abld export</codeph> command before <codeph>abld build</codeph> to
copy the animated <filepath>.gif</filepath> file to RAM (<filepath>C:\</filepath> drive)
of the target platform. </p> <p>The AnimExample builds an executable called <filepath>AnimExample.exe</filepath> in
the standard location (<filepath>\epoc32\release\winscw\</filepath> <i>udeb
or urel</i> for CodeWarrior). Either launch the executable or launch the emulator
and then select the AnimExample application from the Emulator's extras bar. </p> </section>
<section id="GUID-D0CF73E7-ACD7-4A1F-8809-E1AF4AC9C853"><title>See also</title> <p><xref href="GUID-16E7CF5D-4364-5F42-94FF-9F79BB52523D.dita">Using
Animation</xref>  </p> </section>
</conbody></concept>