Progress

Como indica el nombre del foro en el moveremos todos los temas de dudas que se resuelvan con exito .
Este foro no tendra permisos de escritura.
Buenas Specialist
Necesito ayuda con una Progress bar la quiero utilizar como slider para saber el progreso de las canciones...
Pero no se como hacerlo........
alguien sabe como.....
GRacias....

no es por ser desagradable pero has usado el buscador primero creo que hay un ejemplo en el foro y si no busca el amsspecialist pack de ceone que esta puesto como post fijo en el foro

que poquitos datos no? bueno aqui te paso un ejemplo cargando un audio con las acciones de Audio y una barra de progreso ;)

HIDE: ON
Hidebb Message Hidden Description

Gracias.... rafa
Muchas Gracias Rafax... esto esta excelente
:sorry:
Me podrias hacer otro favor como hago para buscar una posición en el audio con la progress.......
como si fuera la de windows media player, que donde yo le de click, ahi llegue la barra
Espero me entiendas y gracias

eso es mas xungo....

Bueno... según el objeto que uses pero mas o menos seria así:

Funciones necesarias...
function ObjectFunctionPrefix(sObjectType)

	local nObjType = Page.GetObjectType(sObjectType)

	if nObjType == OBJECT_BUTTON then
		return Button
	elseif nObjType == OBJECT_LABEL then
		return Label
	elseif nObjType == OBJECT_PARAGRAPH then
		return Paragraph
	elseif nObjType == OBJECT_IMAGE then
		return Image
	elseif nObjType == OBJECT_FLASH then
		return Flash
	elseif nObjType == OBJECT_VIDEO then
		return Video 
	elseif nObjType == OBJECT_WEB then
		return Web
	elseif nObjType == OBJECT_INPUT then
		return Input
	elseif nObjType == OBJECT_HOTSPOT then
		return Hotspot
	elseif nObjType == OBJECT_LISTBOX then
		return Listbox
	elseif nObjType == OBJECT_COMBOBOX then
		return Combobox
	elseif nObjType == OBJECT_PROGRESS then
		return Progress
	elseif nObjType == OBJECT_TREE then
		return Tree
	elseif nObjType == OBJECT_RADIOBUTTON then
		return RadioButton
	elseif nObjType == OBJECT_RICHTEXT then
		return RichText
	elseif nObjType == OBJECT_CHECKBOX then
		return CheckBox
	elseif nObjType == OBJECT_SLIDESHOW then
		return Slideshow
	elseif nObjType == OBJECT_GRID then
		return Grid
	elseif nObjType == OBJECT_PDF then
		return PDF
	elseif nObjType == OBJECT_QUICKTIME then
		return QuickTime
	elseif nObjType == OBJECT_XBUTTON then
		return xButton
	elseif nObjType == OBJECT_PLUGIN then
		return Plugin
	else 
		return nil
	end
end

function IsInRect(strObject)

	local bReturn = false;
	local tObj= ObjectFunctionPrefix(strObject)
	if tObj then
	
		local tPos = tObj.GetPos(strObject)	
		local tSize = tObj.GetSize(strObject)
		
		local tMouse=System.GetMousePosition(true);
		local nX=tMouse.X
		local nY=tMouse.Y
		
		
		if (nX >= tPos.X) and (nX <= tPos.X + tSize.Width) then
			if (nY >= tPos.Y) and (nY <=tPos.Y + tSize.Height) then
				bReturn = true;
			end
		end
		
	end
	return bReturn;	
end
On PosChange de Slider:
if IsInRect(this) and System.IsKeyDown(1) then
	Audio.Seek(CHANNEL_BACKGROUND, SEEK_SPECIFIC, e_Pos);
end
Aquí te dejo un ejemplo espero que lo entiendas...
HIDE: ON
Hidebb Message Hidden Description


Un Saludo...

Gracias Ceone realmente aprecio tu ayuda...
ese ejemplo me sirvió para otro proyecto....... :yeah: :yeah:

Pero :sorry: si puedes lograr la otra parte de la progress te agradeceria mucho
.....
Gracias.....

la otra parte? :hypno: :hypno: :hypno: :hypno:

:) :) :) :)
Ceone no se si conozcas el reproductor de Lucsled que esta qui mismo en este foro...
http://amsspecialist.com//viewtopic.php ... ilit=xplay

bueno si ya lo has visto mi idea es que la progress quede como la de ese reproductor.......
asi que pues agradezco tu ayuda si me puedes decir como hacerlo

y pues por eso lo de la otra parte por que.....bueno rafaxplayer y tu ya me dieron el script para que la progress corra con la cancion solo falta hacer click sobre ella para que la cancion retroceda o adelante::::

ESpero me entiendan
GRACIAS::::

Funciones necesarias....
function ObjectFunctionPrefix(sObjectType)
	local nObjType = Page.GetObjectType(sObjectType)
	if nObjType == OBJECT_BUTTON then
		return Button
	elseif nObjType == OBJECT_LABEL then
		return Label
	elseif nObjType == OBJECT_PARAGRAPH then
		return Paragraph
	elseif nObjType == OBJECT_IMAGE then
		return Image
	elseif nObjType == OBJECT_FLASH then
		return Flash
	elseif nObjType == OBJECT_VIDEO then
		return Video 
	elseif nObjType == OBJECT_WEB then
		return Web
	elseif nObjType == OBJECT_INPUT then
		return Input
	elseif nObjType == OBJECT_HOTSPOT then
		return Hotspot
	elseif nObjType == OBJECT_LISTBOX then
		return Listbox
	elseif nObjType == OBJECT_COMBOBOX then
		return Combobox
	elseif nObjType == OBJECT_PROGRESS then
		return Progress
	elseif nObjType == OBJECT_TREE then
		return Tree
	elseif nObjType == OBJECT_RADIOBUTTON then
		return RadioButton
	elseif nObjType == OBJECT_RICHTEXT then
		return RichText
	elseif nObjType == OBJECT_CHECKBOX then
		return CheckBox
	elseif nObjType == OBJECT_SLIDESHOW then
		return Slideshow
	elseif nObjType == OBJECT_GRID then
		return Grid
	elseif nObjType == OBJECT_PDF then
		return PDF
	elseif nObjType == OBJECT_QUICKTIME then
		return QuickTime
	elseif nObjType == OBJECT_XBUTTON then
		return xButton
	elseif nObjType == OBJECT_PLUGIN then
		return Plugin
	else 
		return nil
	end
end

function GetSec(strObject, strBackgroundChannel)
	local Sec = nil;
	local tObj = ObjectFunctionPrefix(strObject);
	if tObj then
		if Audio.GetLength(strBackgroundChannel) ~= -1 then
			local tPos = tObj.GetPos(strObject);
			local tSize = tObj.GetSize(strObject);
			local tMouse = System.GetMousePosition(true);	
			local tAudio = Audio.GetLength(strBackgroundChannel);
			Sec = (tMouse.X-tPos.X)*(tAudio/tSize.Width);
		end
	end
	return Sec;
end
Y en el objeto que desees lo siguiente:
(ON CLICK)
e_Pos = GetSec(this, CHANNEL_BACKGROUND);
if e_Pos ~= nil then
	Audio.Seek(CHANNEL_BACKGROUND, SEEK_SPECIFIC, e_Pos);
end
He tenido que modificar un poco por que Slider esta realmente echo para esta función y Progress tiene muchas limitaciones pero bueno... tu quieres un progress pues tirale...

La función GetSec lo que hace es decir el segundo donde se tiene que enviar y eso se consigue haciendo unas matemáticas realmente simples en la que intervienen la posición del objeto, la medida del objeto y por ultimo la posición del mouse... algo realmente muy simple en el que sabiendo estos datos se puede saber la posición de la canción donde la quieres enviar... No he redondeado el numero, pero bueno eso ya es cosa tuya...
HIDE: ON
Hidebb Message Hidden Description

Gracias.... Ceone

very good ;)

gracias..

:yeah: :yeah: :yeah: :yeah:
sos GRANDE:::::::CEONE :num1: :num1:
exactamente lo que queria............
:yeah: :yeah: :yeah:

GRACIAS::::