Académique Documents
Professionnel Documents
Culture Documents
vamos a las propiedades de la pagina y elegimos uno Introducimos un botn Hacemos click derecho, y luego enviarlo hacia atrs Le quitamos el texto Le quitamos el check del estado enable Insertamos botones para pause, play, cargar msica, bajar y subir volumen Procedemos a introducimos los cdigos necesarios a cada uno de los botones botn play On Click Audio.Play(CHANNEL_USER1); Page.StartTimer(151); Boton Pause On Click Audio.Pause(CHANNEL_USER1); Page.StopTimer();
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;
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.ReverseFind(title, "\\", true))); (String.Length(title) -