Copy link to clipboard
Copied
Hi all, I am creating a simple game in Animate. I want to be able to pick up(drag and drop) a MovieClip(1) which when moved over another MoviClip(2) will change the opacity of the topmost layer in MovieClip(2). I know I do not explain well.
The game will involve washing dishes or a car. As a graphic of a 'sponge'(clip-1) is moved over a representation of dirty dishes or a dirty car-bubbles animate from the 'sponge' and depending on how long the 'sponge' is held over the dishes(2)then the opacity of the top layer (which will represent dirt) will drop to reveal a 'clean' layer beneath.
I have seen this exact thing done in the app my boo where the creature is washed with a sponge.
Thanks in advance guys.
Peace - John
Copy link to clipboard
Copied
What is your target? ActionScript or HTML5?
Copy link to clipboard
Copied
Hi Sinious, My target is ActionScript3.
Copy link to clipboard
Copied
I have posted the same question in the animate forum (I hope that this is not bad form).
A member there says that I could do this with hit test. Do you think this is probably the way to go? I have been reading thathit test will still detect a layer when it's opacity is zero.
Thanks again for all the help Sinious.
Copy link to clipboard
Copied
This is where I am Sinious.
I have a MovieClip1(sponge) and MovieClip2(dirtydishes). I have used the Touch_begin and Touch_end events so I can drag MovieClip1 around the screen. I stored it's original position so when I let go it returns to it's original point. Works great.
I need for MoviClip1 to check whether it has passed over MovieClip2.
I have tried placing HitTest in both the Touch_begin and Touch_end functions and run a trace. MovieClip1 only checks for a hit test when I first drag it or when I drop it, registering no collision.
Is there a way of getting MovieClip1 to check for a HitTest as it passes over MovieClip2.
Thanks in advance
Peace
John