summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/tvtennis/click.wavbin3056 -> 0 bytes
-rw-r--r--examples/declarative/tvtennis/paddle.wavbin5320 -> 0 bytes
-rw-r--r--examples/declarative/tvtennis/tvtennis.qml8
3 files changed, 0 insertions, 8 deletions
diff --git a/examples/declarative/tvtennis/click.wav b/examples/declarative/tvtennis/click.wav
deleted file mode 100644
index 26c46f8..0000000
--- a/examples/declarative/tvtennis/click.wav
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tvtennis/paddle.wav b/examples/declarative/tvtennis/paddle.wav
deleted file mode 100644
index 604e0e5..0000000
--- a/examples/declarative/tvtennis/paddle.wav
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml
index 354a16f..c90d9c5 100644
--- a/examples/declarative/tvtennis/tvtennis.qml
+++ b/examples/declarative/tvtennis/tvtennis.qml
@@ -1,5 +1,4 @@
import Qt 4.7
-import Qt.multimedia 4.7
Rectangle {
id: page
@@ -17,17 +16,12 @@ Rectangle {
x: 20; width: 20; height: 20; z: 1
color: "Lime"
- SoundEffect { id: paddle; source: "paddle.wav" }
- SoundEffect { id: wall; source: "click.wav" }
-
// Move the ball to the right and back to the left repeatedly
SequentialAnimation on x {
loops: Animation.Infinite
NumberAnimation { to: page.width - 40; duration: 2000 }
- ScriptAction { script: paddle.play() }
PropertyAction { target: ball; property: "direction"; value: "left" }
NumberAnimation { to: 20; duration: 2000 }
- ScriptAction { script: paddle.play() }
PropertyAction { target: ball; property: "direction"; value: "right" }
}
@@ -37,10 +31,8 @@ Rectangle {
// Detect the ball hitting the top or bottom of the view and bounce it
onYChanged: {
if (y <= 0) {
- wall.play();
targetY = page.height - 20;
} else if (y >= page.height - 20) {
- wall.play();
targetY = 0;
}
}