4 June 2009

Exporting Dynamic SWF Art to Illustrator

Over the past couple of weeks I’ve been carving out a little more time for my own experimental work. Something I’ve been wanting to delve further into was dynamic abstraction. An art form made popular by the artist Joshua Davis. My platform of choice is of course Flash, and the reasons are obvious for anyone who knows me.

Now that I’m delving further into this, I’ve begun to create artwork that I would like to keep. My challenge was that I wanted to preserve the vector nature of the artwork instead of resorting to saving the work out at a bitmap. I researched the idea of using ActionScript to write out the EPS instructions to a text file so I could then change the extension to “.eps” and open it in Illustrator. After a few minutes I realized that I was overcomplicating the process. Moving from the dynamic artwork created in my SWF file to EPS is actually very easy to do.

Once the SWF file runs and generates the artwork that I was to export I can simply select “Print…” from my Flash Player menu, and select to print it out as a PDF file. This is something that you can do natively on my MacBook Pro. From here I just open the file up in Illustrator and I’m set. I have a complex rendering perfectly preserved with all its complexities in vector format. It’s a pretty low-brow process, but hey, it works perfectly for what I want to do.

I’m sure plenty of folks have already figured this out as a viable process, but I thought I’d share my approach here just in case there are others out there like me that can find themselves looking for an unnecessarily complex solution. Sometimes the answer is just sitting right there in front of you.

Continue Reading

24 August 2008

Flash/ActionScript Resources

People have often come to me asking for recommendations on resources for learning Flash and ActionScript. Each time I’ve gathered a list of what I think are excellent resources for getting into this field, and over time this compilation has become more thorough. I thought I’d post my suggestions here for others to refer to, and will try to keep this updated as I come across anything new.

I’ve grouped the following resources into what I think are logical levels and disciplines, but as you might know or come to realize, Flash has a lot of gray areas. Please browse through the topics that appeal on your interests versus simply focusing on a specific discipline.

Some websites and listservs are listed in multiple sections because they are appropriate for multiple disciplines within Flash – this goes back to the “gray areas” I was talking about.

General Flash

General Flash references are primarily for the entry-level people. These are basically primer resources that introduce you to the Flash IDE, and give you best practice approaches early on. It also never hurts for seasoned Flash users to thumb through or troll these resources. There are usually things you’ll see here that you may have forgotten, or come across something that gets you to look at an old tool in a new way to accomplish something different.

Foundation Flash CS3 for Designers, by Tom Green
This book is an excellent foundation book for anyone that wants to get started in Flash. Tom Green does an excellent job of walking you through using the application in such a natural way that it makes it enjoyable. You don’t find yourself spending too much time “reading the manual.” In my opinion just cracking open an app and playing around is the best way to really learn it, and this book does a good job of letting you do that. You will not become an expert after reading this book by any means, but you will have the right information to get you started in the right direction.

Websites

Design and Manual Animation

The resources that I list here focus on design, character animation, and motion graphic techniques that are useful both inside and outside of Flash. I’ll mark them accordingly, but the reason for this variety is because Flash animation is merely a focused area of this discipline. It’s imperative that you consider yourself an animator before you consider yourself a Flash animator.

The Illusion of Life: Disney Animation, by Ollie Johnston and Frank Thomas
Written by a two of the original Disney animators, this book is an essential resource that every animator should read thoroughly. I cannot recommend this book enough, and would consider it required reading for any designer/animator entering the field.

The Animator’s Survival Kit, by Richard Williams
This is another book that doesn’t not focus on Flash, but instead on the discipline of animation. The book focuses on techniques and approaches for honing your craft. Like any valuable animation book, these lessons hold true through any technology.

How to Cheat in Flash CS3: The art of design and animation in Adobe Flash CS3, by Chris Georgenes
I have not read many of the “How to Cheat” titles, but this book by Chris cannot be passed up. Chris began his career in the field of more traditional forms of animation before moving into Flash in it’s earlier days. His techniques are valuable, and can save you a lot of trial and error since he has paved the way for much of what is done today. Most importantly, the tools you learn here are a great foundation upon which you can build. Chris has contributed many articles to the Adobe Developer Center, and has two websites (keyframer.com and mudbubble.com) with plenty of resource material.

Websites

ListServs

ActionScript, Programmed Animation and Interactivity

Essential ActionScript 3.0 by Colin Moock
This book is the latest in a long line of key ActionScript books that have always sat at the core of any Flash developer’s bookshelf. The original books, called Definitive Guides focused on fundamentals, touched on some best practices, and finished off with the second half of the books being a thorough reference tool. As the language has evolved the books became “essentials” that covered the fundamentals, best practices, and inner workings while leaving the Flash documentation and live docs as the main reference material. As ActionScript has become a more complete and sophisticated programming language, this approach has been the better option. With third party libraries, and new packages continually being added to the language writing the book using the old approach would have simply left users with an incomplete manual. This approach allows readers to get a deeper understanding of the inner workings of the language, and still remains the first book choice for anyone entering the discipline of Flash development.

Foundation Actionscript 3.0 Animation: Making Things Move!, by Keith Peters
These books have, in my opinion, always been some of the best ActionScript for animation books that I’ve read. They cover everything from the basics, all the way to such complex topics as inverse kinematics. All examples in this book use best practice approaches in the programming examples. Another key thing to point out about this book is the approach taken when looking at how to create animation through scripting – calculating position by evaluating time instead of using frame-based animation (if this doesn’t make sense now it will after you’re more familar with the topic). This book has done a very good job of picking up where Robert Penner’s book (below) left off in ActionScript 1.0. Anyone interested in getting heavily into ActionScript animation should consider reading this book. It’s a great way of giving you starting points from which you can continue to experiment and explore.

Programming Macromedia Flash MX, by Robert Penner
This book is a classic, and helped many people look at Flash animation through the eyes of a physicist and mathematician. What eventually became the Flash Tween and easing classes was originally Robert Penner’s animation classes. Based on key math principals many Flash designers and developers were able to quickly make realistic and reusable animation. The design community simultaneously started flexing their brain muscle by pulling out old algebra, trig, and calc techniques while hearing their grade school teachers in their minds telling them “I told you that you’d need this stuff.” The code examples are dated, but the practice and process are still very relevant today.

Websites

ListServs

  • FlashNewbie – Mailing list for new users of Flash
  • FlashCoders – High traffic mailing list for programmers using Macromedia Flash. The topics discussed here are advanced.
  • FLASHmacromedia – This moderated discussion group is for Macromedia Flash users who want to use Flash more effectively for building websites, games, apps, etc.

Advanced Programming Topics

ActionScript 3.0 Design Patterns: Object Oriented Programming Techniques, by William Sanders and Chandima Cumaranatunge
This book is for the Flash programmer. At this point you should be very comfortably with the topics of classes, packages, polymorphism, and other fundamentals of Object-Oriented programming. This book takes these topics and begins putting them in to the context of design patterns. Written for the advanced programmer these patterns are essential in building frameworks, and packages designed for flexibility and longevity. I really enjoyed this book as it introduced methods not discussed in other ActionScript books.

Object-Oriented ActionScript 3.0 by Todd Yard, Peter Elst, and Sas Jacobs
Another great OOP book. This book, like Design Patterns, discuss some of the more advanced topics. This one, however, has a lower entry-point so it may be easier for users to transition into these topics by first reading this book. This one also provides more practical examples that you can begin using in your existing projects.

Advanced Flash Project Topics

Flash to the Core, by Joshua Davis
This book is now out of print, but if you can get your hands on it then do so. Like Penner’s book the code in this book is dated because it uses older versions of the language; this doesn’t matter though. It’s more a book of inspiration, and a way of getting you to stop thinking in traditional ways typically dictated by the majority of the Flash development community. Typical thought and approach in Flash leads only to mediocrity. Joshua Davis does a great job reminding readers of this in the book.

MTIV: Process, Inspiration and Practice for the New Media Designer, by Hillman Curtis
Not so much a Flash book as it is a book from a well know Flash expert, and video artist. In this book Hillman shares his process and methods as a designer. Written more as a narrative, this book also does a great job of getting you to focus on how to approach your projects. Like Joshua’s book and all great books that discuss artistic creativity, it reminds you that you always need to get out of your comfort zone and really explore to create remarkable work.

There are of course plenty of other books and resources out there, but I tried to keep this focused on a few key materials that I am confident in recommending. I will continue to add/remove/modify this list so that it’s up-to-date.

What are resources and references are you using learn Flash or even to stay up-to-date? Please feel free to share it here, and I’ll certainly include it on this list if it turns out to be a great resource or reference.

Continue Reading

1 August 2008

Flash and the Timeline *gasp*

There are quite a few developers out there that will say that Flash designers and developers should never manually use the timeline – basing this rule on the claim that they will have less control over it in a project. The other extreme are those designers that will use minimum ActionScript to manipulate the timeline playhead, and try to accomplish complex interactivity manually.

I’m going to give a slight nod to the designers on this one because less and less of them seem to be practicing the latter, albeit, because of the influence of the former group. The position I take on the matter is this: The timeline is great aspect of Flash that should never be discounted as an archaic tool left over from the application’s early days.

The claim that everything should be placed on the stage using ActionScript sounds great in theory, but in practice falls short on several points. There are certain artistic attributes that simply cannot be reproduced efficiently and effectively with ActionScript. I’m not going to go into all of the specifics here, but by using the timeline for artwork, positioning, and certain animation techniques designers and developers can free themselves of trying to accomplish the same things (unsuccessfully on many occasion) through code.

It seems like some people have forgotten or maybe never realized that Flash (or FutureSplash for those of us who have been around long enough) began as a vector animation tool. The timeline has always been essential to the application. If there is anything that Macromedia and now Adobe have fallen short on regarding the IDE, it’s that they haven’t continued to enhance the timeline capabilities enough with subsequent releases.

This doesn’t mean that people should always forgo ActionScript for use of the timeline either. As a matter of fact the more complex, dynamic and intriguing interactive pieces can only be achieved by using ActionScript. Flash expands the interactive capabilities exponentially with each version of the language, and ActionScript 3.0 with Flash Player 9 has been a huge leap forward in further expanding those capabilities.

In the end most work that relies solely on ActionScript will have dynamics and smart interaction, but can usually feel cold and hard. Work that relies completely on the timeline can be incredibly artistic and the motion inspiring, but the shelf life isn’t very long. Repeat visits don’t have the same impact because the results are already known and even expected – the initial luster fizzles.

Browsing around the web today shows countless examples of inspiring interactive Flash work. More often than not the great pieces that leave an impact on their audience are combining the two aspects of Flash harmoniously.

Both designers and developers should be using a thoughtful, creative combination of both the timeline and ActionScript to accomplish things that even Adobe themselves couldn’t have imagined.

Continue Reading

28 May 2007

MathUtilities Class (AS 3)

While the core classes in Flash have most of what I need, I often find myself wishing there were a few extra elements built into those classes.

A couple of years ago I put together a class called Math2. It was an ActionScript 2.0 class that extends the core Math class in Flash. A majority of the methods are based off of functions Robert Penner’s Programming for Macromedia Flash MX. I have since extended this class and converted it to ActionScript.

MathUtilities features include:

- radiansToDegrees
- degreesToRadians
- sinD
- cosD
- tanD
- atan2D
- angleOfLine
- acosD
- asinD
- fixAngle
- cartisianToPolar
- polarToCartisian
- color24
- color32

I also added the following public methods to the class:

- mean
- median
- mode
- range

I have not yet updated the class for ActionScript 3.0, but hope to do so soon. Converting this to AS 3 was easier than I thought seeing as this class isn’t very involved. The link is below. If you find this class useful, feel free to use and distribute this class freely, provided that it is not modified in any way (including removing the header or changing the package path):

- Math 2MathUtilities – ActionScript 3.0

Unfortunately I cannot provide any support for this class so please use the class in your projects at your own risk. If you would like to report any bugs, or have any feature requests, please feel free to post them here. All feedback is welcome.

ActionScript 3.0 Math Utilities Class (was Math2).

Updates
// 16.11.2008 – - – - – - – - – - -
New behaviors added:
- radiansToDegrees
- color24
- color32

Syntax changes:
- minor parameter names
- changed class name to MathUtilities from Math2
- moved the class to the new package ‘com.unended.util’ (from com.unended.core)

Continue Reading