Elegir el proyecto audio
Luego borrar los controles del reproductor
Colocar una imagen de fondo, para ello vamos a las propiedades de la pagina y elegimos uno
Introducimos un botón
Hacemos click derecho, y luego enviarlo hacia atrás
Le quitamos el texto
Le quitamos el check del estado enable
Insertamos botones para pause, play, cargar música, bajar y subir volumen
Procedemos a introducimos los códigos necesarios a cada uno de los botones
botón play On Click
Audio.Play(CHANNEL_USER1);
Page.StartTimer(151);
Boton Pause On Click
Audio.Pause(CHANNEL_USER1);
Page.StopTimer();
Boton parar
Audio.Stop(CHANNEL_USER1);
Page.StopTimer();
Boton cargar
audioFile = Dialog.FileBrowse(true, “Open File”, _DesktopFolder,
“Audio Files (.mp3,.ogg, .wav, .aif, .aiff, .raw )|*.mp3,*.ogg;*.wav;*.aif;*.aiff;
*.raw|”, ””, “”, false, true);
if(audioFile[1]~=”CANCEL”) then
Audio.Load(CHANNEL_USER1, audioFile[1],true,false);
end
boton subir volumen
vol=Audio.GetVolume(CHANNEL_USER1)+50;
if vol<0 then
vol=0;
elseif vol>255 then
vol=255;
end
Audio.SetVolume(CHANNEL_USER1,vol);
Boton bajar volumen
Vol=Audio.GetVolume(CHANNEL_USER1)-50;
If vol<0 then
Vol=0;
Elseif vol>255 then
Vol=255;
End
Audio.SetVolume(CHANNEL_USER1,vol)
Boton X
Application.Exit(0);
Boton -
Window.Minimize(Application.GetWndHandle());
Propiedades de pagina On Show
Audio.Load(CHANNEL_USER1, "AutoPlay\\Audio\\loop.ogg", true, true);
Audio.SetVolume(CHANNEL_USER1, 210);
title = " NOW PLAYING - \"HAPPY GROOVE\" - BY INDIGO ROSE SOFTWARE -";
Page.StartTimer(151);
Propiedades de pagina On Timer
-- set time display
curTime = Math.Round(Audio.GetCurrentPos(CHANNEL_USER1), 2);
if String.Find(curTime, ".", 1, false)==-1 then
curTime = String.Concat(curTime, ".");
end
decPos = String.Find(curTime, ".", 1, false);
strLen = String.Length(curTime);
zerosNeeded = 2 - (strLen - decPos);
if zerosNeeded > 0 then
for count = 1, zerosNeeded do
curTime = curTime.."0";
end
end
Paragraph.SetText("Paragraph1", curTime);
-- set "now playing" display
myChar = String.Left(title, 1);
title = String.Right(title, (String.Length(title)-1));
title = title..myChar;
titleText = String.Left(title, 20);
Paragraph.SetText("Paragraph2", titleText);
Boton cargar On Click (Todo el codigo)
audioFile = Dialog.FileBrowse(true, "Open File", _DesktopFolder, "Audio Files (.ogg, .wav, .aif, .aiff, .raw )|*.ogg;*.wav;*.aif;*.aiff;*.raw|", "", "", false, true);
if (audioFile[1] ~= "CANCEL") then
Audio.Load(CHANNEL_USER1, audioFile[1], true, false);
end
title = Audio.GetFilename(CHANNEL_USER1);
title = String.Right(title, (String.Length(title) - String.ReverseFind(title, "\\", true)));
title = String.Upper(" NOW PLAYING - "..title.." -");
Page.StartTimer(151);
Top Related