Date: November 10th, 2011
Cate: thoughts
1 msg

The death of Flash

Yesterday the news leaked out that Adobe is pulling the plug on the development of the mobile Flash player. This kind of shocked me, since the general public will interpret this as Adobe surrendering to Steve Jobs’ bashing & HTML5. It’s like Adobe saying out loud: “OK, you guys were right, our player sucks!”

Now, even though the Flash player for mobile never really took off, I’m pretty confident that developer’s clients will now scream even louder: “We want HTML5!” So in a way Adobe is weakening its Flash browser plugin as well. It’s all about sentiment in the market place and it’s already heading towards alternative solutions as it is. Choice of technology is no longer developer driven. It’s not targeted at maximizing customer reach anymore. It’s driven by the clients of developers, not by developers themselves. By art directors just wanting to see products run on their iPads, even if that means they’re missing out on a large share of potential website visitors.

What’s the result? Without a mobile Flash player, the ways of delivering content to the end user is narrowed down. Delivery of Flash content/apps over the web looks to be extinct. So the alternative for cross platform delivery of these kind of apps is through mobile appstores. And that’s where Apple makes serious money. Another win for corporate tech, a loss for consumer choice.

Date: November 4th, 2011
Cate: FDT, Miscellaneous

[OS X] Use tab key to also access buttons

Another one of those issues I once experienced myself and get asked about from time to time: “How do I set focus to buttons with the tab key when it only cycles through input fields?”

The answer:

Just press [CTRL+F7]. It’s the OS X keyboard shortcut for changing Tab behaviour. To make it more clearer, here’s a little video showing the difference in behaviour.

Date: October 8th, 2011
Cate: thoughts

The legacy of Steve Jobs

Steve Jobs died. Being one of the most successful CEOs in leading creative companies, the world indeed lost a real leader and visionary. But people talk about Steve Jobs like he invented and built every Apple device out there. I certainly acknowledge he had a way of making creative people blossom in their best way within a large corporation. But I mainly see him as a business guy. One that made Apple shareholders really rich.

The iPhone was a groundbreaking product. But with it came a system of locking consumers into Apple’s business model. Into Apple’s own app market. Into their music services. Locking them into their mobile carrier. And voiding all warranty if you try to leave that locked down system. 

I can’t help feel that his legacy is one of leaving us with a new, mobile computing market in a horrible, segmented way while our industry was just reaching an open and standardized way of dealing with problems. Now other vendors follow. And consumers and developers pay the price. That’s a shame…

Date: August 25th, 2011
Cate: Miscellaneous

Video Dimensions Chart

Just wanted to share this, because it’s so awesome and convenient. I dragged it from wikipedia a year ago, but I’ve used it many times over the last year for rendering videos for some interactive website I’ve worked on. A must have.

video-dimensions-chart

source: wikipedia

Date: July 1st, 2011
Cate: FDT

FDT External Player security sandbox error

You might encounter this error when testing your project in FDT’s external player:

Exception fault: SecurityError: Error #2148: SWF file file:////some/path/to/a/file.swf cannot access local resource data/assetlist.xml. Only local-with-filesystem and trusted local SWF files may access local resources.

To fix this you should do 1 of these things:

1) add “-use-network=false” to your compiler arguments.
2) add the SWF file to your list of local trusted SWF files.

I chose to do the latter, because I can’t use my debugger Trazzle with the first setting.

The secret to get this working is to fill in the path to a file or folder in Flash’s Global Security Settings Panel, not like this:

/path/to/a/folder/or/file/

but like this:

file:////path/to/a/folder/or/file/

Links

Flash’s Global Security Settings Panel.

Date: June 27th, 2011
Cate: Actionscript quirks
1 msg

Colors themes in Eclipse

Just came across this nice tool for Eclipse which enables you to select another color theme. You’ll have to install this as a seperate plugin, since Eclipse doesn’t provide this by default. Really easy, just follow the instructions found here.

eclipse-color-theme

Date: May 11th, 2011
Cate: Actionscript quirks
3 msgs

Focus issues on Flash Input Textfields

So you want that cursor/caret blinking in your input textfield, but it ain’t working? Writing code to set focus to an input textfield is easy:

  |  copy code |? 
1
myTextField.stage.focus = myTextField;

That’s all there is to it. But actually getting it to also really work is something else. There are so many bugs & issues with text in Flash. And setting focus to an input textfield is just 1 category of those issues

So here’s my issue checklist:

Textfield doesn’t get focus
If the user didn’t click on your SWF, the textfield won’t be able to get focus. Thus there won’t be a caret blinking inside your textfield. So try clicking the SWF before setting focus to that input textfield.

The cursor / caret is the wrong size
You probably applied a TextFormat to your TextField instance, so you want the cursor/caret to match your big-ass 35px font. But it’s blinking and matches a 12px font. To fix this, make sure that the textfield contained some text before you set focus to it. Here’s an ugly, but effective hack: set some the text once and remove it again. After that, your cursor/caret will be of the right size.

  |  copy code |? 
1
myTextField.textField.text = " ";
2
myTextField.textField.text = "";

Date: March 30th, 2011
Cate: Actionscript quirks

Titanium Developer Android SDK issue

When trying to start a mobile project with Titanium Developer I kept running into the following error: “creation error no android-4 or android-1.6 in the android sdk”. All SDKs and Google APIs were downloaded and installed, but still it generated this error when creating a new project using the 1.6.1 mobile SDK. I figured the problem must be in Titanium Developer itself.

Just completely remove Titanium Appcelerator. I used the application AppDelete to do so, which removes the following assets:

After reinstalling Titanium Developer, everything worked fine.

Date: March 17th, 2011
Cate: ANT
2 msgs

Automatic build version management with Apache Ant

At the moment I’m developing a series of games with Actionscript and compiling them for the Adobe AIR runtime. Because I tend to forget updating that version number by hand, I started looking for a simple, automated solution. Since my entire build process was already done by Ant, I looked for a solution within Ant. And in the end it seemed to be pretty simple, making it a very likable solution.

Ant natively comes with a built-in task for buildnumber management called, what else could it be, buildNumber. Every time you call this task, it updates the value in an automatically generated textfile by 1. After that, you can easily access the value of that variable by using ${build.number} in your Ant file.

Because I’m building an AIR application, I need to inject the version number into a so-called ‘application descriptor’, which is an XML file. I do this by making a copy of a template XML-file of the descriptor and injecting the buildnumber into that copy.

So here is the Ant script doing this magic:

  |  copy code |? 
01
<?xml version="1.0" encoding="UTF-8"?>
02
<project default="updateBuildNumber" name="Build Game">
03
 
04
 <!-- properties -->
05
 <property name="app_descriptor" value="../air-assets/game-app.xml" />
06
 <property name="app_descriptor_template" value="../air-assets/game-template-app.xml" />
07
 <property name="mainversion.num" value="0"/>
08
 
09
 <!-- adds build number management to the air application descriptor -->
10
 <target name="updateBuildNumber">
11
 <!-- increment the build number, if there is no file tracking the build number, 
12
 this creates it and sets the build number to 0 -->
13
 <buildnumber file="mybuild.number" />
14
 <echo>${build.number}</echo>
15
 
16
 <!-- make a copy of the application descriptor template file -->
17
 <copy file="${app_descriptor_template}" 
18
 tofile="${app_descriptor}" 
19
 overwrite="true" />
20
 
21
 <!-- the file that we just copied contains a placeholder for the version number. 
22
 Replace that placeholder with the version number. -->
23
 <replace file="${app_descriptor}" 
24
 token="@@@ANT_BUILD_NUMBER@@@" 
25
 value="${mainversion.num}.0.${build.number}" />
26
 </target>
27
</project>

The XML file in which the version/build number is set looks something like this:

  |  copy code |? 
01
<?xml version="1.0" encoding="utf-8" ?>
02
 
03
<application xmlns="http://ns.adobe.com/air/application/2.0">
04
    <id>game</id>
05
    <version>@@@ANT_BUILD_NUMBER@@@</version>
06
    <filename>game app</filename>
07
    <name>game app</name>
08
    ....etc....
09
</application>
10

I added the buildnumber to my UI, so I could always see the version of the game:

  |  copy code |? 
1
var descriptor : XML = NativeApplication.nativeApplication.applicationDescriptor;
2
var ns : Namespace = descriptor.namespaceDeclarations()[0] as Namespace;
3
var version : String = descriptor.ns::version;
4
var tf : TextField = new TextField();
5
tf.text = version;
6
addChild(tf);

Well, that’s all there is to it. You can also download this ANT build-file with the AIR application-descriptors to take a closer look at how this works and try it out yourself.

Date: March 8th, 2011
Cate: Actionscript quirks
1 msg

mxmlc error: “unable to resolve resource bundle”

This error might cause some hairpulling. I’ve encountered it too many times, so this time I’m gonna blog my solution so I won’t be searching again in the future ;-)

Your error will most likely look something like this:

Error: Unable to resolve resource bundle “utils” for locale “en_US”.

This is a crap error message because it doesn’t clearly inform you about the desired action to take. To fix this, you’ll need to tell mxmlc where the locale can be found, which you do by adding this parameter to the compilation string:

-library-path ${FLEX_DIR}/frameworks/locale/en_US

I use a variable called FLEX_DIR which holds the path to the Flex SDK on my local computer. Of course you’re also free to enter the complete path and not use the variable. After adding this locale path, everything simply compiled.