In this tutorial, you will learn to do a basic animation without scripting.
When I say basic, I mean that this is just an animation layer that just
moves, it's more for decoration. But I like them alot and have incorporated
them into 2 of my skins. If you have downloaded my skin "Simplicity" then
you would have seen an example of this in the simplicity laser layer at the
lower right hand corner of the skin.
The basic information here applys to all layers.
This requires you to edit the two xml files.
The normal file and elements file of the component you are adding the animation to.
Animation images are created as vertical strips, see example .png.
This is the code for the elements.xml file.
<bitmap id="Staranimation" file="player/Staranimation.png"/>
The code above identifies the actual png file and correlates it
to the normal xml file.
This is the code for the normal.xml file
<AnimatedLayer
id="Staranimation"
x="282" y="43"
w="25" h="25"
frameHeight="25"
image="Staranimation"
move="1"
speed="300"
autoplay="1"
autoreplay="1"
/>
Lets look at the code above.
animated layer id="staranimation"
This tells the xml parser to call the bitmap id from the elements.xml
from the other code above.
x="282" y="43"
w="25" h="25"
These are the basic coordinates for the placement of the animation.
frameHeight="25"
This sets the height of the frame for the animation.
Our star example is three frames 25x25 pixels.
Therefore our frameheight is 25 pixels.
If this is not set properly your animation will skip frames.
image="Staranimation"
This also calls the .png file and identifies the file.
move="1"
As with all layers, this part of the code determines weather or not
the layer can be used to move the window in focus when you click and drag
the skin.
move="1" Will allow the layer to be clicked and move the skin.
Changing this to "0" will disallow this option.
speed="300"
This sets the frame speed of the animation.
The code runs from "1" to "1000"
"1000" being faster and lesser numbers slower.
It is determined in miliseconds.
autoplay="1"
[explanation needed]
autoreplay="1"
[explanation needed]
Also there is a ghost option for all layers. This decides weather or not a layer
Is clickthough or not.
[explanation needed]
Created by Pixelpusher
|