| MetaCard y Revolution: Herramientas de autor multiplataforma para multimedia | ||
|---|---|---|
| Anterior | Capítulo 9. Imágenes y gráficos | Siguiente |
#
# Botón "avant"
#
on mouseUp
lock messages
import snapshot from rectangle the screenRect --(the rect of this stack)
set the script of the last image to the script of the first card
choose browse tool
unlock messages
end mouseUp
#
# Botón "inici"
#
Copia del còdic de la pila, per si acas
on preOpenStack
lock messages
-- lock screen
-- import snapshot from rectangle (the screenRect)
set the location of this stack to the screenLoc
set the width of this stack to the third item of the screenRect
set the height of this stack to the fourth item of the screenRect
import snapshot from rectangle (the screenRect)
set the script of the last image to the script of the first card
choose browse tool
-- send mouseUp to button "avant"
-- unlock screen
unlock messages
end preOpenStack
#
# Botón "copiaObjecte"
#
on mouseUp numeroGrafic
lock messages
copy the graphic numeroGrafic to this card
set the location of last graphic to the mouseLoc
show the last graphic
unlock messages
end mouseUp
#
# Botón "borraObjectes"
#
on mouseUp totalGraficsAMantindre
lock messages
repeat while the number of graphics > totalGraficsAMantindre
delete last graphic
end repeat
delete image (the number of images)
unlock messages
close this stack
end mouseUp
local numObjectes = 2, objecteActiu = 0
#
# Imagen id 1187
#
on mouseUp boto
if boto = 1 --Utilitza l'objecte
then
send "mouseUp" && (objecteActiu + 1) to button "copiaObjecte"
else
if boto = 3 -- Canvia l'objecte
then put ( (objecteActiu + 1) mod numObjectes) into objecteActiu
else --Si es el boto del mitj s'acaba tot
send "mouseUp" && (numObjectes) to button "borraObjectes"
end if
end if
end mouseUp
Per introduir el tema i, sobre tot, per juar en ell i en les posbilitats de la ferramenta d'autor.