Hi Heini,
i created 2 examples with which i just checked your issue, both work for me. Please try them too and let me know if there are also any issues.
1. Move slider to change the opacity of the LineItem
import VPlay 1.0
import QtQuick 1.1
GameWindow {
id: window
width: 960
height: 640
Scene {
id: mainScene
width: 480
height: 320
Column {
anchors.right: parent.right
width: 200
Text {
text: "opacity "+slider.value
color: "white"
}
Slider {
id: slider
width: parent.width
minimumValue: 0
maximumValue: 1
defaultValue: 1
stepSize: 0.1
}
}
LineItem {
opacity: slider.value
points: [
{"x":100, "y":100},
{"x":300, "y":300}
]
}
}
}
2. The LineItem fades in and out every second
import VPlay 1.0
import QtQuick 1.1
GameWindow {
id: window
width: 960
height: 640
Scene {
id: mainScene
width: 480
height: 320
LineItem {
id: lineItem
points: [
{"x":100, "y":100},
{"x":300, "y":300}
]
Behavior on opacity {
NumberAnimation{duration: 500}
}
}
Timer {
interval: 1000
running: true
repeat: true
onTriggered: {
lineItem.opacity = lineItem.opacity === 0 ? 1 : 0
}
}
}
}
Cheers,
Alex