Hi,
I just bought Hollywood and have started experimenting with it on AOS4. I envision writing a card game so am dinking around with sprites and buttons to try to figure things out.
I'd like to display a sprite for each card and immediately after displaying/moving the card make a button with the same dimensions right on top of it. Unfortunately, it appears that while sprites display in front of each other -- most recently displayed on the front -- overlapping buttons display behind each other -- most recent button is behind other buttons. E.g.,
Code: Select all
; a hollywood script
@bgpic 1, "BG.iff"
@sprite 1, "56cards.png", {x= 1, y=1, width=72, height=96, Frames=1, FPR=1}
@sprite 2, "56cards.png", {x=74, y=1, width=72, height=96, frames=1, fpr=1}
function p_ButtonClick(msg)
debugprint("Left Button Clicked on ", msg.id)
endfunction
displaysprite(1,50,50)
makebutton(1,#SIMPLEBUTTON, 50, 50, 72, 96, {onmousedown=p_ButtonClick})
displaysprite(2,75,50)
makebutton(2,#SIMPLEBUTTON, 75, 50, 72, 96, {onmousedown=p_ButtonClick})
repeat
waitevent
forever
If Hollywood traversed the button list in reverse order I'd probably be fine. Is there an easy way around this or should I use layers or brushes instead of sprites?
Thanks in advance for the help. Still having fun!
Nathan