Extending Flash MX 2004 Series: An Introduction to the JSAPI

s with the release of any new version of a software product, Macromedia Flash MX 2004 introduces a host of features. The most significant of these is what Macromedia calls the ‘Extensibility Layer’?a general term for a set of features that makes it possible for Flash developers to create and implement their own new features directly in the Flash Authoring Environment. Various third parties have already exploited the extensibility layer and are commercially distributing their own extensions to the IDE. For example the makers of SWiSH, the ever-popular text effect tool, are now selling a Flash Extension called SWiSHpowerFX that allows Flash designers to select a text field on the stage and apply to it various SWiSH text effects

The Extensibility Layer makes it possible to write macros that will automate common tasks, write tools that manipulate objects on the stage, create panels that contain graphical user interfaces, write timeline effects that animate objects on the stage and much more.


Introducing JSFL
To take advantage of these new possibilities, you need to be familiar with a new scripting language, JSFL (for JavaScript Flash), that lets you talk to the Flash MX 2004 IDE and tell it what to do.

For those of you that have seen snippets of JSFL floating around, you may have noticed a striking familiarity between that and ActionScript or JavaScript. Well spotted! The good news is that Macromedia based JSFL on the Netscape JavaScript API (JSAPI), which means that neither ActionScript coders nor those who have dabbled with JavaScript will have to learn a whole new programming language. The syntax is exactly the same, dot syntax, and ActionScript will still work with the same data types; Objects, Arrays, Strings, Numbers, and Functions.

As this article series is aimed towards Flash developers, I will write with the assumption that most, if not all of you have good knowledge of ActionScript.

Part 1: Understanding the JSFL DOM
The key to learning to write your own Flash extensions is to understand the Flash DOM and thus the first article in this series will explain the DOM in detail.

Part 2: From ActionScript to JSFL: Using Classes and Scripts
If you’re experienced with ActionScript?or even JavaScript?JSFL won’t be a stretch. There’s just a few idiosyncrasies you need to know about. Find out how to write and execute your own JSFL scripts.

Part 3: New Tools: Using History and Flash Panels for Faster Development
The History Panel is one of the best learning tools for Flash?if you know how to take advantage of the information it stores. Learn the History panel as well as how to make your own Flash panels.

Part 4: Solving UI Problems with XUL
Learn the basics of XUL?an XML-based standard for defining user interfaces.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may