Volledige versie bekijken : music player
florisbas
%Europe/Berlin %581 %2005, 14:57
Beste Mensen,
Ik heb in mn flash file verschillende scene s met daarin een flash music player.
Als ik switch van scene heb ik het probleem dat mn music player ook weer opnieuw
begint te draaien.
Weet iemand misschien hoe ik dit op een simpele manier kan oplossen?
Groet,
Fred
Cowerd
%Europe/Berlin %594 %2005, 15:15
als je naar de anderescene gaat dit:
_root.plek = jouwlied._sound.position;
en bij de musicplayer in de andere scene verdergaan op die plek
florisbas
%Europe/Berlin %635 %2005, 16:14
Zou je dit iets uitgebreider willen uitleggen.
momenteel heb ik dit.
// initialize variables
whichSound = 1;
playing = false;
looping = false;
//
// create an instance of the Sound object
mySound = new Sound();
//
initialize(1);
function initialize(whichSound) {
mySound.stop();
mySound.loadSound("sounds/sound"+whichSound+".mp3", false);
newPosition = 0;
playing = false;
input = whichSound;
transport.fader._x = transport.left;
}
//
// previuos and next buttons
next.onPress = function() {
if (whichSound<3) {
whichSound++;
initialize(whichSound);
}
};
back.onPress = function() {
if (whichSound>1) {
whichSound--;
initialize(whichSound);
}
};
//
// when selected sound reaches the end...
mySound.onSoundComplete = function() {
//mysound.stop();
newPosition = mySound.duration/1000;
if (looping) {
mySound.start(0, 1);
} else {
playing = false;
}
};
//
this.onEnterFrame = function() {
// limit input field
if (input>3) {
input = 3;
}
//
// initiate change to new sound when Enter key is pressed
if (Key.isDown(Key.ENTER) && whichSound != input) {
whichSound = input;
initialize(whichSound);
}
};
//
// if a number is entered in the input field but Enter is not pressed, change
// back to current sound number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichSound;
};
Alvast bedankt,
Fred
Ultim-o
%Europe/Berlin %674 %2005, 17:10
Beste Mensen,
Ik heb in mn flash file verschillende scene s met daarin een flash music player.
Als ik switch van scene heb ik het probleem dat mn music player ook weer opnieuw
begint te draaien.
Weet iemand misschien hoe ik dit op een simpele manier kan oplossen?
Groet,
Fred
Zorg gewoon dat je geen scenes gebruikt, dat brengt alleen maar problemen met zich mee....
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.