Comunidad de diseño web y desarrollo en internet online

MP3 hecho en flash no funiona en dreamweaver

Citar            
MensajeEscrito el 09 Feb 2008 04:18 am
Hola amigos

Estoy diseñando una página en dreamweaver y en la sección dedicada a la música le agragué un MP3 que construí en flash que utiliza XML para hacer un listado y llamar las canciones. He estado trabanjando en eso por un rato y no he logrado hacerlo funcionar y tampoco consigo nada escrito que me de una guía de como hacerlo. Al parecer el XML no llama a la carpeta donde están las canciones y tampoco abre el listado de canciones que tambien están en la lista del XML. El archivo XML lo coloqué en la misma carpeta donde tengo todo (root del sitio). El MP3 funciona en flash perfectamente. Les dejo el código de flash a ver si alguien tiene idea de como se hace.....Gracias de antemano...

Código :

list_comp._alpha = 100;
this._lockroot = true;
album_txt.autoSize = "left";
artist_txt.autoSize = "left";
title_txt.autoSize = "left";
var songInterval:Number;
var amountLoaded:Number;
var mySound:Sound;
var nextTrack:Number;
var tracks_array:Array = new Array();
var totalTracks:Number;
var jukebox_xml:XML = new XML();
jukebox_xml.ignoreWhite = true;
var RootNode:XMLNode;
jukebox_xml.onLoad = function(success:Boolean) {
   if (success) {
      RootNode = this.firstChild;
      totalTracks = RootNode.childNodes.length;
      populateTracksArray();
   } else {
      trace("error loading xml file");
   }
};
jukebox_xml.load("cantante.xml");
function populateTracksArray():Void {
   for (var i:Number = 0; i<totalTracks; i++) {
      tracks_array[i] = RootNode.childNodes[i];
      tracks_array[i].source = RootNode.childNodes[i].attributes.source;
      tracks_array[i].artist = RootNode.childNodes[i].attributes.artist;
      tracks_array[i].album = RootNode.childNodes[i].attributes.album;
      tracks_array[i].title = RootNode.childNodes[i].attributes.title;
   }
   
   playTrack(tracks_array[0].source, tracks_array[0].artist, tracks_array[0].album, tracks_array[0].title, true);
   populateList();
}
function playTrack(source, artist, album, title, stream):Void {
   artist_txt.text = artist;
   album_txt.text = album;
   title_txt.text = title;
   mySound = new Sound();
   mySound.onSoundComplete = function():Void  {
      if (continous_comp.selected) {
         if (list_comp.selectedIndex<(totalTracks-1)) {
            list_comp.selectedIndex += 1;
         } else {
            list_comp.selectedIndex = 0;
         }
         playTrack(tracks_array[list_comp.selectedIndex].source, tracks_array[list_comp.selectedIndex].artist, tracks_array[list_comp.selectedIndex].album, tracks_array[list_comp.selectedIndex].title, true);
      }
   };
   mySound.loadSound(source, stream);
   clearInterval(songInterval);
   songInterval = setInterval(songProgress, 100);
}
function populateList():Void {
   for (var i:Number = 0; i<totalTracks; i++) {
      list_comp.addItem(tracks_array[i].title, tracks_array[i].source);
   }
   _root.list_comp.selectedIndex = 0;
}

var compListener:Object = new Object();
list_comp.addEventListener("change", compListener);
compListener.change = function(info:Object):Void  {
   playTrack(info.target.value, tracks_array[list_comp.selectedIndex].artist, tracks_array[list_comp.selectedIndex].album, tracks_array[list_comp.selectedIndex].title, true);
};

function songProgress():Void {
   amountLoaded = (mySound.getBytesLoaded()/mySound.getBytesTotal());
   progressbars_mc.downloadbar_mc._width = amountLoaded*200;
   progressbars_mc.playback_mc._x = (mySound.position/mySound.duration)*amountLoaded*200;
   position_txt.text = mySound.position;
   duration_txt.text = mySound.duration;
   playback_txt.text = progressbars_mc.playback_mc._x;
}

Por zapata

46 de clabLevel



Genero:Masculino  

Venezuela

firefox
Citar            
MensajeEscrito el 09 Feb 2008 10:06 am
Esto no va aquí.
Hay una sección dedicada en esclusividad a
Flash
Preguntas y ayuda general acerca de Flash, desde MX a 9.

Por El Oso Amoroso

Claber

1780 de clabLevel

6 tutoriales

 

Madrid, España, Europa, Eurasia, La Tierra, Sist.Solar, Vía Láctea, UNIVERSO

firefox
Citar            
MensajeEscrito el 11 Feb 2008 03:15 am
ok Gracias ......Voy pa'ya

Por zapata

46 de clabLevel



Genero:Masculino  

Venezuela

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.