Paul-Catalin Oros

Subscribe to Paul-Catalin Oros: eMailAlertsEmail Alerts
Get Paul-Catalin Oros: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Article

The Best Kept Secret in Town

Application development with Macromedia Director

Macromedia Director is best known for building games, 3D simulations, and animations. What a lot of developers probably don't realize is that Director can also be used to build elaborate applications, and even more so now with the release of Director MX 2004, which supports ECMAScript-compliant JavaScript syntax.

Although Director is seldom mentioned as a serious contender in the applications development arena, it may very well be the best-kept secret in town! This article discusses what an application is by today's standards, and why applications are still required when everything else seems to be moving to the Web. We then introduce Director and show how it can be used as a great application development tool. In order to do so, we break an application down into its three main components - user interface, data management, and logic - and we explore how Director can be best used to implement these three main components.

Relevance of Applications
What Is Today's Definition of an Application?
Ten years ago it was easy to define what an application was; it basically was anything that ran on a computer, and the content was referred to as "documents." Today it is harder to define "application," as the boundary between documents (data) and applications (programs) has since blurred. Some documents, such as PDFs with embedded JavaScript or interactive PowerPoint presentations, do pretty much what an application use to do. On the other hand, some Web-based applications are very basic and can hardly be classified as an application as they lack the logic, personalization, and interactivity that is normally associated with an application. For the intent of this article, an application will be defined as a stand-alone medium that interacts with end users and performs some nontrivial logical tasks. Examples of such applications are:

  • An electronic catalog that informs and guides a client through the selection of a company's products
  • An interactive e-learning environment or a personalized itinerary planner for conference attendees
Such applications can be delivered as CD-ROMs, information kiosks shared by users, or downloadable installers to be executed on end users' computers. Image I shows an advanced application built with Macromedia Director (screenshot from Relate for Kids software, by Ripple Effects, Inc.).

Long Live Stand-Alone Applications
Before getting started, we should address the question of why we still need offline applications when everything else seems to be migrating to the Web. There is no doubt that the Web is a great tool for diffusing information and applications to millions of users. It also ensures you can easily keep your application fresh and content up-to-date.

Offline applications still, however, maintain their value and offer many advantages for certain types of applications and in specific situations. For example, delivering applications to today's booming mobile market in many cases needs to be done offline due to hardware and bandwidth restrictions. In addition, although bandwidth capabilities for the Internet continue to improve, certain ultra-rich media applications cannot be handled today even with broadband Internet. Furthermore, certain markets still lag behind and do not have the capabilities to easily stream large files over the Internet or to handle bandwidth-greedy applications. In cases where the Internet connection is poor or where networks are unavailable, delivering an application offline is sometimes the only way to go. Locally installing such applications can help ensure your project is optimally viewed and that end users don't tune out waiting for the information to be downloaded.

CDs/DVDs are proven money-making distribution methods that can be designed to reasonably protect content against illicit use. Online distribution of content and applications, on the other hand, is more difficult to control - and is a hot topic being discussed in courtrooms these days! If you are selling your application, it's definitely worth considering a distribution method that will ensure the highest return for you. For increased control over licensing, offline applications tend to be more secure than those distributed on the Web. The profitability of online distribution can be severely hampered by users sharing their IDs and passwords with others to access content. Having end users install the application on their local drive and enter a license key can make it a lot more difficult for your application to be distributed illegally. In addition, information and files tend to be more secure when locally saved than information stored in a Web-based application.

Another advantage of offline applications is from a completely nontechnical viewpoint. Offline applications can be delivered on CD-ROMs, which make for great tangible sales and marketing tools that can be distributed to customers and prospects. Having a physical item in hand has a stronger impact and is more memorable then simply giving out a URL. Furthermore, CD-ROMS can be customized and uniquely packaged to really stand out from the crowd. The nice thing as well is that, if positioned properly and designed to compliment existing online applications, they can actually be used as an effective tool for creating additional qualified traffic to your Web site.

Director, the Best Kept Secret in Town
Macromedia Director obviously is great for creating appealing and engaging user interfaces. With the predefined behaviors (which we will talk about later) and its cross-platform capabilities, development time is very efficient as you do not need to worry about low-level implementation. In addition, unlike some programming languages typically used for building applications, Director is very easy to learn and offers a user-friendly development environment similar to other Macromedia products.

Director also contains functionality that pertains to network integration, which makes creating hybrid (online/offline) projects fairly simple. The media support is excellent and now even includes support for DVD. This means you can use the best media type for the task at hand and not have to worry about converting it to another format.

How Director Differs from Flash
There is no doubt that both Flash and Director are great development tools, each with its own advantages. There are, however, a few key differences between Director and Flash when it comes to application development that are worth pointing out.

One of the main differences is that with Director, your application can access the end-user's operating system. This is ideal for applications where you need to read and write files to the user's hard drive or for when you need to access external applications and specialized hardware.

Another key difference is that Director has an extensible plug-in architecture. Plug-ins called Xtras allow you to add custom features and functionality to your application. You can create fully featured applications that can access, launch, and control other applications from within the Director executable. There are hundreds of existing Xtras on the market to choose from, and if you can't find what you are looking for, you can always build your own.

One final difference worth pointing out is Director's excellent and extensive support of media formats. Director supports practically all formats including DVD-Video, Flash, MP3, 3D, and AVI just to name a few. Because Director is capable of using these file formats directly, there is no need to convert them, which means the quality of the file will remain intact and there is less chance of errors occurring. This is also a great time-saver both when you are developing your applications and when you are updating it.

Image II shows a Director project using various media including PDFs (screenshot taken from the Cosmos project, by Hunt & Gather, Inc.).

Application Development - Best Practices
To properly develop an application, as with most things, great planning and quality management are essential. Application development can greatly benefit from an additional step called "architecture." This step essentially aims at devising a framework that adequately depicts the application and proposes a skeleton upon which every single feature will be built.

In the construction industry, buildings are designed first with an architectural drawing and, unless your building is identical to other ones, this drawing will be unique. The same applies for software architecture. One generic architecture cannot be applied to a collection of applications, and it is only when an application has been properly specified that it can be architected.

There are several proven methodologies that can help with the architecture of an application such as, for example, Design Patterns. Discussing the fundamentals of software architecture is in itself an article, so we won't go into it here. We will, however, discuss one approach that works well and that can provide a clean framework for designing applications. This approach involves breaking down your architecture in terms of three main layers: User Interface, Logic, and Data Management. Doing this will help provide a framework to properly design and plan your application.

The User Interface
Right out of the box Director provides all the basic tools required to quickly and efficiently implement a custom user interface. Items such as a text controls, push buttons, radio buttons, and check boxes are available and save a lot of development time. These buttons are essential in order for your user to be capable of interacting with your application. In addition, Director comes with widgets or visual controls such as menus and scroll bars.

While these elements are great in most situations, if you have spent a lot of time and effort designing a customized graphical user interface you may want to use something less generic that will integrate seamlessly with your design. Any bitmap or set of bitmaps can be combined with behaviors to create customized user interface widgets. For example, if the gray square button provided with Director is a little bland for your project you can create your own custom button using bitmaps, which have the same look and feel as the rest of your project. When your button is ready, simply put the default state on the stage and attach the push button behavior. In addition, when Director imports layered image files from applications such as Adobe Photoshop or Macromedia Fireworks, each layer of the image file is placed into separate cast members, removing the need to cut out each layer individually, which is extremely time-consuming. Image III shows a custom button using three graphics and Director's behavior

While the above example shows us how to create a customized standard button, we can take this one step further and create a button that has a custom animation when the user rolls over it. To achieve this there are a couple of options; however, the most reliable method is to create a button in Flash with the different states and import the .swf file. When the .swf cast member is dropped onto the stage it will automatically interact with the up, down, and over states of the button.

If your application needs to adopt the look and feel of the operating system that it is running on, you can use a third-party product called the OSControl Xtra. The OSControl Xtra allows you to create a user interface based on the operating system's settings and desktop themes. The interface will adapt to each end user's system and will look as if it was created for that particular OS.

The Text Asset Xtra, which comes with Director, is probably the most commonly used Xtra and is useful in almost every project. It can be used as a means to display your data to the end user or allow the end user to input or edit content.

Before Director MX 2004, advanced widgets such as a treeview, calendar, or datagrid used to be very costly and expensive to include in your Director project. Now, however, with the addition of Flash components in the latest version of Director, Macromedia has allowed us to include these items for free with little or no hassle whatsoever.

A very important issue at the moment is rendering software compliant to Section 508 of the U.S. Rehabilitation Act (accessible software for the disabled). Since Director MX, Macromedia has included a Speech Xtra and behaviors with Director, which developers can use to help render their project accessible. Developers can use these free tools to enable text to be read using any standard Text-to-Speech software on the end user's computer.

Logic
The logic of an application drives the user interface by using services provided by the Data Management layer. Logic should be considered distinct from the user interface and the data management, even though it is closely related to them both. Most of the programming happens at the logic level: we describe here what the application should react to, how it should react, and where to find the data needed in order to accomplish the required tasks.

Traditionally, Lingo script has been the programming language available for Director developers. Lingo, which is completely cross-platform, has been around for many years and is a well-established and documented language but is limited to Director development. Now, however, with the release of Director MX 2004, programmers have a second option: the increasingly popular JavaScript syntax.

The JavaScript syntax is ideal for developers who are accustomed to developing for the Web as they can use their existing knowledge to code in Director (no need to learn a new syntax). Using either of the Director syntaxes, developers can develop the following types of scripts in order to create the back end of their application.

Behaviors
Behaviors in Director are pieces of reusable script that are applied to sprites to make them behave in a certain manner or to do specific tasks. Behaviors come in very handy when you have a functionality that you would like to repeat on different sprites, as parameters can be included. Behaviors also allow for a new kind of teamwork. More advanced programmers can produce behaviors that nonprogrammers can easily use by dragging and dropping them onto their user interface elements. This is particularly useful when a number of user interface elements require the use of the same behavior.

Movie and Parent Scripts
Movie scripts can be used to respond to key presses, mouse clicks, movie events such as start and stop, and your own custom events. They are available to the entire movie regardless of which frame the movie is in or which sprite the user is interacting with. They function as pieces of code that you want to use throughout your movie. Parent scripts are Director's way of providing basic object-oriented features to Lingo. Image IV shows an example of Director's scripting alternatives.

Data Management
The management of data in an application is a key consideration. When analyzing and planning your data there are two important items that need to be looked at: the structure of your data and how you plan to store your data. There are several methods available; however, the method you choose will depend greatly on the amount and kind of data you are dealing with.

Let's use an e-catalog as an example. If your e-catalog only has a few products, you can store your content in separate cast members (one cast member for every piece of data). Each product would have its own frame. While this is probably the easiest way to manage your data within Director, if you are planning to update your content often this is not the best approach.

When dealing with larger scale projects (i.e., 30-60 products in your e-catalog) you can dynamically link your cast member to external files. This is done by having one cast member serve as the container for your content, while your data is organized using files and folders on the hard disk. You can load your external files by setting the filename of the cast member to the desired file on the hard drive. When loading text into your application you can also use the FileIO Xtra that comes with Director. The FileIO Xtra allows you to open the desired text and read the content of the file into your text cast member. Using this approach also offers the major benefit that if the end user modifies the content of the cast member, you are able to save their changes back to the file located on their hard drive, an option that is not available when setting the filename of the cast member.

If, however, your e-catalog will contain hundreds of products that share similar attributes (item number, dimensions, color, price, etc.), or if your products require frequent updating, you should consider using a database Xtra to manage your data. This greatly facilitates the updating of your content by avoiding duplication of related information. There are several third-party database solutions available on the market. Choosing the right one for your project depends significantly on what your needs are. Some of the databases, such as the V12 Database Engine and FileFlex, offer a universal widest-reach kind of solution. These databases are cost effective for simpler projects, where they can reduce development time. Should your project require more advanced queries such as combinations of AND, OR, NOT queries, then databases like Valentina are more suitable. These more powerful database solutions, however, do require additional skill and experience to work with. If your project is Windows-only, Datagrip offers a good combination of both power and convenience. If you want to access a live database through a network, GoldenGate, ADOXtra and Arca are both worth considering, or if you don't shy away from Web server-side scripting, Director's own HTTP communications functions can access CGI scripts.

XML is a very popular format, especially for data exchange. For instance if your company's inventory system provides an XML file or an XML Web service, you can use Director's XML parser to retrieve data from your Web site to parse, read, and use the content within the application. This can be very useful for updating the user's local content to ensure that the application has the most recent product information.

In most situations using one of the above solutions is not enough. To get the best results you will probably have to mix and match the different methods to come up with the approach best suited to your project's requirements. Along with the above mentioned solutions, it is worth mentioning that Director also provides two very useful data structures for managing small amounts of data: lists and property lists. These structures are excellent for managing the data behind the user interface, such as populating drop-down menus with item categories and recording user's choices and selections.

Conclusion
Although the trend today is toward online applications, the need for offline applications is still evident and the future remains bright. There are a lot of opportunities still out there for those willing to venture off the online path or for those considering creating hybrid online/offline projects. If this is the route you are looking to explore, then Director is definitely something to consider for your arsenal.

However, as with any kind of development, the success of a project is not solely based on the tools you select. Having the right tools in hand is an important aspect, but a successful project is often also a result of having the combination of the best methods and the required engineering skills to get the most out of the tools you select. With the right skills and methods, Director can be a very powerful tool; in fact when used optimally it could very well be the best-kept development secret in town!

Useful Links
For those who are new to Director, Macromedia offers a free fully functional trial version of the product on their site, www.macromedia.com/downloads.

Third-Party Xtras

  • OSControl Xtra: xtras.openspark.com
  • V12 Database Engine: www.V12DBE.com
  • Valentina: www.paradigmasoft.com
  • Datagrip: www.datagrip.com
  • FileFlex: www.fileflex.com
  • ADOXtra: www.mediamacros.com
  • Arca Database Xtra: xtras.tabuleiro.com
  • GoldenGate: www.ggdbc.com

    Images

  • Relate for Kids Project: Ripple Effects, Inc.: www.rippleeffects.com
  • Cosmos Project: Hunt & Gather, Inc.: www.huntandgather.com
  • More Stories By Jason MacDonald

    Jason MacDonald is Director of Projects for Integration New Media (INM) in Montreal, Canada. Jason holds two degrees, one in Multimedia Design and the second in Graphic Design. He has been involved in the development of hundreds of client projects and has a strong focus on architecting applications that deliver a rich user experience both online and offline. He is an active member in the development community and has written whitepapers and articles that were published by Adobe/Macromedia and MX Developer Journal.

    More Stories By Paul-Catalin Oros

    Paul-Catalin Oros has been working for Integration New Media as Project Manager for the past 8 years. Paul specializes in database management and web applications and works closely with Jason on all multimedia projects requiring advanced data management functionalities.

    Comments (7) View Comments

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    Most Recent Comments
    David Smith 04/06/05 05:40:06 AM EDT

    Wow. The things you find in google. Great article. Now I need some advice. This crazy client from some fort up in the boondocks wants to make a game about exploring the northwest. It has to be as good as madden football. The budget is ten grand. Can Director do this? Make it so. ;-)

    INGr451 08/09/04 03:13:38 PM EDT

    What Steve says - "This was a decent and worthy article" -makes sense. Like he says Director can be used to build app-style systems quickly and effectively, and if you don''t have a functionality that you need, chances are high that an XTRA will be there for you that implements it. Director is going to have a strong 2004-5 i reckon...

    Longtime Multimedia Professionial 08/01/04 12:18:38 PM EDT

    The commentary posted thus far is borderline psychotic. Every once in a while, a bunch of iShell fanboys litter a discussion with references. iShell may be cool and it may be effective, but it''s just another tool in a long list of development environments. Director doesn''t suck and there is a reason it has continued to live and evolve with the times. Let''s respond to a few of these posts:

    Mr. DeSaeger: Anything worth doing is worth doing right. If a simple piece of multimedia can be created in 3 days in ANY authoring environment, it can certainly be created in Director in that same amount of time by a qualified developer. Please don''t mix developer competancy with toolsets, it''s a poor argument.

    Ian Hart: You''ve got to be kidding me! Are you aware that Director was first called Videoworks and was the Macromind flagship product before Macromind merged with the folks who created Authorware and became Macromedia? Macromedia was built on Director.

    Hector: If you didn''t want your *competition* finding out about iShell, why publicize it in a Director article then? I''ll state again, producing quality multimedia has little to do with the tools involved when compared to the talent of the developers wielding them.

    This was a decent and worthy article. Director can be used to build Application-style systems quickly and effectively, if you don''t have a functionality that you need, chances are high that an XTRA will be there for you that implements it. If there isn''t, develop one or have one developed by one of the many XTRA developers. When I consider alternatives to Director for my work, I look at Microsoft''s Visual Studio, not another multimedia integration environment.

    Anyway, to those reading this article and the commentary, I wouldn''t put too much value on the iShell trolls who came to post their poorly worded diatribes. For the record, I am not a Macromedia Employee nor an Integration New Media employee and my toolbelt is full of tools that are both Macromedia created and alternatives.

    Happy Developing,
    Steve

    Hector Navarro 07/28/04 08:41:29 PM EDT

    If you ask me what piece of multimedia I would recommend to buy I would say Director...

    I Don''t want my competition to ever find out about iShell.

    I don''t want my competition to be able to prototype a project in one day and win bids.

    I don''t want my competition to be able to author in one platform and be able to deliver to Windows, Mac OS 9 and Mac OS X.

    I want the edge, I want the ease of use and that''s why I use iShell.

    As for the rest of you, please stick with Director.

    Ian Hart 07/28/04 08:05:53 PM EDT

    The best-kept secret is how poor Director is as a professional multimedia development platform. Since Macromedia took over Director it became both awkward and expensive for cross-platform development - you need two versions to make a PC/Mac title. I''d heartily support Robert''s comments about iShell 4. It is light years ahead of Director in flexibility, development speed and price. And it is all but platform independent - a team of Mac (OS 9, X) and Windows (98, ME, NT, XP) developers can work on the same job.

    Ashley McCoy 07/28/04 07:17:08 PM EDT

    I agree,
    Director is hardly a secret, thanks for the tip on iSHell though Robert, only 6.4Mb download, I''m loadding up the demo as I type :)

    Robert B. DeSaeger 07/28/04 06:15:09 PM EDT

    I would have to say only one thing. As a developer for multimedia for nearly 9 years starting all the way back to the truly first and best multimedia development software was at it time.
    http://www.cbd-hq.com/articles/2000/000501gh_mtropolis.asp
    Director is far from being the best software secret in town. iShell 4 is.
    I would have to say proof is in the pudding and see if you can produce this in Director in 3 days total development time.
    http://www.cme-webcredits.org/COIN.html
    and 2 days troubleshooting for a total of 5 days from scratch.
    Either you are on the payroll of macromedia to say these things or one should better do its homework before giving such statements as Best Kept Secret in Town.
    Sincerely,
    Robert B. DeSaeger
    PS
    There is one thing that I have learned and that is back up your facts.