Music and video streaming application written in ANSI C

October 3rd, 2011

This is a small application which can stream your local media(music, video) over the internet.

By accessing the server`s administrator interface (from a browser), you can create your own playlist, add it to Winamp (and many other music and video players), and play it.

It was started a few weeks ago as a free time project, so there is still lot to do (bug fixes, optimizations), but it is a working version and you can use it without any cost.

Author: zoli Categories: General Tags: , , , , ,

Flex Improved Image Component- Advanced resizing, aligning, and fitting functionality

October 8th, 2010

We prepared an small demo using three basic and easy concepts of our framework: ImageEx, CommitHandler and ImageCacheManager.

This is a version modified for easy and fast implementation and further usage in your own projects.

Description for demo:

ImageEx

ImageEx contains resize functionality for the BitmapData received from ImageCache class like:

  • basic resize – without keeping the aspect ratio (scale = true)
  • scale and keep the aspect ratio of the image – scale the content as long as it’s possible without losing image information  (scale = true,  maintainAspect=true)
  • scale and fit the image – scale the content as long as it’s possible in such a way that the whole drawing area to be filled by losing image information (cropping) (scale=true, fit=true)

and also alignment in the case which there is some available space around the image: vertical top, middle and bottom;  horizontal left, center and right

CommitHandler

A small simple concept for optimizing the drawing in this case of an image, by listening to a Timer event which will be surely executed much later after a series of 5 or 10 properties called one after another, thanks to the false ActionScript3 asynchronous Timer functionality. See the ImageEx for better understanding in commit() method and follow using trace console in debug mode for “drawings” values when click the Reset properties button.

ImageCacheManager (ImageCache)

Class that enables static caching of  loaded image in you application, an useful feature that must be seen in a DataGrid render for example when scrolling many images rows.

Please be careful because some extra functionality that was strongly tied to our framework was stripped, so please feel free to customize this code for your own implementation.

Use the example below to test this functionality:

Click here to view example in a new window

We hope that this will be useful for you.

Author: zmoky Categories: General Tags:

Example on how to create a business cards PDF document using ARX Reports

October 7th, 2010

This is our first example on how to use ARX Report Designer and ARX Renderer to create a simple business card pdf. You can follow our blog for more example that will come soon (here or on the product website )

Author: admin Categories: AIR, Actionscript, Flash, Flex Tags:

Advanced Report Creation Suite

October 2nd, 2010

We just launched a new product website www.arx-reports.com; soon we will start a beta-test program.

ARX (Advanced Report Creation Suite) is our answer to the AS3/Flex based applications for report creation necessity - we encountered over the time. We created a friendly Report Designer and Report Rendering library, used for fast designing and generation of reports, under this development platform.

Author: cipri Categories: AIR, Flash, Flex Tags:

Capturing UIComponents as Bitmap or encoded ByteArray

April 25th, 2009

We found useful to have a simple static class helping us to quick capture parts of the flex application(or specific components) as Bitmap or encoded ByteArray, ready to be sent server-side to be saved as image (or simply saved from AIR app).  Here is the class, maybe you can find it usefull for your projects:

?View Code ACTIONSCRIPT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.geom.Matrix;
	import flash.geom.Rectangle;
	import flash.utils.ByteArray;
 
	import mx.core.IUIComponent;
	import mx.graphics.codec.JPEGEncoder;
	import mx.graphics.codec.PNGEncoder;
 
	public class ScreenCapture
	{
 
		static private var bitmap:Bitmap;
		static private var bitmapData:BitmapData;
 
		static public const JPEG:String	= "jpeg";
		static public const PNG:String	= "png";
 
		/**
		 * Return a bitmap instance based on params
		 */
		static public function getBitmap(area:Rectangle, fromTarget:IUIComponent):Bitmap
		{
			bitmapData	= new BitmapData(area.width,area.height);
			bitmap		= new Bitmap(bitmapData);
 
			var matrix:Matrix	= new Matrix();
			matrix.tx	= area.x;
			matrix.ty	= area.y;
 
			bitmapData.draw(fromTarget,matrix);
			return bitmap;
		} 
 
		/**
		 * returns a byte array encoded as specified in imageFormat argument
		 * Values are JPEG and PNG.
		 */
		static public function getImage(area:Rectangle, fromTarget:IUIComponent,imageFormat:String="jpeg",quality:Number=80):ByteArray
		{
			getBitmap(area, fromTarget);
 
			if ( imageFormat	== PNG)
			{
				return encodePNG();
			}
			return encodeJPEG(quality);
		}
 
		/**
		 * Encodes as jpeg with specified quality
		 */
		static private function encodeJPEG(quality:Number):ByteArray
		{
			return (new JPEGEncoder(quality)).encode(bitmapData);
		}
 
		/**
		 * Encodes as png
		 */
		static private function encodePNG():ByteArray
		{
			return (new PNGEncoder()).encode(bitmapData);
		}
 
	}
}

and here is an example of use.
Enjoy it :)

?View Code ACTIONSCRIPT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
		/**
		 * Example function to get Bitmap object
		 */
		public function getCapture():void
		{
			var bitmap:Bitmap	= ScreenCapture.getBitmap(new Rectangle(0,0,cmp.width,cmp.height),cmp);
			rawChildren.addChild(bitmap);
		}
 
		/**
		 * Example function to get enoded ByteArray as jpg or png
		 */
		public function getImageEncoded(imageType:String):void
		{
			var bytearray:ByteArray	= ScreenCapture.getImage(new Rectangle(0,0,cmp.width,cmp.height),cmp,ScreenCapture.JPEG,85);
			//	var bytearray:ByteArray	= ScreenCapture.getImage(new Rectangle(0,0,cmp.width,cmp.height),cmp,ScreenCapture.PNG);
			//	.... rest of code to handle bytearray to be saved ...(server side or using AIR...)
		}
Author: cipri Categories: AIR, Actionscript, Flex Tags:

New blog, old flash project

April 24th, 2009

Hello world!
We just started our blog and we choose to post one of the old flash project (actionscript 2) we made ~1-1.5 years ago. The project is live only on our server, but anyway … enjoy it.
PS: “Save” functionality is not working, guess why…

Can painter demo

Click the image for demo

More to come.

Author: cipri Categories: Actionscript, Flash, Php Tags: ,