Flash Codes
Code Snippets in Actionscript 3.0 and other things related to Flash Platform.
Wednesday, May 30, 2012
How to format Date object in a custom way or using locale
When you want to format your Date object in Actionscript instead of building string on your own (using getDay() and other functions provided by Date object) you can use Date Formatters. Unfortunately there are
Labels:
Code Snippet,
Date,
Flex
Friday, May 25, 2012
Adobe AIR mobile app - how to get screen orientation?
In my recent project I had to get current screen orientation in my mobile app. How can you do this in Flex? I believe there are many ways to achieve that but here is my solution.
Labels:
AIR,
Code Snippet,
Events,
Flex,
Mobile
Tuesday, April 24, 2012
Flash Builder cannot locate the required debugger version of Adobe Flash Player
Recently I had a problem with my debug Flash Player when I wanted to debug my app from Flash Builder. When I launched debugger I got something like this:
Labels:
Errors,
Flash Builder,
Flash Player
Friday, September 9, 2011
GraphUtil - class for setting brightness and grayscale in Image
Recently in one of my projects I needed to change brightness in image that was in Spark Image control. It got me some time to find the best solution to do that. Finally I made my own class - GraphUtil. This class use ColorMatrixFilter to do all the magic. This is
Labels:
Code Snippet,
Flex
Monday, August 29, 2011
Swiz URLMapping
Swiz Framework, since the 1.0 version, has a great feature that allows you to create your own metadata processor. I didn't create any of my own yet but I found a great one created by Ryan Campbell - check his site here LINK. Generally speaking it
Labels:
Code Snippet,
Swiz
Friday, July 22, 2011
Separate class for assets
In projects with many assets it is very handy to embed them in one (or few, but in the same package) class, so you can instantiate them everywhere in the project. The benefit of this is quite obvious - after making any change in your assets you just have to change one class, you don't have to search through the code to find place that is needed to be changed. Assume that
Labels:
Assets,
Code Snippet
Monday, June 13, 2011
My first article about Swiz Framework
I wrote an article about Swiz Framework, you can read it here: LINK. It's for total beginners, I showed how to write a basic app in Swiz. Article is in Polish, but you can check source code here: LINK.
Labels:
Swiz
Wednesday, June 1, 2011
Wrapper class for RemoteObject
In my projects I use AMF connections very often. In my of my previous posts I showed you PHP class and some Actionscript code that connects to it (LINK). This code is fine when you have very simple application, but in bigger projects it's very handy to write a wrapper class for handling AMF connections. Let's start with
Labels:
AMF,
Code Snippet,
Flex
Saturday, May 7, 2011
How to watch Bindable vars in Actionscript code
Bindable vars can be watched by the MXML components - but what if we want to see in Actionscript code if bindable var is changed? Is there any way to do that? Of course there is! The class we need is mx.binding.utils.ChangeWatcher. Unfortunately this class has many downsides and generally works worse than binding in MXML, but nevertheless it's still quite useful. As usual let's start with the
Labels:
Code Snippet,
Events,
Flex
Monday, April 4, 2011
Quick way to invoke pop up window
In my last post (LINK) I showed you how to invoke a pop up window from your app. I did this by creating an instance of PopUpWindow class in my main app and then center it on current DisplayObject. I want to show you simpler and more robust way to achieve that.
Labels:
Code Snippet,
Components,
Flex
Subscribe to:
Posts (Atom)