I guess you could try using states on the parent element
Item {
AnimatedSprite {
id: title
}
AnimatedSprite {
id: testA
onRunningChanged: if (!running) parent.state = "END1"
}
AnimatedSprite {
id: testB
onRunningChanged: if (!running) parent.state = "END2"
}
state: "START"
states: [
State {
name: "START"
PropertyChanges { target: title; currentFrame: 0 }
PropertyChanges { target: testA; running: true; opacity: 1 }
PropertyChanges { target: testB; running: false; opacity: 0 }
},
State {
name: "END1"
PropertyChanges { target: title; currentFrame: 1 }
PropertyChanges { target: testA; running: false; opacity: 0 }
PropertyChanges { target: testB; running: true; opacity: 1 }
},
State {
name: "END2"
PropertyChanges { target: title; currentFrame: 2 }
PropertyChanges { target: testA; running: false; opacity: 1 }
PropertyChanges { target: testB; running: false; opacity: 0 }
}
]
}
Item {
AnimatedSprite {
id: title
}
AnimatedSprite {
id: testA
onRunningChanged: if (!running) parent.state = "END1"
}
AnimatedSprite {
id: testB
onRunningChanged: if (!running) parent.state = "END2"
}
state: "START"
states: [
State {
name: "START"
PropertyChanges { target: title; currentFrame: 0 }
PropertyChanges { target: testA; running: true; opacity: 1 }
PropertyChanges { target: testB; running: false; opacity: 0 }
},
State {
name: "END1"
PropertyChanges { target: title; currentFrame: 1 }
PropertyChanges { target: testA; running: false; opacity: 0 }
PropertyChanges { target: testB; running: true; opacity: 1 }
},
State {
name: "END2"
PropertyChanges { target: title; currentFrame: 2 }
PropertyChanges { target: testA; running: false; opacity: 1 }
PropertyChanges { target: testB; running: false; opacity: 0 }
}
]
}
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks