Ideas on this effect

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Ideas on this effect

Post by KennyR » Wed Mar 05, 2014 12:16 pm

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]
photo.PNG
[/img]

KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Re: Ideas on this effect

Post by KennyR » Wed Mar 05, 2014 12:49 pm

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

KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Re: Ideas on this effect

Post by KennyR » Wed Mar 05, 2014 1:02 pm

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

Post Reply