Lesson 4. Using Object Classes
Every day you use objects to perform any number of activities. You may have used Tupperware to store fresh cookies to prevent them from becoming stale, or the trash can to store a fruitcake from your Aunt Sally. Objects are items designed to meet specific needs. You can use them to perform tasks of their own (for example, a VCR playing or recording a movie), or you can employ them as simple storage devices.Using Macromedia Flash, you can create objects that perform tasks or store something (such as data), in much the same way as real-world objects. As a matter of fact, you'll probably be pleasantly surprised at how familiar Flash objects seem, once you understand basic concepts of how they work. While Flash allows you to create your own kinds of custom objects (a topic we'll cover in Lesson 7, "Creating Custom Classes"), it provides a number of built-in objects (organized in what are known as classes), ready for immediate use in your projects. In this lesson, we'll introduce you to many of these built-in classes of objects, explain their functionality, and help you gain experience using them.
This Flash word processor is one of the projects you'll create in this lesson.
WHAT YOU WILL LEARNIn this lesson, you will:Learn what objects/object classes are and why they are usefulGet acquainted with the various classes of objects available in ActionScriptUse the Color classCreate an interactive scene using the Key object classCreate a word processor using properties and methods of the String and Selection object classesAPPROXIMATE TIMEThis lesson takes approximately 45 minutes to complete.LESSON filesStarting Files:Lesson04/Assets/Clown1.flaLesson04/Assets/balloon1.flaLesson04/Assets/wordProcessor1.flaCompleted Projects:Clown2.flaballoon2.flawordProcessor2.fla
• Table of ContentsMacromedia® Flash MX 2004 ActionScript: Training from the SourceBy
Derek Franklin, Jobe Makar Publisher: Peachpit PressPub Date: November 19, 2003ISBN: 0-321-21343-2Pages: 636
Sure, you can use Flash MX 2004 without being a master programmer, but as any Flash developer worth his or her salt will tell you, you''''re not tapping all of its power unless you''''re taking advantage of its scripting language "ActionScript 2.0" which offers a more robust programming model and better object-oriented programming support than ever before. Here to take the fear factor out of learning it are Flash veterans and best-selling authors Derek Franklin and Jobe Makar, who demonstrate that scripting is an instinctual process you already know by translating real-life activities into ActionScript scripts. In these pages, you''''ll find methodologies and techniques for building over 40 real-life Flash ActionScript projects, including sample games, applications, Web sites, and more. New in this edition are coverage of ActionScript 2.0, Web services, Components, Printing, Video, and more. On the companion CD, you''''ll find all the project files and images you need to complete each project.