Macromedia Flash 8 Bible Free Open Book

Macromedia Flash 8 Bible

Previous Page
Next Page

How to Add a Component

You can add a component to your Stage in the following ways:

  1. Open the Components panel by going to Window ð Components or by pressing Ctrl+F7 or z+F7.

  2. Add a component to the Stage by:

    • Double-clicking: You can double-click a component and it will be added to the center of your Document window's workspace.

    • Dragging: You can add an instance by clicking the component icon and dragging it onto the Stage.

After your component is on the Stage, you can modify its parameters and properties manually in various panels or by using ActionScript code on objects or keyframes in a timeline.

Note 

You can add additional instances of your component to your document by dragging it from your Library panel onto the Stage instead of from the Component panel.

You can also add a component to your movie by using the MovieClip.attachMovie() method in ActionScript after the instance is added to your library. An example of adding a Button component to the Stage and setting a few properties using ActionScript is as follows. (This code uses standard ActionScript 1.0 syntax.)

var cbt = attachMovie("Button", "cbt ", 1);
cbt.label = "Music";

This creates an instance of a push button, labeled "Music," on the stage. You can also use ActionScript 2.0 to create a new component instance:

import mx.controls.Button;
var cbt:Button = createClassObject(Button, "cbt", 1, {label: "Test Button"});

Cross-Reference 

For more information on using the MovieClip object and attachMovie(), refer to Chapter 25, "Controlling Movie Clips."


Previous Page
Next Page
Index: [A][B][C][D][E][F][G][H][I][J][K][L][M][N][O][P][Q][R][S][T][U][V][W][X][Y][Z]


     Main Menu
Table of Contents
Back Cover
Macromedia Flash 8 Bible
Foreword
Preface
Part I: An Introduction to Flash Web Production
Part II: Mastering the Flash Environment
Part III: Creating Animation and Effects
Part IV: Integrating Media Files with Flash
Part V: Adding Basic Interactivity to Flash Movies
Part VI: Distributing Flash Movies
Part VII: Approaching ActionScript
Part VIII: Applying ActionScript
Part IX: Integrating Components and Data-Binding
Chapter 33: Using Components
What are Components?
Why Use Components?
How to Add a Component
Where to Find Components, Assets, and Parameters
Modifying Component Color Properties and Parameters
Removing Components from Your Movie
Components in Flash 8
Understanding the Listener Event Model for Components
Using the Delegate Class to Control Scope with Listeners
Using Components in Your Movie
Modifying Components
Using Embedded Fonts with Components
Replacing Component Skins
Custom Components
Summary
Chapter 34: Binding Data and Events to Components
Chapter 35: Building an Image Gallery Component
Part X: Expanding Flash
Part XI: Appendixes
Index
List of Figures
List of Tables
List of Listings
List of Sidebars


More Books
PHP Hacks
Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
The Koran (Holy Qur'an)
Macromedia Flash 8 Bible
Search Engine Optimization for Dummies
YouTube Traffic
PHP 5 for Dummies
Harry Potter and The Chamber of Secrets
Harry Potter and the Sorcerer's Stone
The Pilgrim's Progress
Wireless Hacks
Flash Hacks. 100 Industrial-Strength Tips & Tools
PayPal Hacks. 100 Industrial-Strength Tips and Tools
Amazon Hacks
Pdf Hacks
The Da Vinci Code
Google Hacks
The Holy Bible
Windows XP For Dummies
Harry Potter and the Half-Blood Prince
Seo Book
Upgrading and Repairing Networks
Macromedia Dreamweaver 8 UNLEASHED
Windows XP Annoyances
Windows XP Hacks
Microsoft Windows XP Power Toolkit
Teach Yourself MS Office In 24Hours
iPod & iTunes Missing Manual
PC Hacks 100 Industrial-Strength Tips and Tools
PC Overclocking, Optimization, and Tuning - 2th Edition
PC Hardware In A Nutshell 3rd Edition
PC Hardware in a Nutshell, 2nd Edition
Upgrading and Repairing PCs
Google for Dummies
MySQL Cookbook
Teach Yourself Macromedia Flash 8 In 24 Hours
PHP CookBook
Sams Teach Yourself JavaScript in 24 Hours
PHP5 Manual
Free Games Paper Airplanes
500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele