PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/README.textile

http://github.com/andyli/casahx
Unknown | 86 lines | 51 code | 35 blank | 0 comment | 0 complexity | 9281702ceacbc73d707021b91c16a536 MD5 | raw file
 1h1. Ported from...
 2
 3"Casalib":http://casalib.org/ ("SVN":http://svn.as3.casalib.org/dev/code/ Revision 421)
 4
 5h1. Download and Install
 6
 7The most easy and proper way is from haxelib:
 8
 9@haxelib install casalib@
10
11Or you can download/checkout the source from "github repo":http://github.com/andyli/casahx .
12
13h1. Documentation
14
15Please refer to "CASA Lib for AS3 documentation":http://as3.casalib.org/docs/ . Info specific to this Haxe port is expained below.
16
17h1. Note
18
19For targets other than Flash, some of the casahx classes needs "nme":http://www.haxenme.org/. 
20
21To compile test.hxml, remember to modify the path to your local test server first.
22
23h2. Cross-target Inconsistancy
24
25All the codes in the repo is maintained to be already tested and is consistant on ALL Haxe targets, except:
26
27h3. @NumberUtil.isNumber()@
28
29Due to inconsistence of @Std.parseFloat()@ between targets, some weired expression may fail on some platform. But normal integer/float is ok and consistant(Please check the test cases in @test.TestUtil.testNumberUtil()@).
30
31h3. @LocationUtil@ 
32
33Is not avalible on PHP. Assume JS is running in the web. Assume C++/Neko is not in the web.
34
35h3. @AlignUtil@, @FlashVarUtil@, @FrameUtil@, @LibraryManager@, @UrlVariablesUtil@ , @AudioLoad@, @VideoLoad@, @Distribution@
36
37Only available on Flash target.
38
39h3. All classes that related to @DisplayObject@ and other visual stuff
40
41Not available on PHP target.
42
43h2. Different from the original casalib
44
45h3. @org.casalib.core.UInt@
46
47Added for internal use to make casahx usable in non-Flash targets.
48
49h3. @ArrayUtil@
50
51* added @indexOf()@: Same as AS3's @Array@.
52* added @lastIndexOf()@: Same as AS3's @Array@.
53* added @filter()@: Same as AS3's @Array@.
54* added @sortOn()@: Same as AS3's @Array@.
55** Options are:
56*** @ArrayUtil.SORT_CASEINSENSITIVE@
57*** @ArrayUtil.SORT_DESCENDING@
58*** @ArrayUtil.SORT_UNIQUESORT@
59*** @ArrayUtil.SORT_RETURNINDEXEDARRAY@
60*** @ArrayUtil.SORT_NUMERIC@
61** For @fieldNames@, it must be an @Array@. Even if you use only single field, you need to put it into an @Array@.
62** When using @SORT_RETURNINDEXEDARRAY@ and two elements are the same, instead of return @0@, it returns @[]@;
63* added @sortOnLite()@ and @indicesOfSorted()@: 
64** Same as @sortOn()@ but one is ingoring @ArrayUtil.SORT_RETURNINDEXEDARRAY@ and one is always @ArrayUtil.SORT_RETURNINDEXEDARRAY@. 
65** Good thing is their returns are typed as @inputArray@ and @Array<Int>@. 
66** Performance should be better than @sortOn()@.
67
68h3. @DateUtil@
69
70Added @getTimezoneOffset()@ : Same as AS3's @Date@. If date is not supplied, it use 1970-1-1, which gives best performance.
71
72h3. @ListenerManager@
73
74It does not have @getManager@ method in non-Flash targets because of lack of @Dictionary@. Instead, its constuctor is now public (in all targets).
75
76h3. @Inactivity@
77
78Seems that it is a bug of NME, it cannot detect the mouse move event in JS target.
79
80h3. @ReversibleMovieClip@
81
82Due to a limitation of Haxe, @gotoAndPlay()@ / @gotoAndStop()@ is not overridded. You need to call @play()@ / @stop()@ to stop reversing before calling @gotoAndPlay()@ / @gotoAndStop()@.
83
84h3. @StringUtil@
85
86Added @stripTags()@ : Same as php @strip_tags@, ported from "phpjs":http://phpjs.org/ .