tidangivelse i mp3-player!
Hej folkens så er jeg tilbage med endnu et spørgsmål til min mp3-player på palermosurf.dkjeg ville så gerne have at man kunne se hvor lang tid der var gået af nummeret!! først en beskrivelse af mp3-playerens opbygning!!
I min mp3-afspiller har jeg en hovedtidlinie og her har jeg placere et mc (instacenavn= radio_mc) der er selve afspilleren dette mc kalder så eksterne swf'er med mp3-filerne (placeret på tidslinien) alt efter hvilken frame man kommer til.
frame 1 kalder har altså scriptet:
loadMovieNum("audio/track1.swf", 11);
jeg har været opfindsom og lavet et laaangt script!
(placeret på radio_mc)
onClipEvent (enterFrame) {
time_currentsec = int(_level11._currentframe / 2);
//fra 0 - 60
if (time_currentsec < 10 ){
time_sec = "0"+time_currentsec+"";
};
if (time_currentsec > 9 && time_currentsec < 60) {
time_sec = int(""+time_currentsec+"");
};
if (time_currentsec == "60"){
time_sec = "00";
};
// fra 60 - 120
if (time_currentsec >60 && time_currentsec < 70){
time_sec = "0("+time_currentsec+"-60)";
};
if (time_currentsec >= 70 && time_currentsec < 120) {
time_sec = ""+time_currentsec+"-60";
};
if (time_currentsec == "120"){
time_sec = "00";
};
// fra 120 - 180
if (time_currentsec < 130 && time_currentsec >120 ){
time_sec = "0("+time_currentsec+"-120)";
};
if (time_currentsec >= 130 && time_currentsec < 180) {
time_sec = ""+time_currentsec+"-120";
};
if (time_currentsec == "180"){
time_sec = "00";
};
// fra 180 - 240
if (time_currentsec < 190 && time_currentsec >180 ){
time_sec = "0("+time_currentsec+"-180)";
};
if (time_currentsec >= 190 && time_currentsec < 240) {
time_sec = ""+time_currentsec+"-180";
};
if (time_currentsec == "240"){
time_sec = "00";
};
// fra 240 - 300
if (time_currentsec < 250 && time_currentsec >240 ){
time_sec = "0("+time_currentsec+"-240)";
};
if (time_currentsec >= 250 && time_currentsec < 300) {
time_sec = ""+time_currentsec+"-240";
};
if (time_currentsec == "300"){
time_sec = "00";
};
// fra 300 - 360
if (time_currentsec < 310 && time_currentsec >300 ){
time_sec = "0("+time_currentsec+"-300)";
};
if (time_currentsec > 310 && time_currentsec < 360) {
time_sec = ""+time_currentsec+"-300";
};
if (time_currentsec == "360"){
time_sec = "00";
};
if (time_currentsec >= 60 && time_currentsec < 120) {
time_min = 1;
};
if (time_currentsec >= 120 && time_currentsec < 180) {
time_min = 2;
};
if (time_currentsec >= 180 && time_currentsec < 240) {
time_min = 3;
};
if (time_currentsec >= 240 && time_currentsec < 300) {
time_min = 4;
};
if (time_currentsec >= 300 && time_currentsec < 360) {
time_min = 5;
};
if (time_currentsec < 60) {
time_min = 0;
};
}
Så har jeg lavet to dynamiske tektsruder med variabelnavne time_sec
og
time_min
nu er problemet bare at når jeg tester filmen viser tekstruden time_sec regnestykket istedet for resultatet!
eks:
ved tiden 1:25
viser time_sec ruden 85-60
