###################################################
#
# Sound : embed Wav file and control it (+/-)
#
# technoargia - avril 2006
#
###################################################
.flash filename=embed_sound.swf bbox=autocrop
.box fond width=200 height=50 color=gray fill=white line=2
.box button_idle width=20 height=60 color=blue fill=salmon line=5
.box button_hover width=20 height=60 color=red fill=salmon line=6
.box button_pressed width=20 height=60 color=gray fill=salmon line=5
.sound son "yahoo.wav"
.outline o_arrow:
M 60.208843,38.698967
L 97.86712,38.698967
C 97.86712,38.698967 96.176907,25.416467 101.5254,22.698967
C 106.94202,19.946851 132.17198,46.056049 131.84195,55.551743
C 131.50046,65.377079 105.79971,91.679067 101.5254,88.404518
C 97.332023,85.191969 97.86712,72.404518 97.86712,72.404518
L 60.208843,72.404518
C 57.438843,72.404518 55.208843,70.174518 55.208843,67.404518
L 55.208843,43.698967
C 55.208843,40.928967 57.438843,38.698967 60.208843,38.698967 z
.end
.outline o_speaker:
M 159.99992,40.126861
L 176.0188,40.126861
C 177.33578,40.126861 201.21739,13.274048 201.21739,14.89918
L 201.21739,103.14777
C 201.21739,103.14777 177.33578,76.746709 176.0188,76.746709
L 159.99992,76.746709
C 158.68294,76.746709 157.6227,75.43839 157.6227,73.813258
L 157.6227,43.060312
C 157.6227,41.43518 158.68294,40.126861 159.99992,40.126861 z
.end
.filled speaker_idle outline=o_speaker fill=#3366ff color=navy line=4
.filled speaker_hover outline=o_speaker fill=#336699 color=salmon line=4
.filled speaker_pressed outline=o_speaker fill=#4466ff color=red line=3
.filled arrow_idle outline=o_arrow fill=#3366ff color=navy line=4
.filled arrow_hover outline=o_arrow fill=#336699 color=salmon line=4
.filled arrow_pressed outline=o_arrow fill=#4466ff color=red line=3
.button plus
.show arrow_idle as=idle
.show arrow_idle as=area
.show arrow_hover as=hover
.show arrow_pressed as=pressed
# ActionScript
.on_release:
if (i < 100) {
monSon.setVolume(i++);
}
.end
.end
.button moins
.show arrow_idle as=idle
.show arrow_idle as=area
.show arrow_hover as=hover
.show arrow_pressed as=pressed
# ActionScript
.on_release:
if (i > 0) {
monSon.setVolume(--i);
}
.end
.end
.button speaker
.show speaker_idle as=idle
.show speaker_idle as=area
.show speaker_hover as=hover
.show speaker_pressed as=pressed
# ActionScript
.on_release:
monSon.Start();
.end
.end
.action:
monSon = new Sound();
monSon.attachSound("son");
monSon.setVolume(10);
var i = 10;
.end
.put fond
.put speaker pin=center x=20 y=23 scale=40% alpha=50%
.put moins pin=center x=60 y=25 scale=40% alpha=50% rotate=180
.put plus pin=center x=100 y=25 scale=40% alpha=50% rotate=0
.end