Archive for the 'haxe' category

haXe FLV Video Streaming Multithread Server, now with webcam and mic recording

haXe FLV Video Streaming Multithread Server is small and fast multithread FLV video and audio streaming server, written competely in universal haXe language by Nicolas Canasse, the author of MTASC compiler and the author of haXe language.haXe Video server supports webcam and mic recording, improved the FLV and AMF support. There’s simple test application which you can run in just few easy steps.To test the haXe FLV Video Streaming Multithread Server:

  • unpack the distributive
  • run the server.bat
  • open video.swf
  • click “Record Cam” button
  • dance, sing and clap your hands say yeah to the camera
  • click “Stop” button
  • click “Play Rec. Video”
  • see all your actions recorded.

The first beta of haXe Video, the multithread FLV video streaming server was released February 11, 200. The goal was to create lightweight and fast media server for streaming the audio- and video- files with high performance.

Filesize of haXe Video distributive is 7 MB, where 7 MB is the size of sample video FLV file provided within the distributive. No misprint here. To be precise, the total size of all haXe Video server source files is 131 KB. Moreover, as Nicolas wrote, it is less actually: 15.3 KB for AMF+FLV+RTMP protocols and 12.5 KB for the server itself, plus + 6.8 KB for the sample UI and logic.

That’s about lightweight.

Some think that Canasse is kidding; however, he doesn’t.

XPath for haXe by Dainel Cassidy, alpha version

Daniel Cassidy has implemented the XPath support for the haXe universal language.

The aim is to fully implement XPath in compliance with W3C standard. This very alpha version of XPath for haXe still needs some features to be finished, like compilation to JavaScript, implementation such XPath functions as id(), namespace-uri() and lang(), namespaces support and some more small features, related to details of XML implementation in haXe.

Here’s XPath for haXe documentation.

See also: haXe: installation and creation of your first Flash application with haXe compiler

haXe: installation and creation of your first Flash application with haXe compiler

haXe is universal high level programming language and its free compiler. haXe lets you create applications fir such platforms as JavaScript, Flash Player 6-8, Flash Player 9 (ActionScript 3) and Neko. Author of this technology is Nicolas Cannasse, the creator of the fastest flash compiler MTASC (now you’ve got a feeling about quality of haXe). Learn more about haXe.

To install haXe compiler (for Windows users):

  1. Go to haXe download page and download installation file.
  2. Unpack. Start haxesetup.exe. Installation goes on in best guerrilla tradition, without unnecessary buzz. One second — and you see the message about succesful installation.
  3. Reboot your machine (to enable PATH variables, added at the previous step).

To create your first Flash application using haXe compiler:

  1. Create test class file ‘Text.hx’ containing the following code (haXe source files have ‘*.hx’ extension):
    class Test {
        static function main() {
            trace("Hello World !");
        }
    }
  2. Create compile.hxml file (’*.hxml’ files are used to tell compilation directives to haXe compiler) with the following code:
    -swf test.swf
    -main Test
  3. Double-click compile.hxml file to open it.
  4. Compiled ‘test.swf’ file will appear in the same folder. You can open it to see the result!

???? embed compiled swf file into web page, use standard html code for embedding flash files (test.html file):

<html>
<head><title>haXe Flash</title></head>
<body bgcolor=”#dddddd”>
<object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″
width=”400″
height=”300″
id=”haxe”
align=”middle”>
<param name=”movie” value=”test.swf”/>
<param name=”allowScriptAccess” value=”always” />
<param name=”quality” value=”high” />
<param name=”scale” value=”noscale” />
<param name=”salign” value=”lt” />
<param name=”bgcolor” value=”#ffffff”/>
<embed src=”test.swf”
bgcolor=”#ffffff”
width=”400″
height=”300″
name=”haxe”
quality=”high”
align=”middle”
allowScriptAccess=”always”
type=”application/x-shockwave-flash”
pluginspage=”http://www.macromedia.com/go/getflashplayer”
/>
</object>
</body>
</html>

Have good day with haXe!

These instructions is the compilation of the haXe Usage, haXe downloads and Getting Started with haXe/Flash pages.

For further studying and using haXe visit the last link and other haXe tutorials, for example, haXe for Flash9 as replacement of ActionScript 3.

Something is not clear? Don’t hesitate to ask here or in the haXe mailing list.