Collision detection

I have a question, ive seen some swfs of snow falling on letters and staying on the letters once it touched them, how is it possible to set such a value for randomly generated snow, or could be an effect such as having waters make an alpha fade ripple on water

your snow is still a movie clip, so you still do hittest on them as long as you know what you’re calling each flake, or even if you dont, with the use of a function and the knowledge that if you put your code in the original snowflake, it’s duplicates will react the same way.

That would work very well montoya… But one factor most people don’t realize is that hitTest’s and in-object coding is extremely slow.

Having more than 20 snowflakes on the screen will cause some processors around 500 mhz to slow down to about 20 fps.

I could tell you a method using arrays that would help you out but it would be really hard to explain… Basically you would do a hitTest from a single point in the snowFlake like such…

if(_root.letterT.hitTest(_root.snow1._x, _root.snow1._y, yes){}

About the water rippling effect… Is is indeed possible… But when doing that I’d suggest doing an area call instead of a hitTest…

if(_root.rain1._y > 300){}

I will explain further possibly tonight… I’m pretty tired and my head is beginning to ache right now :slight_smile:

playamarz :player:

another effect i would like to achive is, strings of objects [buttons, movie clips ] on a sine wave continually moving down, and essentially looping once they reached the bottom and reapearing at the top, can anyone helpe me with this, and id like it to stop on the said clip,button on a mouseover

anyone lol
?

Hmm… You wanna perform a sine effect… Like the snowflakes swaying through the air? Is that what you mean?

playamarz :player:

yea somewhat but i want buttons at intervals likes beads in a strand in the shape of a sine wave, slowly falling downward, like that of intertwining helix’s in dna , i want a couple of these strands basically flowing downwards, with buttons on them and then just circles of non pressable buttons in between

Hmm… Okay… I think I get what you mean… But… Could you perhaps supply a drawing to make sure that what you mean is at 100%… I am thinking a couple of things in my mind… What you described to me can indeed be done though :slight_smile:

playamarz :player:

ok drawing coming up, might be a bit crude though :smiley:

here is an really crude image

tick * tock lol

Allright I think I got what you are trying to say… Lemme draw a couple of things up and get some code worked out in my head… Do you want the strands to stop when someone moves over a button or keep moving?

I’ll write up some code.

playamarz :player:

yes i want the strand with the particular button to stop, while the other strands keep flowing, also if you do manage to get the code done or a piece would you like to explain it to me piece by peice as i am very interested in learning not just copying

hmm

~bump~

Sorry… Been kind-a busy lately… Still working on the code as well… hehe…

playamarz :player:

alright thanks

just bumping

drunk,

playamarz is trying his best (i’m sure) to help you out with this. i’m sure hes got a busy life and is doing all that he can to get that code to you asap, so i think that you need to chill a bit and be patient.

otherwise, people might get sick of your repeated “hurry-up” statements and not help you at all…

im not saying hurry up or anything of the sort, im just bumping so the post remains active, and other people might want to help out