Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. import QtQuick 2.0
  2.  
  3. Image {
  4. id: image
  5. source: "/images/image.png"
  6. anchors { top: screen.top; horizontalCenter: screen.horizontalCenter; margins: 150}
  7. Component.onCompleted: fallingMuffin.start()
  8. SequentialAnimation {
  9. id: fallingImage
  10. running: true
  11. NumberAnimation {
  12. target: image
  13. property: "anchors.margins"
  14. to: 500
  15. duration: 1000
  16. }
  17. NumberAnimation {
  18. target: image
  19. property: "opacity"
  20. to: 0
  21. duration: 500
  22. }
  23. }
  24. NumberAnimation on opacity {
  25. to: 0
  26. duration: 1000
  27. onRunningChanged: {
  28. if(!running) {
  29. console.log("Destroying!");
  30. image.destroy();
  31. gc();
  32. }
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement