B
BORINSHTEIN
Прохожие
- Автор темы
- #1
Здравствуйте. Не разобрался как кидать в этот плеер свой музон?
Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Смотри.BORINSHTEIN написал(а):Здравствуйте. Не разобрался как кидать в этот плеер свой музон?
Там нет ничего сложного.BORINSHTEIN написал(а):Все, не миновать изучения Flash'a )))
Давно надо было! А сейчас убедился в этом на все сто! Огромное спасибо! :tcl:
Сейчас попробую, если что буду мучать =) ---0
========================== СПАСИБО ===================
// mysound.setVolume(10);
track = playlist.firstChild.firstChild.childNodes[mynum].childNodes[1].firstChild;
// track = playlist.firstChild.childNodes[(mynum)].attributes.name;
mysound = new Sound();
if (lowbit) {
pre = "http://www.mjau-mjau.com/promo/XPweb/mp3/56k/";
trackPreName = String(track).substr(0, (String(track).length-4));
track = trackPreName+"56k.mp3";
mysound.loadSound((pre+track), true);
} else {
pre = "http://www.mjau-mjau.com/promo/XPweb/mp3/";
mysound.loadSound((pre+track), true);
}
mysound.onSoundComplete = function() {
nextfunction();
};
//listlength = playlist.firstChild.firstChild.childNodes.length;
listlength = playlist.firstChild.firstChild.childNodes.length;
//ypos = as.audioselecter.element0._y;
pressed = 0;
gap = 1;
sbheight = 26;
sbwidth = 200;
textpad = 4;
current = 0;
c = 0;
//myvol = 100;
vmargin = 30;
hmargin = 20;
Amenu = false;
//myvol=100;
MovieClip.prototype.AmenuRem = function() {
playbar.trigmove(((_global.stagex-780)/2), (_global.stagey-100));
as.removeMovieClip();
albclip.removeMovieClip();
for (i=1; i<(linetext.length+1); i++) {
this["trackmovie"+i].removeMovieClip();
}
};
MovieClip.prototype.AmenuAdd = function() {
playbar.trigmove(0, 0);
trackinfo();
asfunc();
};
MovieClip.prototype.toggleAmenu = function(boolean) {
_global.stagex = Stage.width;
_global.stagey = Stage.height;
if (boolean == 2) {
Amenu = !Amenu;
if (Amenu) {
AmenuAdd();
_root.xpcontent.gotoAndStop(3);
} else {
AmenuRem();
_root.xpcontent.gotoAndStop(_root.currentContent);
}
} else if (boolean) {
if (!Amenu) {
Amenu = !Amenu;
AmenuAdd();
}
} else if (!boolean) {
if (Amenu) {
Amenu = !Amenu;
AmenuRem();
}
}
};
MovieClip.prototype.asfunc = function() {
attachMovie("as", "as", 99);
c = 0;
ypos = as.audioselecter.element0._y;
as.head.text = "AUDIOTRACK PLAYLIST";
as._x = 15;
as._y = 133;
as.audioselecter.element0.asbutton._width = sbwidth;
as.audioselecter.element0.asbutton._height = sbheight;
as.audioselecter.element0.tf._width = sbwidth;
as.audioselecter.element0.tf._height = sbheight;
as.mask._height = 9*(sbheight+gap);
as.mask._width = sbwidth;
as.hit._visible = 0;
as.hit._x = as.mask._x-hmargin;
as.hit._width = as.mask._width+hmargin*2;
as.hit._y = as.mask._y-vmargin;
as.hit._height = as.mask._height+vmargin*2;
mid = as.mask._height/2;
newwidth = as.mask._width;
newheight = as.mask._height;
//mytrack = playlist.firstChild.firstChild.childNodes[c].childNodes[1].firstChild.nodeValue;
buttoncontent = function () {
as.audioselecter["element"+c].asbutton._width = sbwidth;
as.audioselecter["element"+c].asbutton._height = sbheight;
as.audioselecter["element"+c].tf._width = sbwidth-(textpad*2);
as.audioselecter["element"+c].tf._height = sbheight-(textpad*2);
as.audioselecter["element"+c].tf._x = textpad;
as.audioselecter["element"+c].tf._y = textpad;
as.audioselecter["element"+c].tf.html = true;
as.audioselecter["element"+c].tf.htmlText = (c+1)+". "+playlist.firstChild.firstChild.childNodes[c].childNodes[0].firstChild+"<br><br>More track info";
// +playlist.firstChild.firstChild.childNodes[(c)].childNodes[1].firstChild.nodeValue;
// as.audioselecter["element"+c].name = (c+1)+". "+playlist.firstChild.firstChild.childNodes[(c)].childNodes[0].firstChild.nodeValue+"<br>"+playlist.firstChild.firstChild.childNodes[(c)].childNodes[1].firstChild.nodeValue;
as.audioselecter["element"+c].asbutton.mynum = c;
as.audioselecter["element"+c].asbutton.onPress = function() {
pressed = 1;
startDrag(as.audioselecter, false, 0, 0, 0, -as.audioselecter._height);
};
as.audioselecter["element"+c].asbutton.onRelease = function() {
// mytrack = playlist.firstChild.firstChild.childNodes[this.mynum].childNodes[1].firstChild.nodeValue;
ssound = new Sound();
ssound.attachSound("button5");
ssound.start();
current = this.mynum;
getsound(this.mynum);
setinfo();
// trackinfo();
stopDrag();
// this._visible = 0;
};
// |as.audioselecter["element"+c].asbutton.useHandCursor = false;
as.audioselecter["element"+c].asbutton.onRollOver = function() {
setfx("button5");
this.mycol = new Color(this);
this.onEnterFrame = function() {
// this.vc++;
// this.bbool = !this.bbool;
this.ac += 20;
this.mycol.setTransform({rb:this.ac, gb:this.ac, bb:this.ac});
if (this.ac>=150) {
delete this.onEnterFrame;
}
};
// };
// this._alpha = 40;
};
as.audioselecter["element"+c].asbutton.onRollOut = function() {
this.onEnterFrame = function() {
// this.vc++;
// this.bbool = !this.bbool;
this.ac -= 20;
this.mycol.setTransform({rb:this.ac, gb:this.ac, bb:this.ac});
if (this.ac<=0) {
delete this.onEnterFrame;
}
};
};
as.audioselecter["element"+c].asbutton.onDragOut = function() {
this.onEnterFrame = function() {
// this.vc++;
// this.bbool = !this.bbool;
this.ac -= 20;
this.mycol.setTransform({rb:this.ac, gb:this.ac, bb:this.ac});
if (this.ac<=0) {
delete this.onEnterFrame;
}
stopDrag();
};
};
};
buttoncontent();
for (c=1; c<(listlength); c++) {
as.audioselecter.element0.duplicateMovieClip(("element"+c), c);
ypos += (sbheight+gap);
as.audioselecter["element"+c]._y = ypos;
buttoncontent();
}
k = ((as.audioselecter._height-as.mask._height)/as.mask._height);
addit = (k*vmargin*2)/as.mask._height;
k += addit;
as.mask.onMouseMove = function() {
if (as.hit.hitTest(_root._xmouse, _root._ymouse, true)) {
if (hit ne 1) {
as.onEnterFrame = function() {
//yset = (-this._ymouse+mid)/20;
//yspeed += (yset-yspeed)/3;
//this.audioselecter._y += Math.round(yspeed);
if (hit == 1) {
yset += (this._ymouse-yset)/5;
}
if (pressed == 0) {
this.audioselecter._y += Math.round((-((yset-vmargin)*k)-this.audioselecter._y)/10);
}
if (this.audioselecter._y>0) {
this.audioselecter._y = 0;
} else if (this.audioselecter._y<-(this.audioselecter._height-as.mask._height)) {
this.audioselecter._y = -(this.audioselecter._height-as.mask._height);
}
dis = Math.abs(this._ymouse-yset);
if (dis<1) {
if (hit == 0) {
delete as.onEnterFrame;
}
}
};
hit = 1;
}
} else if (hit == 1) {
hit = 0;
}
};
i = 0;
};
//name = playlist.firstChild.childNodes[(i)].attributes.name;
//desc = playlist.firstChild.childNodes[(i)].attributes.name;
getsound = function (mynum) {
buff.onEnterFrame = function() {
bcount++;
scale = ((bcount/31)*100)/_soundbuftime;
buff.bar._xscale = scale;
if (scale>=100) {
bcount = 0;
delete buff.onEnterFrame;
}
};
delete albclip.onEnterFrame;
for (i=1; i<6; i++) {
this["trackmovie"+i].removeMovieClip();
}
mysound.stop();
// mysound.setVolume(10);
track = playlist.firstChild.firstChild.childNodes[mynum].childNodes[1].firstChild;
// track = playlist.firstChild.childNodes[(mynum)].attributes.name;
mysound = new Sound();
if (lowbit) {
pre = "http://www.mjau-mjau.com/promo/XPweb/mp3/56k/";
trackPreName = String(track).substr(0, (String(track).length-4));
track = trackPreName+"56k.mp3";
mysound.loadSound((pre+track), true);
} else {
pre = "http://www.mjau-mjau.com/promo/XPweb/mp3/";
mysound.loadSound((pre+track), true);
}
mysound.onSoundComplete = function() {
nextfunction();
};
state = "play";
setvol(myvol);
trackinfo();
};
total.onEnterFrame = function() {
myvolt = mysound.getVolume();
this.myload = mysound.getBytesLoaded();
this.mytotal = mysound.getBytesTotal();
this.percent = (this.myload/this.mytotal)*100;
this.bar._xscale = this.percent;
//if (this.percent == 100) {
//this.swapDepths(1001);
//this.removeMovieClip();
//}
};
playtime.onEnterFrame = function() {
this.mypos = (mysound.position/mysound.duration)*100;
this.bar._xscale = this.mypos;
};
timer = function () {
audioload = mysound.getBytesLoaded();
audiototal = mysound.getBytesTotal();
audiopercent = Math.round((audioload/audiototal)*100);
seconds = mysound.position/1000;
minutes = Math.floor(seconds/60);
sec = Math.floor(seconds-(minutes*60));
if (sec<10) {
sec = "0"+sec;
}
tpos = minutes+":"+sec;
seconds = mysound.duration/1000;
minutes = Math.floor(seconds/60);
sec = Math.floor(seconds-(minutes*60));
if (sec<10) {
sec = "0"+sec;
}
if (audiopercent<100) {
tdurload = " (Caching...)";
} else {
tdurload = "";
}
tdur = minutes+":"+sec+tdurload;
temptrack1 = pretext[0]+": "+linetext[0];
temptrack2 = temptrack1;
// .toUpperCase();
trackmovie1.black.htmlText = temptrack2+" <b>"+tpos;
trackmovie1.white.htmlText = temptrack2+" <b>"+tpos;
trackmovie2.black.htmlText = "Duration:<b> "+tdur;
trackmovie2.white.htmlText = "Duration:<b> "+tdur;
if (mainover != 1) {
name = (current+1)+". "+playlist.firstChild.firstChild.childNodes[current].childNodes[0].firstChild+" "+tpos;
}
};
timer();
setInterval(timer, 1000);
playbar.playb.useHandCursor = false;
playbar.stopb.useHandCursor = false;
playbar.prevb.useHandCursor = false;
playbar.nextb.useHandCursor = false;
mybsound = new Sound();
mybsound.attachSound("button5");
playbar.playb.onPress = function() {
playbar.equalizer.eqrun();
if (state != "play") {
getsound(current);
state = "play";
}
};
playbar.playb.onRollOver = function() {
if (state != "play") {
bovers(":: Play Track");
} else {
bovers(":: Track is currently playing");
}
mybsound.start();
this.onEnterFrame = function() {
vc++;
bbool = !bbool;
this._alpha = 100*bbool;
if (vc == 6) {
this._alpha = 100;
vc = 0;
delete this.onEnterFrame;
}
};
this.gotoAndPlay(2);
};
playbar.playb.onRollOut = function() {
setinfo();
this.gotoAndPlay(6);
};
playbar.stopb.onPress = function() {
playbar.equalizer.eqstop();
if (state != "stop") {
mysound.stop();
state = "stop";
}
};
playbar.stopb.onRollOver = function() {
if (state == "play") {
bovers(":: Stop Track");
} else {
bovers(":: Track is Stopped");
}
mybsound.start();
this.onEnterFrame = function() {
vc++;
bbool = !bbool;
this._alpha = 100*bbool;
if (vc == 6) {
this._alpha = 100;
vc = 0;
delete this.onEnterFrame;
}
};
this.gotoAndPlay(2);
};
playbar.stopb.onRollOut = function() {
setinfo();
this.gotoAndPlay(6);
};
playbar.prevb.onPress = function() {
if (current == 0) {
current = listlength;
}
current--;
getsound(current);
setinfo();
};
playbar.prevb.onRollOver = function() {
bovers(":: Play Previous Track");
mybsound.start();
this.onEnterFrame = function() {
vc++;
bbool = !bbool;
this._alpha = 100*bbool;
if (vc == 6) {
this._alpha = 100;
vc = 0;
delete this.onEnterFrame;
}
};
this.gotoAndPlay(2);
};
playbar.prevb.onRollOut = function() {
setinfo();
this.gotoAndPlay(6);
};
nextfunction = function () {
current++;
if (current == listlength) {
current = 0;
}
getsound(current);
setinfo();
};
playbar.nextb.onPress = function() {
setinfo();
nextfunction();
};
playbar.nextb.onRollOver = function() {
bovers(":: Play Next Track");
mybsound.start();
this.onEnterFrame = function() {
vc++;
bbool = !bbool;
this._alpha = 100*bbool;
if (vc == 6) {
this._alpha = 100;
vc = 0;
delete this.onEnterFrame;
}
};
this.gotoAndPlay(2);
};
playbar.nextb.onRollOut = function() {
setinfo();
this.gotoAndPlay(6);
};
setinfo = function () {
delete this.onEnterFrame;
name = (current+1)+". "+playlist.firstChild.firstChild.childNodes[current].childNodes[0].firstChild;
// desc = playlist.firstChild.childNodes[(current)].attributes.name+" and more information here. Add mp3 ID tags? Audiotrack related detailed information";
mainover = 0;
};
bovers = function (mytext) {
mainover = 1;
name = mytext;
mybool = 0;
this.onEnterFrame = function() {
boverscounter++;
mybool = !mybool;
if (mybool == 1) {
name = mytext;
} else {
name = "";
}
if (boverscounter == 6) {
boverscounter = 0;
name = mytext;
delete this.onEnterFrame;
}
};
};
setinfo();
mysound.onSoundComplete = function() {
nextfunction();
};
MovieClip.prototype.setvol = function(vol) {
mysound.setVolume(vol);
};
this.onMouseUp = function() {
pressed = 0;
};
MovieClip.prototype.bitbut = function(mt, lowbitbool) {
this.mytf.htmlText = mt;
this.onRollOver = function() {
if (lowbitbool != lowbit) {
this.useHandCursor = true;
this.mytf.htmlText = "<u>"+mt;
} else {
this.useHandCursor = false;
}
};
this.onRollOut = function() {
if (!this.active) {
this.mytf.htmlText = mt;
}
};
this.onPress = function() {
if (lowbitbool != lowbit) {
bitratepointer.onEnterFrame = function() {
this.counter++;
this._alpha = random(101);
if (this.counter == 10) {
this.counter = 0;
this._alpha = 100;
delete this.onEnterFrame;
}
};
this._parent.bitratepointer._y = this._y;
lowbit = !lowbit;
getsound(current);
this.useHandCursor = false;
}
};
this.onDragOut = this.onRollOut;
};
lowbit = false;
playbar.set56.bitbut("56 KBIT/s", true);
playbar.set192.bitbut("192 KBIT/s", false);
//trackinfo();
_soundbuftime = 2;
toggleAmenu(1);
getsound(current);
//trackinfo();
во спасибо за совет оставить путь в исходнике пустым!Zeratul написал(а):Смотри.
Открываешь его флешем(сам исходник).
Лезешь там ищёшь элементы с экшнскриптами.
В экшнскрипте меняешь ссылку до папки с MP3 файлами.
Если пусть стереть и оставить переменную пустой, то ты сможешь в XML файле писать полный пусть с http
Вот и всё
Так тут строчку надо удлаять (ту что писал в предыдущем моем посте) или какую-то другу.Yurassik написал(а):во спасибо за совет оставить путь в исходнике пустым!
чтоб каждый раз в исходник не лазить.
вот только интересно, почему после создания новой флешки размер ее почти в 2 раза становится больше, чем та, которая в архиве. вроде ничего не добавлял и не убавлял в самом исходнике, кроме этой строки.
я так понял, что ты все понял )))BORINSHTEIN написал(а):Так тут строчку надо удлаять (ту что писал в предыдущем моем посте) или какую-то другу.