View Poll Results: Was this post clear and to the point?
- Voters
- 1. You may not vote on this poll
-
Wait what? say that again....complete jibberish
-
i don't think u knwo what yoru talking about
-
you could clarify your post better
-
VERY CLEAR POST!
-
Code:
var lastDown:MovieClip = null;
That line does two things. First, it declares the lastDown variable as a MovieClip. Then, it initializes that variable to null. Strictly speaking, initializing it is not necessary as the default value for an Object type variable is null, and there's no way the code will reference it before it's properly set anyway. I just like to be explicit.
The lastDown variable is intended to hold a reference to the last movieclip which was touched, as long as it is being held down. Setting it to null means that there is no such movieclip, meaning nothing is being held down. In the press1 function, we set it to the clip which was touched. It should remain with that value until either the timer fires, or the mouse is lifted. If the timer fires, then the user held down for the duration of the timer. If the mouse is lifted, then we reset lastDown and the timer to be ready to try again.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|