Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
Let's now use our multiple movie clips here in the Clock Start Movie to practice writing paths from various locations in the file. My students have always struggled with this concept so I came up with this file and the multiple movie clips that are moving all at the same time in order for them to practice writing paths. You'll know that you've written the path correctly when one or more of the various movie clips stop. If you do a Control Test Movie before writing any scripts, notice that all three of the movie clips are moving and then go here to the main timeline and what you'll want to do is hide different areas. Go ahead and double click on the clock face and then what you'll want to do is hide everything but the hour and the minute layer there so you can double click on the various timelines and target them. What you want to do is try stopping the various timelines from other locations, not only the main timeline but from inside of the project here. For example, here on the minute hand timeline go ahead and use the target path to try to stop the seconds hand using both and absolute and relative paths. Let's start off with absolute paths and using the Target Path Tool, let's target the seconds hand from the minute hand using an absolute path and go ahead and test the movie and notice that the seconds hand has stopped. Then target the same movie clip but this time using a relative path. This is going to be very similar but a little bit different but practice and go ahead and Control Test your movie. Make sure you don't get any errors. Also make sure, like there's an error right there and probably what we want to do here is instead of using the target path, let's go ahead and just use our own relative pathing. So we'll start with this and what we want to do is we want to target the seconds hand and we want to stop it like so. So let's go ahead and do a Control Test Movie and sure enough I've stopped it. Now let's go into the timeline, the seconds hand timeline, let's delete that script there and again you may need to hide various layers. So there's the seconds hand, double click on that. This takes this to the seconds hand. Now using both absolute and relative paths trying to stop the other timelines from inside of this timeline. Let's start off with a relative path to this and if we do Parent, that will go up one level and let's stop that timeline. That should stop the minute hand timeline and we'll probably see something very interesting in here. Let's go ahead and Control Test the movie. Now, in this case, notice that the minute hand has in fact stopped. The second hand and the hour hand have continued to play. If I use the Target Path Tool, using the relative path, let's go ahead and target the minute hand right here. You'll get an error message. So there's a better way to write this path out here. Let's go back. The idea here is we want from the second hand movie clip; we want to stop the minute hand movie clip. Let's use a relative path and just type this. Minute stop like that, Control Test the movie. So instead of the error, let's this time use an absolute path and target the minute hand from inside of the seconds movie clip right there. This clock instance minute.stop and now let's do a, actually that's a relative path. We tried that and that didn't work. Let's try an absolute path to the minute hand right there; absolute. That puts the root in the front. Now let's do a Control Test Movie and where before we had an error, now the minute hand has stopped. So try practicing different types of target paths, both relative and absolute from different locations in the file to get the various movie clips to stop moving. This will give you a lot of practice in writing out your paths and as soon as you stop getting the errors and are successful in targeting those paths you can then move on to the next movie. The next movie is the target hands clock end and in the movie you'll apply the target paths that you learned earlier with the button handling that you've also learned and combine those scripts to then control the various play back heads using buttons on the stage.
| Course: | Adobe Flash ActionScript 3.0 for Designers |
| Author: | James Gonzalez |
| SKU: | 34060 |
| ISBN: | 1-935320-82-3 |
| Release Date: | 2009-11-09 |
| Duration: | 9.5 hrs / 101 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |