|
Gracias por la ayuda pero sigo sin solucionar mi problema. He mirado en muchas webs y foros pero nada de nada.
Dejo por aqui el codigo del reproductor:
function loadData(success) { this; if (success) { aPath = new Array(); songTitel = new Array(); audioTracks = new Array(); audioTracks = this.firstChild.childNodes; song_total = audioTracks.length; var __reg1 = 0; while (__reg1 < song_total) { aPath.push(audioTracks[__reg1].attributes.path); songTitel.push(audioTracks[__reg1].attributes.title); bot.playlist.btn.duplicateMovieClip("btn" + __reg1, __reg1); bot.playlist["btn" + __reg1]._y = bot.playlist.btn._y + __reg1 * int(bot.playlist.btn._height) + __reg1; bot.playlist["btn" + __reg1].txt = checkDigits(__reg1 + 1) + ". " + songTitel[__reg1]; bot.playlist["btn" + __reg1].hit.onPress = function () { listClick(this._parent.getDepth() + 1); } ; ++__reg1; } } delete audioTracks; delete data_xml; playSong(); } function listClick(prm) { delete pausepos; current_song = prm; MySound.stop(); playSong(); } function playSong() { this; AudioPath = aPath[current_song - 1]; if (pausePos > 0) { MySound.start(pausePos, 0); pausePos = 0; } else { MySound = new Sound(); MySound.setVolume(volume); MySound.loadSound(AudioPath, true); MySound.onSoundComplete = function () { top.equalizer._visible = 0; current_song == song_total ? (current_song = 1) : current_song++; playSong(); } ; top.track_load.onEnterFrame = function () { this; total = this._parent._parent.MySound.getBytesTotal(); geladen = this._parent._parent.MySound.getBytesLoaded(); if (geladen != total) { this._parent.load_display = Math.round(geladen * 100 / total) + "% Loaded"; this._xscale = Math.round(geladen * 100 / total); return; } this._xscale = 100; delete this.onEnterFrame; delete this._parent.load_display; } ; } play_btn._visible = 0; pause_btn._visible = 1; top.equalizer._visible = 1; } function checkDigits(toCheck) { var __reg1 = toCheck; return __reg1 >= 10 ? __reg1 : (__reg1 = "0" + __reg1); } function scrollTitle() { top.title.txt.autoSize = true; if (songTitel[current_song - 1].length > 20) { top.title.txt.text = songTitel[current_song - 1] + " " + songTitel[current_song - 1]; top.title._x + top.title._width / 2 + 4 >= top.title_mask._x ? top.title._x-- : (top.title._x = top.title_mask._x); return; } top.title.txt.text = songTitel[current_song - 1]; top.title._x = top.title_mask._x - 3; } Stage.showMenu = false; Stage.scaleMode = "noScale"; stop(); ShowPlaylist = _root.ShowPlaylist; ShowEQ = _root.ShowEQ; current_song = Number(_root.firstTrack); volume = Number(_level0.initVol); vol_front._width = volume; top.equalizer._yscale = volume; playlist = _root.playList; data_xml = new XML(); data_xml.ignoreWhite = true; data_xml.onLoad = loadData; data_xml.load(playlist); bot.list_bg.onEnterFrame = function () { this; if (hitTest(_root._xmouse, _root._ymouse, true) && this._parent.playlist._height > this._height) { ymin = this._y + this._height - this._parent.playlist._height; ymax = this._y + 3; conv = (this._ymouse - 15) * 1.3 / this._height; conv <= 1 ? null : (conv = 1); conv >= 0 ? null : (conv = 0); this._parent.playlist.easeY(ymax - conv * (ymax - ymin)); } } ; bot.playlist.setMask(bot.list_bg); play_btn.onRelease = function () { playSong(); } ; pause_btn.onRelease = function () { this._visible = 0; play_btn._visible = 1; pausePos = MySound.position / 1000; MySound.stop(); top.equalizer._visible = 0; } ; next_btn.onRelease = function () { delete pausepos; current_song == song_total ? (current_song = 1) : current_song++; MySound.stop(); playSong(); } ; prev_btn.onRelease = function () { delete pausepos; current_song == 1 ? (current_song = song_total) : current_song--; MySound.stop(); playSong(); } ; if (ShowEQ == true) { top.setMask(top_mask); toppos = top._y; top.easeY(toppos); topup = false; display_btn._rotation = display_btn._rotation + 180; } else { top.setMask(top_mask); toppos = top._y; top._y = int(toppos + top_mask._height - 29); topup = true; } display_btn.onPress = function () { if (topup == true) { top.easeY(toppos); topup = false; } else { top.easeY(int(toppos + top_mask._height - 27)); topup = true; } this._rotation = this._rotation + 180; } ; if (ShowPlaylist == true) { bot.setMask(bot_mask); botpos = bot._y; bot.easeY(botpos); botup = false; list_btn._rotation = list_btn._rotation + 180; } else { bot.setMask(bot_mask); botpos = bot._y; bot._y = botpos - bot.list_bg._height - 6; botup = true; } list_btn.onPress = function () { if (botup == true) { bot.easeY(botpos); botup = false; } else { bot.easeY(botpos - bot.list_bg._height - 6); botup = true; } this._rotation = this._rotation + 180; } ; drag_btn.onPress = function () { startDrag(this._parent, 0); } ; drag_btn.onRelease = drag_btn.onReleaseOutside = function () { stopDrag(); } ; this.onEnterFrame = function () { dur = int(MySound.duration / 1000); pos = int(MySound.position / 1000); playTime = {}; playTime.minutes = int(pos / 60); playTime.seconds = int(pos % 60); playTime.total = checkDigits(playTime.minutes) + ":" + checkDigits(playTime.seconds); trackTime = {}; trackTime.minutes = int(dur / 60); trackTime.seconds = int(dur % 60); trackTime.total = checkDigits(trackTime.minutes) + ":" + checkDigits(trackTime.seconds); if (top.load_display == undefined) { top.display = playTime.total + " / " + trackTime.total; } else { top.display = top.load_display; } if (top.trackDrag != true) { prozent = pos * 100 / dur; top.track_play._xscale = prozent; } } ; top.track_back.onPress = function () { this; this._parent.trackDrag = true; this._parent.track_play.onEnterFrame = function () { this; perc = (this._parent._xmouse - this._parent.track_back._x) / this._parent.track_back._width; max = this._parent.track_load._width / this._parent.track_back._width; perc <= max ? null : (perc = max); perc >= 0.01 ? null : (perc = 0.01); this._width = this._parent.track_back._width * perc; this._parent._parent.pausePos = perc * this._parent._parent.MySound.duration / 1000; } ; } ; top.track_back.onRelease = top.track_back.onReleaseOutside = function () { delete this._parent.track_play.onEnterFrame; this._parent.trackDrag = false; MySound.stop(); playSong(); } ; vol_back.onPress = function () { vol_front.onEnterFrame = function () { perc = (_xmouse - vol_back._x) / vol_back._width; perc <= 0.95 ? null : (perc = 1); perc >= 0.05 ? null : (perc = 0); this._width = vol_back._width * perc; volume = Math.round(perc * 100); MySound.setVolume(volume); top.equalizer._yscale = volume; } ; } ; vol_back.onRelease = vol_back.onReleaseOutside = function () { delete vol_front.onEnterFrame; } ; top.equalizer.setMask(top.eq_mask); top.equalizer.onEnterFrame = function () { ++i; this.graph = this.createEmptyMovieClip("balken" + i, i); this.graph._x = 0; this.graph._y = 0; with (this.graph) { var j = 0; while (j < 35) { z = int(Math.random() * 10 + 5); beginFill(3355443, 40); moveto(j * 6, 0); lineto(j * 6, 0 - z); lineto(4 + j * 6, 0 - z); lineto(4 + j * 6, 0); lineto(i * 6, 0); endFill(); ++j; } i == 3 ? (i = 0) : null; } } ; top.title.setMask(top.title_mask); setInterval(scrollTitle, 40); MovieClip.prototype.easeY = function (t) { this; this.onEnterFrame = function () { this; this._y = int(t - (t - this._y) / 1.5); if (this._y > t - 1 && this._y < t + 1) { delete this.onEnterFrame; } } ; } ;
Es bastante extenso la verda. El código está perfecto sin fallos de sintaxis ni nada, pero al probar la pelicula me aparece lo siguiente:
Error opening URL "file:///C|/Documents%20and%20Settings/Pedro/Escritorio/Nueva%20web%20flash/undefined" Error opening URL "file:///C|/Documents%20and%20Settings/Pedro/Escritorio/Nueva%20web%20flash/undefined"
Mirando por algunas webs e visto algo referente a crear dos archivos xml.... uno que sea config y otro playlist, pero lo he probado también y no hay manera.
Por cierto, gracias a One por responder. Espero que mi problema se resuelva o me volveré loco por que llevo cerca de un mes liado con el fallo que me da el reproductor y ya estoy desesperado.
Gracias de nuevo por adelantado.
|
Por Nidderkum Deejay
Envíale un mensaje privado
|