[Solved] I want to change x axis of image:
-
I implement following code in qt qml:
@
Image {
id: img
x: 0
y: 19
source: "images/bubble.png"SequentialAnimation on y { loops: Animation.Infinite NumberAnimation { from:10; to: 640; easing.type: Easing.InCirc; duration: 8000 } PauseAnimation { duration: 200 } } }
@
after completing animation on y axis i want to generate random number and pass it to the x of the image plz help;
-
Your animation won
t finish. It
s infinite. I suppose you want to change x after Number or Pause animation. You can use "ScriptAction":http://doc.qt.nokia.com/4.7-snapshot/qml-scriptaction.html@
ScriptAction {
script: img.x = Math.random() * MaxX
}
@where MaxX is maximum x value that picture can have.
-
Thanks task_struct:
its workinggggggg :) -
One more thing task_struct it is posible to set animated gif as a background in my qml page.
-
Yes. See "AnimatedImage":http://doc.qt.nokia.com/4.7-snapshot/qml-animatedimage.html