
Here is something i did while i was testing TweenMax's bezier tweening with DistortImage class. Check the demo here and download swc file with documentation here. Pretty cool effect, huh?
(yeah, just wanted to let you know i am still alive!)
Friday, November 07, 2008
Flipping the paper - Flex 3D effect
Posted by
Mirko
at
15:03
2
comments
Labels: 3D, ActionScript 3, Flex
Friday, June 27, 2008
Exporting PDF from Flex
You know you can generate PDF documents from AS3 by using Life Cycle ES but what happens when the project you are working on requires another server technology? In my case - PHP. Well, you can just tell your client that PDF is not good option at all! Hey, that could solve the problem! OK. Since i am working on the project that requires pdf generation, i made simple class to achiefe that. You can download APDF class from Google code:
http://code.google.com/p/apdf/ .
In the package, you will find php code too (it requires PHP 5).
There are two versions of APDF you can download. The only diference is that one of them use as3corelib for image encoding - see my previous post (please be aveare that as3corelib is NOT included in the download) and the other one not. If you are on Flex 3, choose the one with out as3corelib.
The APDF class enables to create and export PDF documents from Flex. It uses open source PHP library FPDF to generate the pdf document. You can add the images or text by calling APDF methods. This is still in beta but i would really appreciate you let me know if you find any errors.
I was thinking about to make a demo application that enables you to dynamicly create pages, add images, text, links and so on but it is sooo predictible... So i made application that enables you to capture the video, add coments to captions and then finally to export all the captions to PDF. Think it's pretty cool but i will leave it to you. Check it out
HERE.
Posted by
Mirko
at
09:39
10
comments
Labels: ActionScript 3, Flex, PHP
Thursday, June 19, 2008
Image Editor in Flex
I had a fun last night building the application which allows user to edit images directly on the server. There are couple of options like color, hue, saturation... Why? Because the current project i am working on is Flex CMS with integrated web analytics and image editor - all in one. Man, it turns me on! Anyway...
If you wonder how to export valid jpg or png files form Flex, this is how you do that. First, you need to download as3corelib form Google Code........ And that's about it! :) Really, it's easy as that! In the as3corelib package, there are two classes used for image encoding: JPGEncoder and PNGEncoder.
If you are using Flex 3, you have built in classes mx.graphics.codec.JPEGEncoder and mx.graphics.codec.PNGEncoder. What these classes do is to convert BitmapData object to valid JPG or PNG as a ByteArray. Since i am using PHP all the time, i will explain how this works with PHP (the PHP is used only for decoding and for displaying the image).
I made a simple class to achieve that - you can download it from here and check the methods here(as3corelib is not included in the download).
What happens when you convert BitmapData to JPG? Well, you can't do anything with it if you do not know how to actually display ByteArray.
First, you will need to encode ByteArray with mx.utils.Base64Encoder and to decode that data on the server. This is where PHP comes with base64_decode function. And that's it. :) When you check the class i provided, you won't have to think about it and PHP code is included in the class too - just call tracePHP function.
Make shore you check the application i made for testing. There are a couple of images of my naked wife you can edit and save to your computer.
Yeah... dream on!
Posted by
Mirko
at
03:10
30
comments
Labels: ActionScript 3, Flex, PHP
Monday, June 09, 2008
Running ASDoc

Ah...Finally! I had a problem with ASDoc tool (which comes together with Flex) for a long time... I guess, running this tool from command line is much easier for developers with java background... :)
Anyway, i did some research and i finally did it - run this tool from Flex. After you take a look at these screen shots, i guess you will get the picture! :)
http://muzakdeezign.com/flex2/external_tools/external_tools_config.jpg
http://muzakdeezign.com/flex2/external_tools/external_tools_location.jpg
http://muzakdeezign.com/flex2/external_tools/external_tools_directory.jpg
And you can read the full comment here.
One thing that is missing in ASDoc tool is @includeExample command. It would come handy for code examples but for now, it's for internal use only - not included in the version of ASDoc we all have... :/
Hope we'll see it in Flex 4...
*******edit
Perfect little tool for generating ASDoc commands: http://code.google.com/p/dita/
Thanks Shang! :)
Posted by
Mirko
at
10:22
2
comments
Labels: ActionScript 3, Flex
Tuesday, June 03, 2008
Piwik ActionScript3 API
Piwik aims to be an open source alternative to Google Analytics. It gives interesting reports on your website visitors, your popular pages, the search engines keywords they used, the language they speak…
Really powerful web analytics software even if it's still in beta.
A couple months ago, i have heard with Matthieu Aubry - the project leader of Piwik Analytics team and the idea was to build AIR version of Piwik. I really wanted to do something like this (like forever) and i started to work immediately on ActionScript API. But... there is always but... I didn't had a time to finish it until now.
So i decided to put Piwik ActionScript3 API on Google code and let it find someone who will play with it. I still need to generate docs and to clean up the trash from the code and i hope i will publish it before 7.June.
Also, i made a simple AIR version of Piwik for testing purposes (this will be cool since i used papervision and Yahoo maps API for interactive map - just to give it some life :)...
going back to work....
Posted by
Mirko
at
12:59
2
comments
Labels: ActionScript 3, Flex