Thejab

He visto en una de tus respuestas que recomiendas la página de jab, pero sabes como ha hecho la cartelera de clientes de su página
Estoy bastante avanzdo en lingo pero no lo consigo hacer

1 Respuesta

Respuesta
1
----Comportamiento de los miembros que se desplazan
--Bedelludrica
property p_sprite,p_mov_inicial,p_cambio_movimiento, p_velocidad_max
property p_antiguo_max, P_comienzo_max,p_aceleracion_inicial,p_despacio
on getBehaviorTooltip me
return \
"este es un comportamiento para crear un menú deslizante "&\
"asociado con el comportamiento"&\
" fijar_velocidad y que se debe vincular a elementos, "&\
"que se desplazan horizontalmente , tambien podras hacer desde aqui, "&\
"que los elementos disminuyan su velocidad al pasar el raton sobre ellos."
end getBehaviorTooltip
on getPropertyDescriptionList me
set lista to [:]
addprop lista, #p_aceleracion_inicial, [#comment:"indica la aceleracion de inicio",\
#format:#float, #default:.0, #range: [#min:-2, #max:2]]
addprop lista, #P_comienzo_max, [#comment:"indica la velocidad maxima a alcanzar con esa aceleracion de inicio",\
#format:#integer, #default:0]
addprop lista, #p_despacio, [#comment:"indica la velocidad cuando el raton entre sobre el (disminuir la velocidad)",\
#format:#float, #default:.3, #range: [#min:0, #max:3]]
return lista
end getPropertyDescriptionList
on beginsprite me
p_sprite =sprite(me.spritenum)
p_cambio_movimiento = p_aceleracion_inicial
p_velocidad_max =P_comienzo_max
p_mov_inicial = 0
end
on prepareframe me
if p_sprite.loch > the width of the rect of the stage + 150 then
p_sprite.loch = -150
end if
if p_sprite.loch < -150 then
p_sprite.loch = the width of the rect of the stage + 150
end if
if p_cambio_movimiento > 0 then
if p_mov_inicial < p_velocidad_max then
p_mov_inicial = p_mov_inicial +p_cambio_movimiento
else if p_mov_inicial >p_velocidad_max then
p_mov_inicial = p_mov_inicial -p_cambio_movimiento
end if
end if
if p_cambio_movimiento < 0 then
if p_mov_inicial > -p_velocidad_max then
p_mov_inicial = p_mov_inicial + p_cambio_movimiento
else if p_mov_inicial < -p_velocidad_max then
p_mov_inicial = p_mov_inicial - p_cambio_movimiento
end if
end if
p_sprite.loch = p_sprite.loch + p_mov_inicial
end
on fijar_movimiento_inicial me ,cambio,maximo
p_cambio_movimiento = cambio
p_velocidad_max = maximo
end
on mouseenter me
sendallsprites(#ir_despacio ,p_despacio)
end
on mouseleave me
sendallsprites(#ir_normal )
end
on ir_despacio me ,valor
p_antiguo_max = p_velocidad_max
if p_velocidad_max > 0 then
p_velocidad_max = valor
else
p_velocidad_max = -valor
end if
end
on ir_normal me
p_velocidad_max = p_antiguo_max
end
---comportamiento para crear botones que desplazen los mienbros
--bedelludrica
property p_aceleracion_rodeo,p_aceleracion_no_rodeo, p_max_acel_rodeo, p_max_acel_no_rodeo
on getBehaviorTooltip me
return \
"este es un comportamiento asociado con el comportamiento"&\
" miembros_despalzandose y que se debe vincular a elementos, que al pasar"&\
"el ratón sobre ellos varíen la velocidad de los elementos que se desplazan horizontalmente"
end getBehaviorTooltip
on getPropertyDescriptionList me
set lista = [:]
addProp lista, #p_aceleracion_rodeo, [#default: .5, #format:#float, ¬
#comment:"Indica la aceleracion al entrar el raton ",\
#range: [#min:-2, #max:2]]
addProp lista, #p_max_acel_rodeo, [#default: 3, #format:#integer, ¬
#comment:"maxima velocidad que se puede alcanzar al entrar el raton", \
#range: [#min:-10, #max:10]]
addProp lista, #p_aceleracion_no_rodeo, [#default: .5, #format:#float, ¬
#comment:"Indica la aceleracion al salir el raton", #range: [#min:-2, #max:2]]
addProp lista, #p_max_acel_no_rodeo, [#default: 3, #format:#integer, ¬
#comment:"maxima velocidad que se puede alcanzar al salir el raton ", \
#range: [#min:-10, #max:10]]
return lista
end
on mouseenter me
sendallsprites(#fijar_movimiento_inicial, p_aceleracion_rodeo , p_max_acel_rodeo)
end
on mouseleave me
sendallsprites(# fijar_movimiento_inicial, p_aceleracion_no_rodeo , p_max_acel_no_rodeo)
end

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas