Topic: ActionScript Gurus (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: A little lower... lower... ahhhhhh, thats the spot |
posted 09-19-2001 00:48
Ok all you AS gurus, I need some help understanding why a script works like it does. In this file: code: on (press) {
|
Maniac (V) Inmate From: Boston, MA, USA |
posted 09-19-2001 06:10
Huh. That's Flash 4 syntax, and I really just learned ActionScript with Flash 5. If I were coding Flash 5 , I'd use a hitTest to evaluate whether the gift was intersecting the bag. |
Maniac (V) Inmate From: Boston, MA, USA |
posted 09-19-2001 12:49
interesting. Well, I leaned something. _droptarget will return the path to any movie clip underneath the one dropped, in slash notation. Wow! In this movie, they use drop target simply to test for whether the present was dropped on the bag (in other words, if the _droptarget does not return "nothing", then play frame two). |
Maniac (V) Inmate From: A little lower... lower... ahhhhhh, thats the spot |
posted 09-19-2001 14:42
Thanks Steve. I've been teaching Flash here lately and am starting to become more comfortable with AS. I just couldn't figure out how that _droptarget worked. I thought it might be something with the movie clip of the bag because the other gift symbol is a button, not a movie. |
Maniac (V) Inmate From: Boston, MA, USA |
posted 09-19-2001 15:04
First of all, you want to start writing Flash5 syntax: the comparison operators in Flash 5 are == for equality, and != for inequality ("ne" is Flash 4 for inequality). The older style "getProperty" should be updated too, to dot syntax. And the two "onRelease" statements could be combined into one. |
Maniac (V) Inmate From: A little lower... lower... ahhhhhh, thats the spot |
posted 09-19-2001 15:32
Exciting reading eh? |
Paranoid (IV) Mad Scientist From: Houston, TX, USA |
posted 09-20-2001 16:11
Hehe, yeah, I need to pick up that one for reference. I'm working thru (when I have time) Foundation Actionscript right now and it's awesome, great book, easy to read, and I'm learning a ton... |
Maniac (V) Inmate From: A little lower... lower... ahhhhhh, thats the spot |
posted 09-22-2001 23:59 |
Maniac (V) Inmate From: Boston, MA, USA |
posted 09-23-2001 13:19
Well, the 2 books have different intentions. I have 'em both. Foundation ActionScript holds your hand more, and is certainly WAY more entertaining to read. Is Foundation ActionScript going to have an index that includes _droptarget? I don't think so. Foundation ActinScript shows how to use, let's say, the sound object. Cool. Want to know what an "object" *is*, not just how to use it? Want to know *why* you declare a new sound object? |