Home arrow Flash arrow Page 3 - Building the Front End of a Content Management System for Flash
FLASH

Building the Front End of a Content Management System for Flash


Would you like to help your clients manage the Flash content of their websites without breaking what you've created, and without you having to do it for them? This article takes you through building a content management system that will save both you and your clients a lot of time and headaches.

Author Info:
By: Jennifer Sullivan Cassidy
Rating: 4 stars4 stars4 stars4 stars4 stars / 14
July 26, 2006
TABLE OF CONTENTS:
  1. · Building the Front End of a Content Management System for Flash
  2. · Getting Started
  3. · Dynamic Text in Flash
  4. · The ActionScript

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Building the Front End of a Content Management System for Flash - Dynamic Text in Flash
(Page 3 of 4 )

The first thing we need to do is decide where we would like to place our dynamic text, or the part of our Flash movie that we can update or change from an external source. I want to note here that you can do this with a brand new Flash website and start from scratch, or you can do this with an existing website. I'll start with a new Flash document to demonstrate dynamic text and the rest of the tutorial, but it will work just as easily with a site one has already designed.

Let's open Flash, start a new document, and call it flash_cms.fla; you should have your basic tools available, as well as your Properties Inspector handy. Make the stage any size and color you'd like. For this tutorial, I've colored the stage a happy blue color and made it 500x300 pixels. 

Let's say you've decided where to place your dynamic text; we need to designate an area on the stage so that Flash knows it is dynamic text. Choose your Text Tool, and click on the stage where you've chosen to put your dynamic text. You can make your text area any size you like, but in an existing Flash movie or website, your text area size will probably depend on where you've already placed your other symbols. For the purpose of this demonstration, I have left the "Show border around text" option clicked, which is the small button to the left of the "Var:" input box, as shown in the first screen shot.

Normally I would leave this option disabled, because I want the text areas to blend smoothly into the other elements of the Flash movie or website. But for development and illustration purposes, it really comes in handy to show borders around your text, especially if you have other formatting in place with other graphic symbols or movie clips. 

Referring to the second screenshot, the blank white box centered on the stage is our dynamic text area with borders. We have "Multiline" selected as well, which will auto-wrap our text. This is good for content that has several lines.  There is also a Single-line option which is great for titles or headings; single-lines do not wrap. Okay, on to the good stuff!

The Dynamic Variables

We must somehow give Flash a way of being able to identify our dynamic text areas so that it can put our text in the right place. So, just like the use of instance names for symbols in Flash, we use them as well for our variables. 

Now, let's open the Properties Inspector. Choose "dynamic text" from the drop-down box, and then give it an instance name. Let's call this text area content1_txt. In the second screen shot above, I put a blue outline around the area where we tell Flash that this text area is dynamic text instead of static (at the lower left), and it is here that we place our variable's instance name.

Variables can be any name you wish to give them, but if you have many of these areas, you will obviously want to name them something that makes sense, such as mainContent_txt, or newsHeading_txt. Notice that I add a suffix to the variable; this is so that both I and Flash know that this is text, and not a button or a movie clip. It makes it much easier later when I'm looking at my ActionScript to see exactly which area I'm talking about; it is also the proper way to label instances in Flash.


blog comments powered by Disqus
FLASH ARTICLES

- More Top Flash Game Tutorials
- Top Flash Game Tutorials
- Best Flash Photo Gallery Tutorials
- The Top Flash Tutorials for Menus
- 7 Great Flash Tutorials
- Adobe Creative Suite 5.5 Now Available
- Critical Flash Vulnerability Heats Up the Web
- More on Nonpersistent Client-Side Remote Sha...
- Nonpersistent Client-Side Remote Shared Obje...
- Using the Decorator Pattern for a Real Web S...
- Using Concrete Decorator Classes
- Delving More Deeply into the Decorator Patte...
- The Decorator Pattern in Action
- A Simple Decorator Pattern Example
- Decorator Pattern

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials