Donnerstag, 5. März 2009

ActionScript 3 pain #001 (Update 1)

SWFAddress Firefox 3.0.1 Mac Blitzer Workaround
Warum programmieren für Flash wesentlich angenehmer als für das gute alte HTML? Weil Flash wirklich plattformunabhängig ist. Ist es nicht. Ich weiß nicht, wem man hier die Schuld zuweisen muss, aber ein Aufruf von ExternalInterface führt im Firefox Mac in den meisten Fällen zu einem unangenehmen Blitzer. Wie in einem Beitrag auf blog.lessrain.com beschrieben wird, ist eine mögliche Lösung, beim Aufruf von ExternalInterface-Funktionen SetTimeout(function, 300) zu nutzen.
SWFAddress ist ein sehr nützliches Tool, um auch in Flash eine Browserhistory aufzubauen. Da es sich auf die ExternalInterface-Klasse verlässt, taucht auch hier das Blitzer-Problem auf. Aus diesem Grund, habe ich das Javascript-File von SWFAddress angepasst.
::::: Für verzweifelte AS3-Entwickler: hier runterladen
Update (06.03.2009): Ein Folgeposting auf blog.lessrain.com erwähnt, dass Asual den Workaround wohl in SWFAddress Version 2.2 eingebunden hat.

SWFAddress Firefox 3.0.1 Mac Glitch Workaround
Why it is much less pain in the a$$ to use Flash instead of good old HTML? Because it truly is a cross platform tool. It is not. I am not sure who it is to blame but on Firefox 3.0.1 a call to ExternalInterface may cause a split second graphic glitch. As noticed for example at blog.lessrain.com a possible solution is using SetTimeout(); when calling a ExternalInterface function.
As SWFAddress is heavily using ExternalInterface you eventually will run into this problem. That is why I altered the javascript file of SWFAddress for convenience.
::::: For your pleasure: Grab it here.
Update (03/06/2009): Regarding a post at blog.lessrain.com Asual has included the workaround in SWFAddress version 2.2.

Keine Kommentare:

Kommentar veröffentlichen