flash actionscript:
I have a MC that will be the iris of the eye so when I have the iris in the center of the eye (which I will just use the xy) I want it to stopdrag then load something (Im not worried about that point yet) this should be simple. To be a little more specific- the iris is the cursor automatically, there is no on, over, release, etc. I just want it to stopdrag once it reaches that specific xy (and once there I will either have it bring up buttons or load a url)
Put this on the iris mc. this.onEnterFrame = function() { if (this.hitTest(x,y)) { trace("hit the coordinates"); } } The problem with this code is that the registration point has to be EXACTLY on the coordinates. You should do a hit test against an mc that has maybe a 10x10 size. Also, you should delete the onEnterFrame function once it touches the coordinates (if you're not going to use it ever again - if you're going to use it again, have whatever code you have that starts the drag also instantiate the onEnterFrame function).
it's not clear what you're trying to do, but if you just want an answer it is to initiate a loop that will poll the iris' (you mean pupil?) position and trigger whatever events you want if and when that position is reached. if you want more help, explain what you're trying to accomplish. for example, what's causing the iris (pupil?) to move is the iris(?) tracking the mouse position?
Thanks jrh, Ill try it when I can:) its the whole inside of the eye (actually a looped video of an atom) I will try the 10x10 thing. It is the cursor once its snapped in it will trigger another scene or load the next page. You can see the after at http://www.shadx.com Thanks again:)
Thanks jrh, Ill try it when I can:) its the whole inside of the eye (actually a looped video of an atom) I will try the 10x10 thing. It is the cursor once its snapped in it will trigger another scene or load the next page. You can see the after at http://www.shadx.com Thanks again:)
Don't see what you're looking for? Try a search.
|