Các thành phần: Một Scripting Primer Bởi vì trọng tâm của cuốn sách này là ActionScript, thảo luận của chúng tôi trong bài học này chủ yếu tập trung vào làm thế nào để làm việc với và sử dụng các thành phần Flash từ một quan điểm scripting. Để có cái nhìn toàn diện hơn của các thành phần, tham khảo tài liệu mà đi kèm với Flash. | Components A Scripting Primer Because the focus of this book is ActionScript our discussion in this lesson largely centers on how to work with and use Flash components from a scripting standpoint. For a more thorough overview of components consult the documentation that comes with Flash. A component is usually nothing more than a movie clip with some built-in functionality. Components can be customized using ActionScript in two ways You add components to a project manually by dragging them onto the stage within Flash s authoring environment via the Property Inspector or Component Inspector. You add components to a project dynamically using ActionScript while the movie plays. When a component is added by either technique you re actually placing an instance of that component type class into your project. For example if you drag and drop a CheckBox component onto the stage in the authoring environment that object is considered to be a CheckBox component instance. As when using other object instances you assign names to component instances the instance name can be used in your scripts to communicate with that component instance. A number of user interface components ship with Flash. These components allow you to create forms and menus or to display information and visual content in interactive ways. Flash also ships with data components and media components. Data components provide a relatively easy way of working with the data in your application especially sending and retrieving external data. Media components enable you to display and control the playback of media elements such as video and MP3 files. The primary focus of this lesson involves using and working with user interface components. You ll learn about media element component types in later lessons. As you learn throughout this lesson most components share some common functionalities and capabilities. As a result the common ActionScript syntax works in the same way no matter what component instance you re .