I have been playing this game called "Three's!" and am totally addicted. I mean probably to the point I need help. While playing this game I noticed a very cool effect and would like to incorporate this into a future application, but like always, have no idea on how to obtain it. I am attaching a screen shot of the game so you can see what I mean. On the left of the picture you will see a button sliding into another button with a partial effect making the intersecting button appear that it is being filled by the other button. I equate it to sliding a card into a deck where the top card is transparent and you see the underlying card sliding underneath it...This is my mission for the day, figuring out how this is done so any help would be greatly appreciated!
EDIT--I think the answer is going to lie in the blend mode and intersect command....but getting the effect to partially happen within a buttons rect is going to be the tough part....
[img] [/img]
Ideas on this effect
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Ideas on this effect
This is a start....
Code: Select all
on mouseUp
set the ink of me to srcCopy
end mouseUp
on mouseDown
grab me
end mouseDown
on mouseStillDown
put the loc of me into fld "loc"
if the intersect(me,btn "blue") then
set the ink of me to blend
else
set the ink of me to srcCopy
end if
end mouseStillDown
Re: Ideas on this effect
Sorry guys for this post....This was actually way easier to obtain than I thought....If I would have done a little more testing and reading prior to posting this, I could have figured this out on my own.....For those who want to know how it is done, take a look at my code.....Make a stack with two buttons....One called "Red" the other "Blue"....paste code in a button and have fun....
Code: Select all
on mouseUp
set the ink of me to srcCopy
end mouseUp
on mouseDown
grab me
end mouseDown
on mouseStillDown
put the loc of me into fld "loc"
if the intersect(me,btn "blue") then
//set the ink of me to blendMultiply
set the ink of me to srcOrReverse
else
set the ink of me to srcCopy
end if
end mouseStillDown