I’ve recently experienced problems on few AS3 websites. If you embed your SWF file with different WMode, like opaque or transparent in Firefox your Flash won’t load. Actually the Flash loads first frame and then it seems like it stops. Well, it certainly loads but the problem is that loaderInfo Event.COMPLETE and PROGRESS are not fired in Firefox.
That is LAME! Firefox has this “advanced” feature with Flash, it doesn’t load it until that browser tab has focus. Seems like we’re getting problem from there. Anyway, a workaround is to set the Event.ENTER_FRAME function that will check loader
addEventListener(Event.ENTER_FRAME, _listenLoading);// on enter frame to check if it’s loaded
private function _listenLoading(e:Event):void {
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal) {
removeEventListener(Event.ENTER_FRAME, _listenLoading);
_onSiteLoaded();
}
}
What better could we ask for ? This is Roxik presentation from Adobe MAX, great talk even if there is no translation. But like my friend said, awesomness doesn’t need translation
I am starting here a new series of posts, an Actionscript snippets that are useful in everyday programming. This is mainly because I don’t have time to share full source codes and examples, but I will try to find it. Until then I will post codes that are small but useful.
Let’s start with getting a Flashvars in AS3, something we often need to do
remove private from function if you code in Flash IDE, but I hope you are into OOP thing.
After this retrieving of Flashvar is easy
_var1 = getFlashVars().var1; // var1 is the name of the passed Flash variable
watch out, if var1 is not passed value returned will be undefined, so you can use like Ian Kirk said, but watch out for passing 0 value as Flash var then…
_var1 = getFlashVars().var1 || "defaulValue"; // var1 is the name of the passed Flash variable
This is exactly how we imagined it works, as it was the only normal way… I am a bit worried about Flash apps without states, how the crawled goes through that stuff.
Anyway let’s see how much we’re going to wait for this to be implemented by Google and rest…
Extension panel is driven by xml schema, which can be customized to fit specific project requirements. It automatically creates fla, html, css and javascript files defined in the schema. It also includes swfobject 2.1 and swfaddress 2.2 by default.
Using this extension can effectively streamline new project creation work flow. It only takes a few clicks to achieve which usually takes hours to recreate, duplicate or customize from previous projects.
Thanks to the User Interface Resource Center, we can get an insight in what is happening with OpenScreen project directly from Adobe’s Anup Murarka, Director of Partner Development and Technology Strategy, Platform Business Unit who was interview by EffectiveUI senior developer Doug Schmidt.
Until I get hold of a time to write proper article about MAX in Japan, I leave you with a bunch of pics… I’ve tried to comment as much as I could so you get a feel what was going on…
Actionscript3 libraries which you can use in your code
as3corelib, version: 0.92.1
tweener, version: 1.31.74
Progression, version 3.0.8
Thread, version 1.0
Frocessing, rev.2067@libspark(maybe)
contact us if you want to use more libraries.
Users can share their work, and there are already a lot of interesting stuff there. Respect for Kayak crew.