Archive for the 'ActionScript' Category

AS3 Design Patterns now on iPhone!

ActionScript 3.0 Design Patterns for the iPhone

ActionScript 3.0 Design Patterns for the iPhone

We were delighted to hear that our book was selected by O’Reilly to be among the first to be made available for the iPhone! If you click on the App Store icon (located just below the picture of the book’s cover), it’ll take you right to the store. Check out the tweet on our MicroBlog to see iPhone application with our book. Or just open iTunes and search for “O’Reilly Design Patterns” and there it is. Even better, it’s only $4.99, and you can have it handy wherever you and your iPhone or touch-pad iPod go. (Now if Bill can only figure out a way to get an iPhone…)

100 Posts of ActionScript 3.0 Design Patterns: A Retrospective

Bill

Bill

Chandima

Chandima

What’s 100 Posts?

Here we are at 100 posts already since we started our humble blog in 2007. Our original goal was simply to cover the design patterns that didn’t fit in our book and try to generate a discussion among ActionScript 3.0 developers about OOP and design patterns. However, we ended up going in several different directions and learned a lot (mostly from our readers) at every turn. Here’s a summary list:

  • Completed all of the original design patterns
  • Introduced PureMVC in ActionScript 3.0
  • Created Posts and Tools for OOP Principles
  • Started OOP for Artists Series
  • Launched Lunch Bucket Series: Take a Design Pattern to Work
  • Began Golden Lunch Bucket Contests and World Cup
  • Established the Closer Look Series for idiosyncratic topics
  • Lively Discussions (aka Brawls) About Contentious Topics
  • Generated best group of readers of any blog

We found that our readers are far more diverse than thought. Originally, we expected advanced and intermediate ActionScript 3.0 developers with fairly hefty programming backgrounds. However, we also found that some very smart people who were beginners at programming found their way to our site. Further, they were interested in learning ActionScript 3.0 using OOP structures. We were most gratified to find that comments from the advanced readers were directed at the less experienced in supportive and helpful ways.

What should we write about?

Instead of doing periodic polling, we are trying out a new ongoing feedback feature. See the new What should we write about widget in the center column? Type in new topic suggestions or vote on existing ones by clicking on the green button with the plus icon. You can also comment on suggestions already made.

In memorium

The cat in my simpsonized photo is in memory of my longtime pet of 15 years who was euthanized this Monday. She was suffering from liver and kidney failure. Although in pain, she remained a loving kitty until the very end.

OOP for Artists: The Empowerment of ActionScript 3.0

OOP for Artists

In a recent post I voiced my admiration for artists, designers and animators but noted that they seem to have been left out in the cold with ActionScript 3.0. I added a little helper statement not in the ActionScript 3.0 documentation—MovieClip.addFrameScript(). The idea was to encourage artists not to be too hasty in giving up on coding altogether.

Quite frankly, I was surprised by the number of comments we received on that post. I didn’t think artists bothered with our kind of discussions, and was more than a little gratified to find that some of our readers identified with the issues discussed. So I started thinking about a series of posts for helping artists.

I didn’t want to do a “dumbed down” ActionScript 3.0 for artists; so I opted for an approach that would cover the same principles that we’ve discussed throughout the life of this blog. However, I would move more deliberately and touch more bases—especially the basics of OOP. Further, I decided to use video and take advantage of the new Quicktime Player that comes with Screen Sharing. So, I created a simple class to start things off, and put it in an .f4v file (H.264 format) and you can download it by clicking the download button:
smalldownload
You will need an Adobe Media Player that is free to download. I did not include any .fla files because I’d have to put in at least two because some have CS3 and others CS4; so you’ll have to use your own .fla files. Each video is short and will play full screen using the Adobe Media Player. The only thing I need is feedback to let me know whether this kind of thing is helpful or not. I will be focusing on graphics and loading graphics, but I welcome ideas from one and all.

Artists, Animators and ActionScript 3.0

Artists and Graphic Designers

designer

For me, graphic designers and artists are angels. No matter how I try, I can only get so far in graphic design. Tools like clip art, templates, and Kuler help me achieve not awful , but that’s it. (I can even screw up clip art.) So, for anything serious, I’ve got to work with graphic artists. That’s no problem—I like working with angels.

Some graphic artist have made the transition to some version of ActionScript, but with ActionScript 3.0 most complained that they were getting left behind. Early Flash had few ActionScript options and a system for entering code that didn’t require any programming background at all. With ActionScript 2.0, things got better for developers, but designers started voicing concern over increased complexity. With ActionScript 3.0 and the loss of the ability to put code into buttons and MovieClip objects directly, some graphic artists became furious with Flash over what they saw as a betrayal. It was like a carload of kids on the way to do something fun ditched the artists and designers on the roadside.
Continue reading ‘Artists, Animators and ActionScript 3.0′

Wrong Way Warrior: Getting Flexibility with Design Patterns—Part II

Gentle Reader: This is the second part of a two-part set of posts. For this one to be useful, please take a look at Part I. Also, I’m not an expert on military operations or organizations; so if there’s any error in a basic infantry platoon, feel free to correct me. I am aware, however, of the 7-1 ratio of Service to Combat units in the modern military, and that this is only a simple component of a far more sophisticated structure—that’s why I selected it!

In the first installment of the Wrong Way Warrior, we saw how an OOP developer put together a simple proof-of-concept using what he thought was a prudent approach to a battle simulation. He’d provide the Warrior with certain characteristics and then subclass those characteristics to concrete warriors that would share the capabilities of the parent class. In addition, the concrete warriors would be given a movie clip representation of the warrior.

After the first design was sent to the customer, the response was less than favorable. It was described as “a children’s game” at best. The military advisor described it as a caveman battle plan where all of the combatants are similarly armed with a club to attack adversaries. The problem was that it was bound to a fairly static design, and it would be impossible to be used for a simulation that had more complex behaviors. However, the other submissions were not much better, and so the customer provided a simple organization within the military to simulate—the basic infantry platoon. After all, they’re paying your company $1.5 million to develop the simulation. (This was news to the developer!) Figure 1 shows the organization in terms of a new set of movie clips:
platoon
Figure 1: Movie clip representation of platoon
Continue reading ‘Wrong Way Warrior: Getting Flexibility with Design Patterns—Part II’