PDA

Volledige versie bekijken : Hoe kan ik geluid meermaals laten herhalen?


joris@7de.be
%Europe/Berlin %961 %2005, 00:05
Hey, ik gebruk de volgende code om geluid in te laden.

firstSound = new Sound();
firstSound.loadSound("http://www.onlineonline.be/muziek.mp3", true);
firstSound.start();

Wat moet ik doen om het te laten herhalen? nu speelt hij het 1 keer af en dat is het..

Ik gebruik nu deze code omdat ik eerst gewoon op een tijdslijn het geluid liet afspelen maar dan gaat de site supertraag ( www.onlineonline.be )
Doe ik het met dit dan gaat het vlot (voorlopig: www.online.be/rad )

Met vriendelijke groeten
Joris

Dauntless
%Europe/Berlin %014 %2005, 01:20
Ik werk zelden met het Sound object en weet er dan ook niets van... Maar die helpfiles zijn echt handig!! (hint hint ;)).


Sound.start()
Availability
Flash Player 5.

Usage
my_sound.start([secondOffset:Number, loop:Number]) : Void

Dus iets van:

firstSound = new Sound();
firstSound.loadSound("http://www.onlineonline.be/muziek.mp3", true);
firstSound.start(0, 99e99);

Nu zal hij toch al 99^99keer afspelen, wat toch wel heel veel is...
Er is waarschijnlijk wel een betere manier, maar zoals ik al zei: ik werk zelden met het Sound object.

Justinski
%Europe/Berlin %685 %2005, 17:26
Bij mij speelt ie uhm nog steeds 1 x af terwijl ik deze code heb. :confused:

on (press) {
firstSound = new Sound();
firstSound.loadSound("http://www.onlineonline.be/muziek.mp3", true);
firstSound.start(0, 99e99);
}



(btw ik gebruik je mp3tje om te testen, mag toch wel? :I )

Ultim-o
%Europe/Berlin %734 %2005, 18:37
firstSound = new Sound();
firstSound.onSoundComplete = function()
{
this.start();
};
firstSound.loadSound("http://www.onlineonline.be/muziek.mp3", true);

Justinski
%Europe/Berlin %775 %2005, 19:36
firstSound = new Sound();
firstSound.onSoundComplete = function()
{
this.start();
};
firstSound.loadSound("http://www.onlineonline.be/muziek.mp3", true);
dit werkt wel :D
alleen hoe krijg ik dat 'on press' eromheen, want ik snap dat niet echt :I

Ultim-o
%Europe/Berlin %442 %2005, 11:36
var firstSound = new Sound();
firstSound.onSoundComplete = function()
{
this.start();
};

_btn.onPress = function()
{
firstSound.loadSound("http://www.onlineonline.be/muziek.mp3", true);
};