You’ll find that creating rich media Flash movies is much easier than creating similar effects in, say, Java, Dynamic HTML or Visual Basic, so there is an immediate, upfront cost advantage.Last week we broached the topic of Macromedia’s Flash system and discussed the basics of creating animations. If that were all you could do with Flash, the results would be pretty cool, but add programmability to that and the results can be fantabulous!Programming in Flash is the province of ActionScript, Macromedia’s homegrown language that owes much of its design to JavaScript (more accurately, it is based on ECMAscript). But it differs from JavaScript in five main areas.First, its document object model is very different from that of JavaScript. Instead of the objects you’d find in a browser environment, you have a top-level object named Flash, under which are nine child objects, including: Document, an array of all the open documents; Effect, descriptors of effects such as brightness and tint; Math (need we spell this one out?); and XMLUI, for custom dialog boxes written in a subset of the XML User Interface Language (see www.xulplanet.com). Second, there are a few JavaScript statements that are not supported in ActionScript, including the switch statement and exception handling (try/catch/throw).Third, ActionScript supports some statements, such as event handlers and message sending, that don’t exist in JavaScript. Fourth, under ActionScript the evaluation function evaluates only variable references rather than evaluating strings that represent arithmetic expressions as JavaScript does.And fifth, ActionScript supports only a subset of some of the built-in JavaScript objects such as Date and String, and their methods and properties.So there you have it, better and worse. Be that as it may . . . the result is a rich, complex language that any self-respecting JavaScript programmer would take one look at and say, “Groovy, it will cost you double” . . . but would be able to handle immediately.The first version of the language, ActionScript 1.0, was superseded by ActionScript 2.0, which introduced improvements. And ActionScript 2.0 has been benchmarked to be three to seven times faster than Version 1.0.As much as we’d like to, we won’t go into the language basics, because it would take far too many columns to make a real dent in the topic. Instead we would refer you to Introducing ActionScript (DocFinder: 9528), an excerpt from Macromedia Flash MX 2004 ActionScript: Training from the Source by Derek Franklin and Jobe Makar, and Macromedia’s online ActionScript Basics and Introduction to ActionScript 2.0 (DocFinder: 9530).The ActionScript programming environment is part of the Flash MX development system based on the concepts of a “stage” and a “timeline,” as we discussed last week. This is where you create media elements by assembling them on the stage and arranging them on the timeline to create a movie clip. The Flash development environment includes a sophisticated script editor. This has two modes: basic, which lets you construct scripts by picking actions from a predefined list that you then customize by dialog choices that provide lots of help in defining the code; and advanced, which provides a free-form text editor with keyword coloring and a lot less interference from the help system. Scripts are tested in the Flash development environment, and there’s a script debugger to watch variables and object properties, set breakpoints and trace statement execution.Remember that Flash movies consist of a sequence of frames and that frames can be layered with separate graphical elements on each layer? Well, frames also can have scripts attached to layers within them but you have to be careful, as only the uppermost layer’s script will be executed in a given frame. Most developers assign a layer specifically for scripts to avoid confusion and errors.So now we would like to show you the obligatory “Hello World” example in ActionScript, except it is rather tricky, because the entire ActionScript paradigm is so graphics-based that we’d have to resort to death by screenshots.The bottom line is that ActionScript is a complex language but the complexity is worth coming to grips with – you’ll find that creating rich media Flash movies is much easier than creating similar effects in, say, Java, Dynamic HTML or Visual Basic, so there is an immediate, upfront cost advantage. Next week we’ll wrap up Flash. Expose yourself to gearhead@gibbs.com. Related content how-to Doing tricks on the Linux command line Linux tricks can make even the more complicated Linux commands easier, more fun and more rewarding. By Sandra Henry-Stocker Dec 08, 2023 5 mins Linux news TSMC bets on AI chips for revival of growth in semiconductor demand Executives at the chip manufacturer are still optimistic about the revenue potential of AI, as Nvidia and its partners say new GPUs have a lead time of up to 52 weeks. By Sam Reynolds Dec 08, 2023 3 mins CPUs and Processors Technology Industry news End of road for VMware’s end-user computing and security units: Broadcom Broadcom is refocusing VMWare on creating private and hybrid cloud environments for large enterprises and divesting its non-core assets. By Sam Reynolds Dec 08, 2023 3 mins Mergers and Acquisitions news analysis IBM cloud service aims to deliver secure, multicloud connectivity IBM Hybrid Cloud Mesh is a multicloud networking service that includes IT discovery, security, monitoring and traffic-engineering capabilities. By Michael Cooney Dec 07, 2023 3 mins Network Security Network Security Network Security Podcasts Videos Resources Events NEWSLETTERS Newsletter Promo Module Test Description for newsletter promo module. Please enter a valid email address Subscribe