Chaining animations
This code snippet demonstrates how to change animations defined as programs in .edc files.
collections {
group { name: "main";
parts {
part {
name: "square_left";
type: RECT;
description{
state: "default" 0.0;
color: 100 200 200 255;
rel1.relative: 0.2 0.4;
rel2.relative: 0.2 0.4;
rel2.offset: 100 100;
}
description{
state: "large" 0.0;
inherit: "default" 0.0;
rel1.offset: -25 -25;
rel2.offset: 125 125;
}
}
part {
name: "square_right";
type: RECT;
description{
state: "default" 0.0;
color: 200 200 100 255;
rel1.relative: 0.6 0.4;
rel2.relative: 0.6 0.4;
rel2.offset: 100 100;
}
description{
state: "large" 0.0;
inherit: "default" 0.0;
rel1.offset: -25 -25;
rel2.offset: 125 125;
}
}
}
programs {
program {
name: "animation, state0";
signal: "animation,play";
source: "animation";
action: STATE_SET "large" 0.0;
transition: LINEAR 0.3;
target: "square_left";
after: "animation, state1";
}
program {
name: "animation, state1";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.3;
target: "square_left";
after: "animation, state2";
}
program {
name: "animation, state2";
action: STATE_SET "large" 0.0;
transition: LINEAR 0.3;
target: "square_right";
after: "animation, state3";
}
program {
name: "animation, state3";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.3;
target: "square_right";
}
}
}
}