Category: Flash Platform


Flash development and the practice of Scripted Layout

July 6th, 2009 — 5:42pm

I will try to explain my views about best-practice Flash development for rapid prototyping – and why Soft Coding and Scripted Layout is bad for everyone. The argumentation is partly based on this article from Daily WTF, that I have enjoyed and recommended to any and all developers. But when it comes to Flash a whole other possibility of Soft Coding comes into play, namely Scripted Layout, which is the practice of adding items to stage in script only with position, sizes and other parameters specified in script or external sources (e.g. XML, database or other source). Scripted Layout is a terrible waste of time and effort and completely undermines the power and flexibility of Flash turning it into a language-wise weaker version of more mature (but graphically challenged) programming environments like C# or Java.

Continue reading »

1 comment » | Flash Platform, Programming, Trends

Minor change in handling NaN positions in Flash Player 10,0,22

July 1st, 2009 — 2:34pm

I’ve just discovered a “bug” in the latest Flash Player. Actually the “bug” was in a production, that only worked in the latest player and not in previous players. I’ve boiled it down to this:

If the x- or y-attribute of a DisplayObject is set to NaN, in previous players this caused the attribute to be set to -107374182.4. In the latest player, the attribute is set to 0.

Continue reading »

4 comments » | AS2, AS3

Using AddThis with Flash

June 8th, 2009 — 2:25pm

As I have posted recently, my (former) sharing service of choice was ShareThis. No really good reason for that choice actually, just came by their service first, and it worked like a charm. But now it doesn’t anymore (update: well it does again, but there were problems), so I looked around for alternatives.

The largest such (might even be larger than ShareThis) is AddThis. Their API is incredibly simple, as you can actually share anything by giving a simply link to their site with url and title of what to share.

Continue reading »

5 comments » | API, Flash Platform, JavaScript, Mashup

Google’s JavaScript API – Can we have SWFAddress as well?

May 26th, 2009 — 3:35pm

I have recently become a fan of Google’s very simple JavaScript API. The sole purpose of this project is to avoid all of us including common libraries like SWFObject or jQuery in every project we create and instead load it from a central (updated) repository. I have since used this in many projects.

However, who decides which libraries to include and how common should a library be, before Google will include it? Personally I believe they should add SWFAddress to the list of supported libraries as well.

Continue reading »

Comment » | API, Flash Platform, JavaScript

For-each-in loops in ActionScript 3

May 21st, 2009 — 8:03pm

For-each-in is quite a secret looping method in ActionScript. It was added in ActionScript 3 in Flash Player 9 (actually in the 8.5 release). It has existed in other languages like PHP for quite some time, and Java has a similar iteration method added in recent years. It is ideal for looping over arrays of similar-typed elements, as it loops over values, not keys.

Continue reading »

7 comments » | AS3

GTween is the bomb for rapid prototyping

May 19th, 2009 — 1:11pm

I’ve been using tweens a lot recently – for example while developing the small campaign site for the new Peugeot 206+ and Peugeot Blue Drive campaign (in Danish). I used GTween and GTweenTimeline to a great extent to really make it easy for me to implement and update.

Continue reading »

Comment » | AS3, Konstellation

My new job: Web Guru at Konstellation

May 11th, 2009 — 4:02pm

After having worked at Shockwaved, TBWA\PLAY and TBWA\Denmark through 7 years (same company, different name), I finally grew the nuts to find a new job. Actually the new job found me, as it was a bunch of former colleagues at Konstellation, who had started up 2-3 years ago and now have grown into an interesting company. I started here May 1st, 2009. They even blogged me (in Danish).

Continue reading »

1 comment » | Flash Platform, Konstellation

Using ShareThis with Flash

May 6th, 2009 — 2:44pm

This feature does currently not work – see list of updates below

ShareThis is a great service for adding shareability to your website in a very simple way. It even includes the “tip a friend” option, so you don’t need to code that for your own site. I will describe how to embed it from flash.

Note 2009/05/19: Due to changes in the ShareThis API popup-functionality is broken currently (both in my example and in some of my live projects). I have filed a bug with ShareThis to fix this ASAP.

Note 2009/05/21: ShareThis have now fixed the above bug but there is still a minor JavaScript error thrown. The popup works now though as it should from both JS and Flash.

Note 2009/06/08: ShareThis now broke it again. And this time their support staff doesn’t answer. Please see an example implemented with AddThis instead.

Note 2009/06/19: ShareThis finally fixed it again. They wrote a mail on the 17th to me stating the bug was reintroduced when they implemented CDN, but would be fixed in the next release. Let’s hope it stays that way.

Note 2009/08/14: ShareThis has recently implemented a brand new version of their service – and surprise: it is not backwards compatible. Thus my popup example is broken again. I will investigate and fix soon.

Note 2009/08/17: ShareThis has promised to deliver a flash API within a few weeks. Let’s see what happens then…

Continue reading »

13 comments » | API, AS2, AS3, HTML, JavaScript

QR codes and Flash on the Beach

October 2nd, 2008 — 12:32am

Flash on the Beach is just over and the final day had the most impressive (and the single most useful) presentations. The inspirational level this year has been great. The wonderfully beautiful creations by Eric Natzke or Robert Hodgin can take anyones breath away and the generally inspiring nature of Jonathan Harris’ works makes everyone want to do the same (if only we could get similar great ideas).

But Mario Klingemann’s presentation about reading QR codes in Flash was the most (technically) inspiring presentation in my opinion and I could immediately see a bunch of ways in which, I could use this for all different sorts of purposes – in real life advertising and not just for the fun of it. I really feel that I could join this project and make it into a complete library and so far I’ve written him a mail offering my help (and a minor possibility for optimization).

But credits also go to Grant Skinner, as his talk on important things to learn as a new web developer (in Flash in particular) gave me some good inspiration for my own job as head of development with developers of my own needing help and guidelines.

Comment » | AS3

Self-”partially applying” JavaScript functions

February 6th, 2008 — 10:54pm

Was: self-currying JavaScript functions

I read this nice post on self-currying JavaScript functions, and even though the code to me is not optimal (dispite the low line count), it is improperly named, and it depends on the Prototype JavaScript library (which I really don’t like), it is a very nice script and a very nice idea. The trick in this script is using Function.prototype.length. I didn’t know that this property existed, but after digging a bit I’ve realized, that it has been in ECMAScript at least since 3rd edition (which is the latest edition published in 1999), in JavaScript since v1.1, but only made it into ActionScript by ActionScript 3 (which I haven’t study in as much detail as I have with ActionScript 1 and 2 in relation to my book on basic programming in these versions).

In this post I discuss this property and functionality a bit further, and I implement this function for creating self-”partially applying” functions using both no framework, the MochiKit framework and the Prototype framework.

Continue reading »

3 comments » | AS3, JavaScript

Back to top

Get Adobe Flash playerPlugin by wpburn.com wordpress themes