Filed under Actionscript, Flex by Ben
If you haven’t already read the intro to this tutorial, you can find it here. In it we are introduced to sprite sheets, what they are, and some examples for where to use them.
One of those examples included combining many assets into a single sprite sheet. We can then extract a portion of this bitmap as its own unique element and use it as if we had loaded it separately. This kind of sprite sheet could be used for a variety of things. Maybe you’re designing an interface and you want to group similar UI elements in order to load them all at once. You could also find yourself developing a game in which there are many items for the player to collect and you need an easy way to organize them. The example below shows such a sprite sheet:

Images © Nintendo
Extracting Sprites
Like we mentioned above, this kind of sprite sheet would be the most useful to us if we had a way to extract an individual element from it. Thankfully with the help of some code and a little Triforce of Wisdom we can do just that.
(more…)
custom class,
Sprite,
SpriteSheet,
tutorial
October 29, 2009 at 8:18 pm Comments (3)
Filed under Flash, General, iPhone by Ben
Certainly many of you heard some speculation recently that the iPhone might finally be getting Flash, only to be followed by the disappointing announcement of – No, you wish, keep dreaming. Quite frankly I wasn’t too surprised or therefore disappointed, but still a little bitter. The idea of developing for perhaps the biggest technological craze of my lifetime would be both financially and ‘spiritually‘ intriguing. Since Flash content makes up a huge percentage of the web now and the iPhone is all about that it makes sense right? I mean even some of the clunkiest of phones now have the ability to display Flash content. So why won’t the iPhone get with the freakin’ program already?
Basically it all comes down to the fact that Apple can’t make any money off of browser based games and utilities. It would kill their App Store – Not to mention: Why would anyone still be willing to pay $100 A Year for the SDK if all you needed was some hosting space and a domain name?
It’s ok.. I didn’t think “There’s a Website For That.” was too catchy of a slogan anyways.
(more…)
App,
Apple,
CS5,
iPhone
October 18, 2009 at 2:32 pm Comments (0)
Filed under Flash, Flex, General by Ben
Flash Builder 4
I’ve been using Flash Builder 4 beta for a couple of months now and for the most part have been quite pleased. FB is the follow up to Flex 3. Adobe states that the name change is to help distinguish between the open-source Flex framework and their commercial IDE. Makes sense, but personally I like the name packaged with the initial beta release – ‘Gumbo’!
So anyways, the license on my copy of Flash Builder mysteriously stopped working yesterday. After a brief panic attack I decided to check out the Adobe Labs website and noticed that the beta 2 release was out. Cool! As with beta 1, my Flex 3 license is supposed to provide me with a new working FB copy – however, licensing software is one of my least favorite things to do so I’ll get back to that after the weekend. The renewed 60 day trial will suffice for now.
Flash CS5
Since I was in this ‘update’ state of mind I decided to peruse my usual avenues and came across some info concerning the CS5 Suite. My initial reaction was, “Oh God, not another one already..“. I still haven’t gotten used to the CS4 interface, and at my office I’m still using CS3. I’m also quite afraid of Adobe turning into another Autodesk. I have to admit though – as far as Flash goes, there is A LOT of cool stuff going on.
For starters, Flash CS5 ‘Viper‘:
and my favorite:
- integrates between Flash Builder and Flash Professional
CS5 is set to release in April of 2010. I didn’t really spend a lot of time looking at the other aspects of the Suite, but one of the best resources for info I found is cs5.org. If there’s anything cool I missed be sure to let me know!
Ben
CS5,
Flash Builder
October 17, 2009 at 4:15 pm Comment (1)
Filed under Actionscript, Flex by Ben
In this post I would like to introduce you to a custom class I wrote for working with sprite sheets. Now “what’s a sprite sheet?” you might ask. Well, while I’m not going to delve into much of the theory or the speed benefits from using them, you should know a few things:
A sprite sheet is a collection of sprites arranged into a single image, where each sprite represents a frame of an animation, an asset, a part of an image, or something to that extent. The idea of a sprite sheet has been utilized for a long time, namely in early gaming systems like Atari and Nintendo. In recent times they are most often used for efficient bitmap animation and are extremely useful in tile based games for level creation.
When loading external assets, many times you will find that it is much more time and code efficient to load many in one state – Not to mention that when used effectively this can save memory. Also, once you start animating many objects in a scene you will see a real performance spike when compared to regular Flash keyframe animation. Props to 8bitrocket for some useful info.
(more…)
custom class,
SpriteSheet
October 16, 2009 at 1:10 am Comments (0)
Filed under Actionscript, Flash, Games by Ben
Once you really get going into designing basically any kind of computer game – whether it be a 2-D platformer like Contra or even online video Poker – you are eventually going to need some kind of keyboard control besides general typing. Traditionally this could be the arrow keys or W,A,S,D for movement, spacebar for jumping or plasma-ray firing, R for retry or Q for quit, but really the level of control is up to you.
(more…)
charCode,
KeyboardEvent,
keyCode,
tutorial
October 8, 2009 at 7:54 pm Comments (5)