Foros del Web » Creando para Internet » Flash y Actionscript »

variables estilo player.swf?var1=numero, no se como hacer que las reciba mi swf

Estas en el tema de variables estilo player.swf?var1=numero, no se como hacer que las reciba mi swf en el foro de Flash y Actionscript en Foros del Web. me he bajado un reproductor mp3 y querria que una de las variables que maneja la pudiese dictar yo poniendo de direccion player.sfw?playlist_index=2 (por ejemplo) ...
  #1 (permalink)  
Antiguo 22/11/2011, 11:43
 
Fecha de Ingreso: septiembre-2011
Mensajes: 36
Antigüedad: 12 años, 7 meses
Puntos: 0
variables estilo player.swf?var1=numero, no se como hacer que las reciba mi swf

me he bajado un reproductor mp3 y querria que una de las variables que maneja la pudiese dictar yo poniendo de direccion player.sfw?playlist_index=2 (por ejemplo)


la primera parte nos muestra una serie de declaraciones de variables que no se aplican ya que esta escrito // delante. esas variables si las puedo dictar yo si pongo por ejemplo "player.swf?player_title=tiiiitulochulo"
mas abajo tenemos una nueva declaracion de variables, una de las cuales es track_index (que es la que yo quiero poder modificar), el problema es que si escribo "player.swf?track_index=2" sigue empezando mi playlist desde la primera cancion.

alguna sugerencia de como puedo hacer para poder decirle a mi player cual ha de ser el valor de esa variable?

Código:
stop();
//autoplay=true
//repeat_playlist = true;
//playlist_size = 3;
//player_title = "customizeable title test"
//song_url = "http://downloads.betterpropaganda.com/music/Imperial_Teen-Ivanka_128.mp3";
//playlist_url = "http://cchits.ning.com/recent/xspf/?xn_auth=no";
//playlist_url = "http://hideout.com.br/shows/radio-test.xspf";
//radio_mode = true;
//song_title = "Imperial Teen - Ivanka";
autoload=true;
//info_button_text = "Add to Cart"
//playlist_url = "http%3A%2F%2Fwebjay%2Eorg%2Fby%2Flucas%5Fgonze%2Flaconic%2Exspf"
//playlist_url= "http://hideout.com.br/tests/hideout2325.xspf"
//constants
DEFAULT_PLAYLIST_URL = "http://hideout.com.br/shows/allshows.xspf";
DEFAULT_WELCOME_MSG = "Hideout XSPF Music Player - by Fabricio Zuardi";
LOADING_PLAYLIST_MSG = "Loading Playlist...";
DEFAULT_LOADED_PLAYLIST_MSG = "- click to start"
DEFAULT_INFOBUTTON_TXT = "Info"
//playlists has priority over songs, if a playlist_url parameter is found the song_url is ignored
//default playlist if none is passed through query string
if(!playlist_url){
	if(!song_url){
		playlist_url = DEFAULT_PLAYLIST_URL;
	}else{
		single_music_playlist = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><playlist version=\"1\" xmlns = \"http://xspf.org/ns/0/\"><trackList>";
		single_music_playlist += "<track><location>"+song_url+"</location><annotation>"+song_title+"</annotation></track>"
		single_music_playlist += "</trackList></playlist>"
	}
}
info_mc._visible=false;
if(!info_button_text){
	info_button_text = DEFAULT_INFOBUTTON_TXT;
}
info_mc.display_txt.text = info_button_text;

//variables initialization
playlist_array = [];
track_index = 0;
playlist_mc.track_count = 0;
pause_position = 0;
volume_level = 100;
playlist_xml = new XML();
playlist_xml.ignoreWhite = true;
playlist_xml.onLoad = playlistLoaded;
mysound = new Sound(this);
playlist_listener = new Object();
playlist_list.addEventListener("change", playlist_listener)
//play_btn.onPress = playTrack;

Etiquetas: actionscript, swf, variables
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:04.