blog
2010 ArchiveJozef Chúťka's blog — blog.yoz.sk/2010/page/10/
February 9, 2010
chat Facebook onConference video
onConference – video chat over facebook

onConference is flash application allowing individuals & businesses to meet face-to-face. Keep in touch with your friends, family and business associates via onConference chat or live video chat.
To be more specific, onConference is using RTMFP protocol, so your conferences, even those multiuser are p2p. Yes, any conference can join multiple users. I decided to use simpliest look-n-feel á la facebook and no pageflow, so you get connected immediately… You can find onConference on http://apps.facebook.com/onconference/, please let me know if you like it, any feedback welcomed :-) .
February 8, 2010
allowscriptaccess FlexIFrame input opaque text transparent wmode
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.
February 4, 2010
shorten URLLoader URLLoaderDynamic URLRequest URLShorten URLShortenEvent URLVariables
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.
February 2, 2010
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
}January 28, 2010
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 compleThe 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.swfFor this one clipboard.swf. And its working nicely again.
January 27, 2010
Bitmap BitmapData ImageResizer ResizeEvent ResizeMath SmoothImage
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.
January 25, 2010
Facebook facebook api FacebookCall FacebookData FQL FqlQuery namespace
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…
January 22, 2010
Authorization DesktopSession Facebook facebook api FacebookLogger FacebookPopup FlexIFrame IFrame
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.
January 21, 2010
Authorization DesktopSession Facebook facebook api swc URLRequest
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.
January 19, 2010
pixel bender Shader ShaderExplorer ShaderFilter ShaderInput ShaderLoader ShaderParameter
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.