TextInput wmode opaque/tranpsarent workaround

Many of you have come accross the horrendous bug that happens with text input in flash when the swf is embedded with wmode=transparent/opaque. It has been much discussed (Firefox Bugzilla entry for this bug, Adobe Forum discussion, etc.), but it seems that in all the years that this bug has existed nothing much has been done. A lot of workarounds have been published, many of them based on custom key mapping etc… My workaround uses html element <input type=”text”> that is placed right over flex <mx:TextInput>. Html element is styled transparent (no design) so user will not notice.

Read the rest of this entry »

URLShorten Class (update)

URL shortening is a technique where a provider makes a web page available under a very short URL in addition to the original address. There are hundreds of provider out there, but only a few of them provides public api and crossdomain.xml. I put toghether some of those that work and URLShorten class was created :-) feel free to use it and enjoy

Update: jdem.cz, tinyurl.com, bit.ly, tr.im, is.gd providers implemented.

Read the rest of this entry »

Quick tip: … (rest) parameter

Here is a quick tip for using … (rest) parameter in your code. It sometimes happens that you want to have your function called multiple times, when different events dispatched or even without any event dispatched. Properly you would create callback/handler functions for all events, that would call the required function. Or you can use … (rest) parameter to bypass arguments casting.

priate function init():void
{
    addEventListener(Event.ENTER_FRAME, doSomething);

    var timer:Timer = new Timer(500);
    timer.addEventListener(TimerEvent.TIMER, doSomething);
    timer.start();

    callLater(doSomething);
    doSomething();
}

private function doSomething(... rest):void
{
// whatever
}

Wordpress SyntaxHighlighter Evolved goes Error

After latest SyntaxHighlighter plugin update (version 2.3.8), there suddenly appears error window while mouse moving over SyntaxHighlighter code:

Error #2044 & text=Error #2036 Load never comple

The problem is in clipboard.swf file loading as icon (copy to clipboard). There are more people complaining on this error behaviour, and there is a simple fix. Replace this file in your wordpress:

wp-content/plugins/syntaxhighlighter/syntaxhighlighter/scripts/clipboard.swf

For this one clipboard.swf. And its working nicely again.

SmoothImage Class (update)

While Flex uses bilinear resizing method when scaling images (event for Bitmap.smoothing() method), you won’t be able to get nice results when downscaling more than 2 times. Inspired by ImageResizer class I have also created SmoothImage Class. This object extends mx.Image and uses ImageResizer.bilinearIterative() class in order to generate smoother resized results.

Read the rest of this entry »

Parsing FQL result

Facebook Query Language, or FQL, allows you to use a SQL-style interface to more easily query the same Facebook social data that you can access through other Facebook API methods (assuming your application has access!). Data returned for Facebook ActionScript Api are XML. You can access data via E4X after setting correct namespace. As for now (January 25, 2010), Facebook result defines xmlns=”http://api.facebook.com/1.0/” , but it may change in future, so lets make it dynamic…

Read the rest of this entry »

Elegant Facebook Login For Desktop Application

Default facebook login page is usualy opened in new browser window or popup window, so user lose focus from your page. This application opens facebook login page within your flash application, so user will not lose your page. In fact little iframe trick is used.

This post connects my 3 previous posts: Flex IFrame – Web browser in flash, FacebookLogger and Facebook Extended Permissions With Authorization by Overriding Class in swc in order to create elegant solution for facebook connect with your desktop application (means outside facebook iframe or fbml). I recomend to read all previous mentioned posts before trying to run this app.

Read the rest of this entry »

Facebook Extended Permissions With Authorization by Overriding Class in swc

It may be not popular, but it is possible to substitute / override whole class from .swc file. Lets say you are using some public api, in our case Facebook actionscript api. I admire work of developer team, but I would like to have some things different. My facebook application requires publish_stream extended permission right after user login (authorize) my application. Even if official facebook api documentation says it is possible to ask for extended permission with login.php call (req_perms parameter), our facebook actionscript api does not offer setting this parameter.

Read the rest of this entry »

Pixel Bender Explorer

Pixel Bender Explorer is simple application that lets you dynamicly load .pbj files, apply it on image and edit shader values. Application uses two classes. ShaderLoader class loads external .pbj file and casts loaded binary data into Shader object. ShaderExplorer class inspects created Shader object and generates editable form based on Shader parameters. You can load your own external .pbj files (crossdomain.xml required near .pbj file) or feel free to download and use whole .swf application localy.

Application inspired by Enumerating Pixel Bender filter parameters and metadata dynamically in Flash and Introduction to Pixel Bender: Part 2 articles.

Read the rest of this entry »

What Else You Should Know About Flash/Flex

Even for seniors, there is still something to learn. I have chosen those great articles that would help you improve your knowledge about flash and flex and something littlebit behind the scenes.

Flex SDK coding conventions and best practices

This document lays out the coding standards for writing open-source Flex framework components in ActionScript 3. Adhering to these standards makes the source code look consistent, well-organized, and professional…

The Flex Non-Docs (previous site)

For all those secrets in Flex, those that aren’t known, those that aren’t published, or those that are just hard to find for some unknown reason, like percentWidth…

10 Things Every Senior Flash Developer Should Know

John Lindquist interviewed quite a few Flash/Flex developers as potential employees for Roundarch. The hard part for him is knowing exactly what questions to ask to be able to gauge a Flash dev’s skill level…

Nemo 440 – ActionScript 3 disassembler in AIR

Nemo 440 is free ABC code diassembler implemented as AIR-based application. Nemo 440 can read SWF files compiled with Flex 2/Flex 3/Flex 4 and translates ActionScript 3 byte code to more understandable text dump.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes