Animation on changing image source
-
wrote on 23 Feb 2012, 15:25 last edited by
Hi all,
I have this QML:
@
...
property int count_img_attuale:0
...
Image {
id: immagineanchors.fill: parent source: "file:" + fileNameList[count_img_attuale] }
...
...
@when I change the value of count_img_attuale I get a new Image showing.
Is there a way to animate the new Image showing?
I'm thinking on a fade in and fade out or similar... -
wrote on 23 Feb 2012, 15:53 last edited by
I would use onCount_img_attuale to set a new state with all transformations you want, including the source of immagine ;) !
-
wrote on 23 Feb 2012, 21:01 last edited by
Hi,
Once you change something in @"file:" + fileNameList[count_img_attuale]@, new image will be loaded and you won't be able to make fade out animation. So you need "double buffering" - two Image elements on same place.
When count_img_attuale is changed set back one to new source and start parallel animations for opacities of two images ( old one from 1 to 0 and new one from 0 to 1 )
-
wrote on 24 Feb 2012, 07:11 last edited by
true
3/4