Filed under AIR

Tweening timeline animations with KitchenSync

by

One of the new features in KitchenSync 1.5 is the ability to tween animations on a MovieClip’s timeline… and I’m not just talking about gotoAndPlay(), I’m talking about controlling the starting and stopping points, speed, and easing functions of an animation on the timeline with code. It does this by incrementally controlling the current frame number of the MovieClip using a KSTween and a special ITweenTarget (a class used to control the values of an object) called TimelineController.

Take this FLA animation.

MovieClip animation

As you can see, there is a simple animation using a guide layer and labels on the key frames.

Continue reading

Tagged

Pimp my ‘clipse – a list of must-have Eclipse plug-ins for Flex/Flash Development

by

Eclipse Rims

FlexBuilder may have its ups and downs but it still remains my pick for best AS3/MXML editor on the market (with TextMate not far behind). Part of the beauty of FlexBuilder is that it’s built on the Eclipse SDK, one of the most versatile and powerful IDEs available, which is not only free and open source, but boasts a wealth of third party plug-ins for every kind of (mostly Java) development. This article will take a look at some must-have plug-ins for doing Flex development as well as some tips for tricking out your development process.

As with all of our entries, your feedback, suggestions, corrections and additions are all more than welcome.

Continue reading

(Apollo) Air FileSystem Tutorial Part 1 – File and FileStream

by

Apollo Trajectory

One of the most important new features in Apollo is the ability to access the local file system directly. This provides developers with the ability to read and edit text or html files, save preferences locally, store application states as external files, serialize and de-serialize data and much more. This tutorial will cover the File API features in Apollo step-by-step and will serve as a supplement to the talk I recently gave at the New York Flex Users Group.

This tutorial will be presented in multiple sections. This first will cover the File and FileStream classes and the subsequent ones will cover the Flex components used for viewing and accessing the file system and serializing and de-serializing data.

Continue reading

Tagged

Apollo Mail Client Version 0.3

by

screenshot

screenshot

screenshot

I’m pleased to announce the first alpha release of ApolloMail, a cross-platform POP3 / SMTP e-mail client written in Apollo (obviously) in under 500K (and most of that is my gratuitous about banner). It’s just the beginnings, really, but here is a short feature matrix:

  • Authenticated POP3
  • Authenticated SMTP
  • MIME multipart emails
  • HTML e-mail rendering
  • Image attachments
  • Base64 decoding
  • Quoted-printable decoding

Features that may be added very soon are:

  • Local message store
  • HTML e-mail composing
  • Rich Text rendering
  • Better attachment handling
  • Far more robustness

IMAP and SSL are less likely to be added soon. I would like to also use this as a platform to do something new with email, including several unique views which visualize your e-mail life graphically and in three dimensions. Otherwise it’s just another boring e-mail client.

E-mail has been around since 1971 (that’s ten years longer than me!), and it’s been built upon time and time again. I learned a ton about how e-mail works by building this app. On the other hand, I am sure I haven’t covered every kind of e-mail, POP server, or SMTP server; chances are fairly good you will come across an e-mail that this client doesn’t handle. Don’t panicdon't panic! It’s just an alpha. In addition to mail rendering, the error handling while communicating to the server could be better. If you are experiencing trouble, watch the Activity window. Further, the windowing built into this version of Apollo is a hack, so many Flex components don’t work correctly.

There are a number of interesting technologies in Apollo that this app takes advantage of, which I will be sharing all of in the coming days. First, it leverages my windowing framework which I discussed in a bit of depth before. It logs to a file using the File Logging Target I published earlier. It also uses another simple but awesome technique to implement the activity window — a String logger which exposes its cumulative log messages as a bindable variable — so the activity window is a TextArea bound to a log target which filters only a specific category of logging information (while all logs are saved to disk). It extends an abstract preferences class which makes it a snap to bind to, serialize and deserialize application preferences to disk. And of course, it makes heavy use of binary sockets and regular expressions made possible by Flash Player 9.

I’ll be writing more about the technology involved, and sharing more of the source, in another post or two. For now, grab the Apollo runtime if you need it (link has mandatory registration), and take ApolloMail for a spin! Cheers!

Update: This application is made for the Apollo Alpha. If you have the AIR Beta runtime, it will not work. The next version of ApolloMail will be upgraded for this release of the runtime.

icon ApolloMail (ZIP, 486k, ZIP decompresses to an AIR file, open the AIR file after installing the Apollo Runtime.)

Logging to a File in Apollo

by

Since Apollo apps will be run as standalone desktop applications, logging to trace output or a LocalConnection won’t really be useful once the app is installed on the end-user’s machine. It would be great to log (a responsible amount) (if you want) to the resource directory of that application itself. And it would be nice to be able to use built in logging to do so.

Well, I don’t know why this wasn’t included with Apollo, but it was certainly easy enough to add in. :) I created com.partlyhuman.apollo.logging.FileTarget so you can use the Flex logging framework while logging to a file. It supports all the options of TraceTarget (livedocs), and you can also (optionally) specify a custom filename to log to, or force it to append log output across sesssions.

Here’s how you might put in a file logging target in MXML:

<logging:FileTarget
	filename="error.log"
	append="false"
	level="{LogEventLevel.ERROR}"
	includeDate="true"
	includeTime="true"
	includeCategory="true"
	includeLevel="true"/>

That’s showing off a lot of the options. You could just do <logging:FileTarget/> and all would be fine. And if you haven’t checked out logging in Flex, it’s pretty nice (livedocs). All logging events have a category, so you get a logger for that category then call the appropriate level on it, or call log with the level as an argument. For example:

Log.getLogger("com.partlyhuman.demoapp.MainController").error("initialization failed!");
Log.getLogger("com.partlyhuman.demoapp.Bubble").info("bubble popped!");

You don’t have to be so verbose in your categories, but that’s one way to use it.

This is gonna totally become like, a thing, but… happy logging!

filecom.partlyhuman.apollo.FileTarget View Source | Download (.as, 3k)