aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/imageelements/spritesequence.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/imageelements/spritesequence.qml')
-rw-r--r--examples/quick/imageelements/spritesequence.qml26
1 files changed, 21 insertions, 5 deletions
diff --git a/examples/quick/imageelements/spritesequence.qml b/examples/quick/imageelements/spritesequence.qml
index 6cd97dee74..d578700195 100644
--- a/examples/quick/imageelements/spritesequence.qml
+++ b/examples/quick/imageelements/spritesequence.qml
@@ -6,20 +6,36 @@ Item {
width: 320
height: 480
MouseArea {
- onClicked: anim.start();
+ onClicked: anim.start()
anchors.fill: parent
}
//! [animation]
SequentialAnimation {
id: anim
- ScriptAction { script: image.goalSprite = "falling"; }
- NumberAnimation { target: image; property: "y"; to: 480; duration: 12000; }
- ScriptAction { script: {image.goalSprite = ""; image.jumpTo("still");} }
- PropertyAction { target: image; property: "y"; value: 0 }
+
+ ScriptAction { script: image.goalSprite = "falling" }
+ NumberAnimation {
+ target: image
+ property: "y"
+ to: 480
+ duration: 12000
+ }
+ ScriptAction {
+ script: {
+ image.goalSprite = ""
+ image.jumpTo("still")
+ }
+ }
+ PropertyAction {
+ target: image
+ property: "y"
+ value: 0
+ }
}
//! [animation]
SpriteSequence {
id: image
+
width: 256
height: 256
anchors.horizontalCenter: parent.horizontalCenter