- Flash Guide 2006
- Welcome to the New Flash Reference Guide
- Flash Design Guide
- Introduction To Flash
- Working with the Authoring Tool
- Working with Templates
- FreeHand for the Power User
- Creating Animation with Fireworks
- Creating Animation in Flash
- Animating Text
- Working With Layers and Keyframes
- Working With Tweens
- Quickly Add Keyframes to Tweens
- Using Animation Paths
- Using Flash's Onion Skinning Tools
- Publishing Your Animation
- Preloading for Non-Programmers
- Drawing in Flash
- Using the Library
- Organizing Animations With Storyboards
- Working With Masks
- Making 2D Look 3D
- Working With Text
- Working With Input Text Fields
- Working With Dynamic Text
- Working with Text: Advanced Text Treatment With CSS
- Working With Text: Embedding Fonts
- Flash Interactive Developer Guide
- What is an Interactive Developer?
- Creating Flash Projects
- Using Form Applications
- Working with Form Components
- Setting up a Movie for Design and Animation
- Setting up a Movie for Programming
- Working with Components
- ActionScript Fundamentals
- Intro to Working With Arrays
- Understanding The Three Types of Arrays
- Control Data Stored in Arrays
- The Eolas Solution
- Intro to Flash Player 9
- Working with Strings
- Creating ActionScript Transitions
- Working with Boolean Objects in ActionScript
- Optimizing Delivery
- Working with Numbers in ActionScript
- Working with the Number Class
- Flash Professional 9 Preview
- Adobe Takes ActionScript Open Source
- Flash Rich Media Guide
- Pros and Cons of Flash 8 Video
- Using SMIL in Flash Video 8
- Stream an MP3 Audio File to Your Flash Movie
- Flash 8
- Introduction to Flash 8
- Advanced Text Rendering
- Using BitmapData Class in Your ActionScript
- The CacheAsBitmap Property
- Bitmap Rendering Improvements and Blend Modes
- Using The ExternalInterface Class
- Using Filters
- Downloading and Uploading Files with ActionScript
- Runtime Support for GIF and PNG Files
- Garbage Collection in Flash 8
- Using Enhanced Gradients
- Using Scale 9
- Stroke Enhancements in Flash 8
- Video Support in Flash 8
- How to Create a Slideshow
- Creating Dynamic Text in Flash
- Flash 3-D–Taking Flash to the Third Dimension!
- Object Collision Detection with Flash
- Create a Quiz With The Flash Quiz Template
- Working with Flash
- Uses for Flash
- Beyond Flash
- Flash Reference Guide
- Informit Articles and Sample Chapters
- Books
- Online Resources
- Blogs and Discussion
- Tools and Downloads
- Summary
- Flash MX Interface
- Welcome to Flash: the Designers' and Developers' Tool
- Using the Stage
- Panels, Panels Everywhere
- Using the Tools Pane
- Using the Property Inspector
- Using the Timeline Panel
- Using the Library
- Adding Interaction through the Actions Panel
- Integrating with Studio MX
- Saving and Publishing Flash Movies
- Informit Articles and Sample Chapters
- Books
- Online Resources
- Summary
- Drawing in Flash
- Shape Tools
- Applying Color
- Informit Articles and Sample Chapters
- Tools and Downloads
- Summary
- Flash Bitmaps
- Importing Bitmaps
- Exporting Bitmap Images
- Converting Bitmap Images to Vector Illustrations
- Informit Articles and Sample Chapters
- Online Resources
- Tools and Downloads
- Summary
- Flash Text and Text Fields
- Text Types
- Input Text
- Online Resources
- Tools and Downloads
- Summary
- Using the Library
- Library Organization
- Creating Instances
- Informit Articles and Sample Chapters
- Books
- Online Resources
- Summary
- Flash Animation
- Controlling Time
- Keyframe Animation
- Tweening
- Text Animation with Flash
- Informit Articles and Sample Chapters
- Books
- Online Resources
- Summary
- Flash Audio
- Using Audio in Flash
- Importing
- Linking to MP3
- Publishing Audio
- Streaming MP3 from the Flash Communication Server
- Informit Articles and Sample Chapters
- Online Resources
- Summary
- Video in Flash
- Video
- Flash Video
- Spark Codec
- Exporting Video
- Informit Articles and Sample Chapters
- Blog and Discussion
- Summary
- Flash Components
- Attaching Components to Movies
- Creating a Component
- Informit Articles and Sample Chapters
- Tools and Downloads
- Summary
- Exporting and Optimization
- Connecting Flash to the Internet
- Loading SWF Movies
- Sharing Fonts Between Movies
- Reusing Your ActionScripts
- Using Third-Party Tools
- Informit Articles and Sample Chapters
- Online Resources
- Tools and Downloads
- Summary
- Introduction to Design in Flash
- Introduction to Design
- Fundamental Design Concepts
- Breaking Up the Screen
- Branding
- Adding Forms to Movies
- Developing with ActionScript
- Introduction to Programming within Flash MX 2004
- Using ActionScript to Extend the Functionality of Flash
- ActionScript Fundamentals
- Using the Actions Panel
- Using the Reference Panel
- Rapidly Adding ActionScript with the Behaviors Panel
- Event Handling within ActionScript
- Timeline Events
- Triggering Events through User Interaction
- Flash MX 2004 Pro
- Summary
- Creating Interactive Movies
- Giving Users a Choice
- What it All Comes Down to
- Summary
- Testing your Flash Movies
- Naming Conventions
- Syntax Checker
- Testing your movies
- Summary
- Debugging
- Using the "Debugger"
- Reviewing ActionScript Error Codes
- Summary
- Using ActionScript to Control Your Movies
- Setting Up Your Movies for Interaction
- Making Movie Clips Behave Like Buttons
- Controlling Multiple Movie Clips
- Applying Different Types of Events to a Movie Clip
- Summary
- Using ActionScript to Control Text
- How ActionScript Can Control Text
- Using Cascading Style Sheets within Flash MX 2004 Dynamic Text Boxes
- Applying CSS formatting with ActionScript
- Where Do You Go Now?
- The Differences Between ActionScript 1 and ActionScript 2
- Working with Classes
- Which Version of the Flash Player should you use?
- What’s Next?
- Using Pre-Built Classes In Flash MX 2004
- Using a Class in ActionScript
- The List of Core Classes
- Flash Player-Specific Classes
- Summary
- Creating Your Own Classes
- Creating a Custom Class
- Working with External Data in Flash
- Why Use XML in Flash?
- Integrating Flash and XML
- Visual Elements
- Adding the ActionScript
- Future Shock
- Using Components
- Begin Using Components
- Building an Application with Components
- Gluing Components Together with ActionScript
- Summary
- Informit Articles and Sample Chapters
- Books and e-Books
- Online Resources
- Rich Internet Applications
- Introduction to Rich Internet Applications
- Why Use Flash for Building Application Solutions?
- Building Applications with Flash
- Getting Started
- Using Flash Variables
- Working with Parameters in the Object and Embed HTML Tags
- Linking data with Flashvars
- Getting Data Into Flash: Loading External SWF and JPG Files
- Why You Should Separate Your Files
- Loading Movies into Levels and Target Movie Clips
- Summary
- Loading SWF and JPG Images
- Working With XML: What is XML, and How Does it Relate to Flash?
- A Brief History of XML
- Why Structuring Your Data is Always a Good Thing
- How XML Came to Flash
- Summary
- Working with XML: Good XML vs. Bad XML
- Good Places to Start
- Writing Good XML
- XML Tools
- The Next Step - Using XML in your Flash Applications
- Working with XML: Loading XML into Flash
- Integrating Flash and XML
- Visual Elements
- ActionScript
- Future Shock
- Working with XML — Dynamically Building XML with .NET, ColdFusion, Java, and PHP
- ColdFusion
- .NET
- Java
- PHP
- Summary
- Working with XML — Web Services
- SOAP Support in Flash MX 2004
- Using Components to Bind Web Services into your Applications
- Summary
- Working with Data — Working with XML
- XML In Flash
- Writing XML In Flash
- Building Trees of Data with XML
- Working with Data: Pushing Data back to the Server with Load Vars
- Setting up the Database
- Writing the VB.NET Code
- Creating the Flash Movie
- Working with Data: Leveraging Persistent Connections
- Using XMLSocket Connections
- XMLSocket Server
- XMLSocket Security
- XMLSocket Class in Flash
- Creating a Pong Game with an XMLSocket Server
- Summary
- Flash Remoting
- What is Flash Remoting?
- Using Flash Remoting
- The Future of Flash Remoting
- Flash Remoting Links
- Working with Data: Macromedia Flex Presentation Server
- What Problem Does Flex Presentation Server Address?
- How does Flex work?
- Coding and Building Flex Applications
- Building Rich Internet Applications: Connecting Flash to a Database
- Using FlashVars
- Using LoadVars
- Loading XML
- Consuming a Web Service
- Live data connections with XMLSocket Connections
- Building Rich Internet Applications: Planning, Planning, Planning
- A Simple Plan
- Tools You Can Use
- Applying a Discipline
- Building Rich Internet Applications: Design Counts
- Do Not Be Afraid to Ask For Help
- What if You Do Not Have a Ben To Call
- Building Rich Internet Applications: Beyond the Movie Clip
- UI Components
- Data Components
- Media Components
- Manager Components
- Screen Components
- Building Rich Internet Applications: Using Macromedia Central
- What Central is All About
- Who is Using Central?
- Developing for Macromedia Central
- Next Steps You Need to Take
- Building Rich Internet Applications: Using Macromedia Flex
- Authoring with Flex
- Publishing with Flex
- Presenting the Solution: Delivering Flash Applications to the Web
- Flash's own Publishing Tools
- Using Dreamweaver
- Writing your Own HTML
- Presenting the Solution: Delivering Flash Over Non-PC Devices
- Using Macromedia's Flash Lite
- Programming for Flash Lite
- FlashCast
- Informit Articles and Sample Chapters
- Books and e-Books
- Flash for Designers: Rich Media Production
- Graphic Control in Flash
- Drawing in Flash
- Importing Vector Art
- Importing Raster
- Scripting Images
- Introduction to the Rich Media Production
- Using Video, Audio and Images in your Flash Movies
- Using SWF Flash Movies
- Using JPEG Images
- MP3 Sound Files
- Flash Video
- Using Components to Build Rich Media Solutions
- Using the Loader Component
- Using the Media Components
- Controlling Components with ActionScript
- Controlling the Loader Component
- Media Components
- Using Audio in Flash
- Linking to MP3
- ActionScript-Controlled Audio
- Volume Control
- Publishing Audio
- Summary
- Video in Flash
- Working with Video
- Controlling Video with Components
- Exporting Video
- Summary
- Choosing Which Version of Flash Communication Server to Use
- Server Requirements
- Installation
- Running Communication Server on Different OS Platforms
- Pitfalls to Watch for
- Summary
- Streaming Video
- Live Video
- Broadcast Video on Demand
- Flash Video Components
- The Communication Server MX Server Code for the VideoPlayBack Component
- Record Video with VideoRecord Communication Component
- Create A Video Conference
- Examining the VideoConferencing Component
- The Communication Server MX Server Code for the VideoConferencing Component
- Summary
- Using the Microphone and Camera Core Classes
- Microphone
- Camera
- Constructing Large Applications That Leverage Video and Audio
- Configuring the Server
- Creating the Movie
- Broadcasting
- Summary
- Informit Articles and Sample Chapters
- Books and e-Books
- Matthew's Predictions for 2006
- Matthew's Favorite Flash Books
- Matthew's Favorite Flash Web Resources
- Macromedia as Part of Adobe
- First Look: Flash Player 8
- First, the Facts
- What Macromedia Brings to the Table
- What Adobe Brings to the Table
- What the Two Companies Can Do for Each Other
- A Brief History of Flash
The Components bundled with Flash are designed to make development easier for you. A Component is essentially a specialized movie clip with exposed parameters that you can modify. If you have developed with tools such as Visual Studio, it’s likely that you are already familiar with Controls, which are similar time-saving tools.
Components allow you to rapidly build applications and solutions. For example, if you are building a form with a drop down menu, checkboxes, radio buttons, and a calendar control, you could spend a lot of time developing the code for these movie clips, or you could simply use the pre-built Components that come with Flash to streamline your development pains.
Think of Components as the great little helpers you need in an application. Some do simple jobs, such as adding a UIScrollBar to a Text box. Others are more complex, such as the DateChooser and others rival enterprise tools such as the DataGrid.
A Brief History of Components
Components are not new to Flash. The first set of Components made its appearance in Flash 5 (at the time, Macromedia called them Smart Clips). The idea was right, but the execution was wrong. SmartClips died under the noon day sun and were quickly dismissed.
Flash MX—or Flash 6—introduced an enhanced version of ActionScript and formally introduced Components. Macromedia, and now Adobe, have been steadily improving the functionality and form of Components since their debut. Today I rely on them for all of my work because they help me get the job done, simply and efficiently.
Where to find Components
To view the Components Panel, open Flash and Choose Window > Components. There are five sets of Components in the Components Panel:
- Data
- FLV Playback — Player 8
- FLV Playback Custom UI
- Media Players 6-7
- User Interface
These five groups, when expanded, contain over 30 Components that you can drop into a movie. The parameters of each Component can be controlled through the Properties Inspector, and both the interaction and presentation of Component can be controlled with ActionScript. Remember, this is Flash—if you do not like what you see, you can change it without damaging the integrity of the Component.
Every Component is data aware, meaning you can bind data from a Web Service, XML, or Array to it. The Data Components allow you to do this easily.
The FLV Playback—Player 8 Component is designer specifically to handle the new On2 video CODEC supported in Flash 8 Player, and can be easily customized. The FLV Playback Custom UI controls allow you to change the appearance of the FLV Playback—Player 8 Component. This is a clear example of Flash Components separating form from function. Brilliant.
The final set of Components listed in the Components Panel is the User Interface Components. There are over 20 Components in this one category alone. These Components each come with a rich level of complexity that could easily warrent individual sections in the guide. For example, the data-sensitive Components such as the List, Tree, Accordion, ComboBox, and DataGrid are extremely complex. Of particular note is the DataGrid. This is one of the most useful Components because it allows you to easily display large amounts of data in a simple and clear view, very similar in look and appearance to Microsoft's Excel.
In addition to the visual Components, there are two additional categories of Components: Managers and Screens. Managers allow you to control elements such as depth, style, system, and popup. Screens allow you to control forms and slides.
Using Components
Obviously, I do not have enough space to cover all of the Components in great detail, but I hope to give you a feel for how to use them by examining the humble UIScrollBar.
- On the stage, draw a small Dynamic Text box with the Text Tool. Name it "myText."
- Select frame one from the Timeline Panel.
- Open the Actions Panel.
- Add the following ActionScript: myText.text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer sollicitudin metus ut nibh. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In eget ante ac tortor tincidunt lobortis. Nunc egestas elit non ante. Morbi ut sem. Mauris ac nibh. Suspendisse dapibus, turpis sit amet tincidunt faucibus, arcu elit condimentum elit, eu iaculis odio ante eget mi. Praesent facilisis odio at elit. Vivamus blandit commodo orci. Ut ultrices aliquam enim. Fusce nonummy tortor in felis.";
- Test the movie by pressing F12. You will notice that not all of your text fits onto the screen. To see all of the text easily, you must use the UIScrollBar from the Components Panel.
- Select and drag an instance of the UIScrollBar from the Components Panel onto the Dynamic Text box called "myText" on the stage. Release your cursor. You will notice that a blue outlined scroll bar appears to the righthand side of the text area. Test your movie again and use the UIScrollBar to view your content.
- Select the UIScrollBar and—in the Properties Inspector—name the Component "myScrollBar."
- Open the Actions Panel and add the following ActionScript to modify
additional parameters of the UIScrollBar
this.createTextField("my_txt", 10, 10, 20, 200, 100); my_txt.wordWrap = true; this.createClassObject(mx.controls.UIScrollBar, "my_sb", 20); my_sb.setStyle("ThemeColor","haloOrange"); // Set the target text field. my_sb.setScrollTarget(my_txt); // Size it to match the text field. my_sb.setSize(16, my_txt._height); // Scroll 2 lines per click on scroll arrow. my_sb.lineScrollSize = 2; // Scroll 5 lines per click on scroll track. my_sb.pageScrollSize = 5; // Move it next to the text field. my_sb.move(my_txt._x + my_txt._width, my_txt._y); // Scroll 2 lines per click of scroll arrow. my_sb.lineScrollSize = 2; // Scroll 5 lines per click of scroll track. my_sb.pageScrollSize = 5; // Load text to display and define onData handler. var my_lv:LoadVars = new LoadVars(); my_lv.onData = function(src:String) { if (src != undefined) { my_txt.text = src; } else { my_txt.text = "Error loading text."; } }; my_lv.load("http://www.helpexamples.com/flash/lorem.txt");
- Now test your movie again to see the affects of the modified Component.
Summary
Components are very useful. Here you have been introduced to Components and given a tour of one of the more simple Components: the UIScrollBar. You can find more information on Components in other sections of the Guide. Expect to find even more coverage of specialized Components coming in future issues of the Flash Guide. There is lot to discover.