| 1 | aerial.js |
|---|
| 2 | --- |
|---|
| 3 | |
|---|
| 4 | *What's this? |
|---|
| 5 | |
|---|
| 6 | aerial.js is one of the implementations of Aerial client library. |
|---|
| 7 | |
|---|
| 8 | Aerial is a technology that enables interactive RPC between the server and |
|---|
| 9 | JavaScript by using Flash for communication. |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | *Components |
|---|
| 13 | |
|---|
| 14 | - aerial.js |
|---|
| 15 | JavaScript library. |
|---|
| 16 | |
|---|
| 17 | - aerial-multicast.js |
|---|
| 18 | An extension library that extends aerial.js. |
|---|
| 19 | |
|---|
| 20 | - Aerial.as |
|---|
| 21 | ActionScript library that implements JSON-RPC. |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | *Compiling swf |
|---|
| 25 | |
|---|
| 26 | Aerial.as file needs to be compiled by Flex SDK. |
|---|
| 27 | |
|---|
| 28 | Aerial.as depends on 'as3corelib' library, which is hosted on: |
|---|
| 29 | |
|---|
| 30 | http://code.google.com/p/as3corelib/ |
|---|
| 31 | |
|---|
| 32 | Compile it with following command: |
|---|
| 33 | |
|---|
| 34 | $ mxmlc -compiler.library-path=corelib.swc Aerial.as |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | *How to embed aerial.js to the HTML. |
|---|
| 38 | |
|---|
| 39 | This library depends on swfobject 2.0 library, which is hosted on: |
|---|
| 40 | |
|---|
| 41 | http://code.google.com/p/swfobject/ |
|---|
| 42 | |
|---|
| 43 | Add following lines to the HTML. |
|---|
| 44 | |
|---|
| 45 | <!-- in 'head' tag --> |
|---|
| 46 | <script type="text/javascript" src="/path/to/swfobject.js"></script> |
|---|
| 47 | <script type="text/javascript" src="/path/to/aerial.js"></script> |
|---|
| 48 | |
|---|
| 49 | <!-- This is optional --> |
|---|
| 50 | <script type="text/javascript" src="/path/to/aerial-multicast.js"></script> |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | <!-- in 'body' tag --> |
|---|
| 54 | <div id="aerial_swf"></div> |
|---|
| 55 | |
|---|
| 56 | <script type="text/javascript"> |
|---|
| 57 | //<![CDATA[ |
|---|
| 58 | var aerial = new Aerial("/path/to/Aerial.swf", "aerial_swf", function(){ |
|---|
| 59 | // your code .... |
|---|
| 60 | } |
|---|
| 61 | // ... |
|---|
| 62 | //]]> |
|---|
| 63 | </script> |
|---|
| 64 | |
|---|
| 65 | |
|---|
| 66 | *API Reference |
|---|
| 67 | |
|---|
| 68 | TODO |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | *Copyright and license |
|---|
| 73 | |
|---|
| 74 | Copyright (C) 2008 FURUHASHI Sadayuki <fr _at_ syuki.skr.jp> |
|---|
| 75 | |
|---|
| 76 | Licensed under the Apache License Version 2.0. |
|---|
| 77 | |
|---|