Archive

Archive for the ‘Closer Look’ Category

ActionScript 3.0 Developers Caught in the Middle

The Pincers

The Pincers

Why Me?

When two companies that are intertwined with my fate get into a spat, I get itchy. Because we are all linked to ActionScript 3.0 in one way or another, and Adobe is linked to ActionScript 3.0 through Flex and Flash this sad state of affairs may have consequences for us all. However, those of us who do our primary development using Apple computers (Macs), our fates are doubly impacted.

Until now, I’ve always considered ActionScript 3.0 to be a friend of the world. A large proportion of Apple’s success can be traced to the applications produced by Adobe, and yet this current parting of the ways seems to be more than a hiccup in a long symbiotic relationship between these two high technology giants.

Many of this group were primed to begin writing applications for the iPhone and iPad (and some may have), but now that seems out of the question. In a strongly worded broadside against Adobe, Steven Jobs, Apple’s Boss. Now, look what we’ve got…

With Ate by his side come hot from hell,
Shall in these confines with a monarch’s voice
Cry ‘Havoc,’ and let slip the dogs of war;
That this foul deed shall smell above the earth
With carrion men, groaning for burial.

So Adobe responded to Jobs rant.

Anyway, here are my comments, and we’d like to hear from you as well:

1. He rightfully acknowledges that Apple was one of Adobe’s initial customers. However, Apple needed Adobe’s fonts as well as the PostScript language that made their initial laser printer more than really good dot-matrix printer.

2. Also, while Jobs is probably correct in noting that about half of Adobe’s products are purchased by Apple owners; most of the Apple upgrades we purchase are because of the improvements Adobe makes in its CS5 suite. I’d still have my old iMac GooseNeck were it not for the fact that Adobe’s new products required new Apple hardware.

3. In looking at the apps in my Dock, the ones I use the most are by Adobe. Were it not for iTunes, I would not use Apple software (aside from the OS) all that often. The second most-used is Microsoft Office. It’s down the line when I find Apple software not related to iTunes that I find using a good deal. QT is sometimes used, but rarely anymore because Adobe Media Player is more responsive.

4. Several software developers have argued that, “It’s just not worth it to create Macintosh versions.” Adobe was always there for Apple when a lot of other software developers threw in with PCs only.

Being a fan of both camps, I truly hope that Apple and Adobe find a common ground. Even the Mafia knows it’s more profitable to cooperate than bicker.

What do you all think?

Share
Categories: Closer Look

A Closer Look: Using MovieClip.addFrameScript()

September 23, 2009 20 comments

A Closer Look

A Closer Look

In a recent post, I looked at using the undocumented MovieClip.addFrameScript() method. It is a solution for accessing MovieClip objects with embedded tweens using external ActionScript 3.0. Not only is this important for controlling animations, but it is also a way to add code in classes that are part of a Design Pattern with ActionScript 3.0 files. In other words, you don’t have to use the Timeline or the Actions panel at all in taking advantage of the animation capabilities of Flash and at the same time have all of the advantages of using Design Patterns. In the initial use of the MovieClip.addFrameScript(), I didn’t take time to really look at what the method can do or even exactly how it works other than by example. This short post, tries to provide better documentation for this undocumented feature and an example of using it. Clicking the Play button provides an experience of the final product.(It just plays explosion flashes from the tweens in the movie clip in the library.)
play
Read more…

Share
Categories: Closer Look

Hitchhiker’s Guide to ActionScript 3.0: Dragging through the Galaxy—Part 1

September 9, 2009 11 comments
A Closer Look

A Closer Look

I have no idea how things pop into my head or why. However, they do, and like unscratched itches, if I don’t attend to them they stay put. One such idea that cropped up was…

How do you drag a live video across the screen?

I have no idea why someone would want to do that either; so don’t ask. For 95% of you reading this, the answer is simple, but for the 5% of you in rehab this post may be of some use—at least until the pink elephants go away.

Because this is a Design Pattern blog, I should include some design pattern. I could slap a Singleton in front of it, but I pretty well shot my chances of doing that with my ongoing persecution of that miserable pattern. So I need to pose my question in a broader context,

What design pattern could be used to drag anything across the screen?

Well, put that way, we can make a more interesting project. This short post simply examines how to embed and drag a non-Sprite object in a Sprite object. In Part II, we’ll see how to create a design pattern that easily allows production of objects and placing them into a Sprite instance for dragging anything.

Hitch Your Wagon to a Sprite

Back in the days before ActionScript 3.0, about the only thing you could address on the stage was a MovieClip instance—or a derivative of a MovieClip. For some of us, the lesson was too well learned, and I often think, MovieClip instead of Sprite. Anyway, you can address a Sprite just as well and you don’t have the Timeline to go along for the ride. The trick back in the day was to dump anything you wanted to go along with the MovieClip into the movie clip. So if you had a graphic symbol, for instance, that you wanted to drag, you’d just put it into the MovieClip object and drag the movie clip. However, because the key methods of startDrag() and stopDrag() are part of the Sprite class, you can use the Sprite to do the same thing.

Read more…

Share
Categories: Closer Look, Examples

A Closer Look: Programming Library MovieClips to an Interface

A Closer Look

A Closer Look

Gentle Reader Every now and then I run into something of possible interest to ActionScript 3.0 and Design Patterns. Since I spend a lot of time in the forest (Design Patterns), I may miss the trees (Program Elements). So what I may run across might be known (and obvious) to all but me. On the other hand, some may find these short digressions of possible interest and use. So as to alert readers to these random snippets I put together a Closer Look logo for these small posts that live in the nooks and crannies of OOP and Design Patterns.

Programming with MovieClips in the Library

When you create a MovieClip in the Library and set it up for Export to ActionScript, you can treat it as a child of the MovieClip class. Basically, a named MovieClip in the Library is the same as setting it up as:

        public class MyMC extends MovieClip …

One of the fundamental design pattern principles is program to an interface; not an implementation. For example, instead of declaring a movie clip instance as,

        private var myInstance: MyMC = new MyMC()

Read more…

Share
Categories: Closer Look