Parent: [r8]
changed | /trunk/samples/Barycentre.pas |
changed | /trunk/samples/Calc.pas |
changed | /trunk/samples/DragPoly.pas |
changed | /trunk/samples/Etoile.pas |
added | /trunk/samples/Flash8.pas |
changed | /trunk/samples/FlashMine.pas |
changed | /trunk/samples/Hello.pas |
changed | /trunk/samples/ZoneFlash.pas |
added | /trunk/src/Compiler.pas |
added | /trunk/src/Deflate.pas |
changed | /trunk/src/FlashPascal.dpr |
added | /trunk/src/FlashPascal.inc |
added | /trunk/src/Global.pas |
added | /trunk/src/Parser.pas |
added | /trunk/src/SWF.pas |
added | /trunk/src/Source.pas |
--- a/trunk/samples/Barycentre.pas +++ b/trunk/samples/Barycentre.pas @@ -9,22 +9,10 @@ program Barycentre; +uses + Flash8; + type - TMethod=procedure of object; - - MovieClip=external class - constructor Create(Parent:MovieClip; Name:string; Depth:integer) as Parent.createEmptyMovieClip; - procedure lineStyle(width,color,alpha:integer); - procedure beginFill(color:integer); - procedure moveTo(x,y:integer); - procedure curveTo(x1,y1,x2,y2:integer); - procedure endFill(); - procedure play(); - property _x:integer; - property _y:integer; - property onEnterFrame:TMethod; - end; - TPoint=class(MovieClip) constructor Create(Depth,x,y,Color:integer); end; @@ -36,14 +24,10 @@ function Barycentre(a,b,c:integer; t:double):integer; end; - TMath=external class(Math) - function floor(a:double):integer; - end; - constructor TPoint.Create(Depth,x,y,Color:integer); begin inherited Create(nil,'',Depth); - lineStyle(0, Color, 100); + lineStyle(0, Color); beginFill(Color); moveTo( 0,-2); curveTo(+2,-2,+2, 0); @@ -67,8 +51,6 @@ pt:array[0..6] of TPoint; a:array[0..6] of TPoint; -function Floor(a:double):integer external Math.floor; - procedure TSpot.doEnterFrame; var n,m:integer; @@ -87,7 +69,6 @@ end; var - _root:MovieClip; // static... i,j:integer; p:MovieClip; begin @@ -109,7 +90,7 @@ p:=TSpot.Create(14,0,0,$00ff00); - _root.lineStyle(0,$999999,100); + _root.lineStyle(0,$999999); _root.moveTo(pt[0]._x,pt[0]._y); j:=1; for i:=0 to 6 do begin
--- a/trunk/samples/Calc.pas +++ b/trunk/samples/Calc.pas @@ -32,41 +32,10 @@ // added for loop // added array +uses + Flash8; + type -// an "external class" let you define a Flash native class -// class name is case sensitive in this declaration (not in the code below) - TextFormat=external class - // the Constructor name can be anything, the compiler juste create a "new" class - constructor Create(const FontName:string; Size:integer); - // properties are case sensitives in this declaration - property align:string; - property color:integer; - property size:integer; - property bold:boolean; - end; - - TMethod=procedure of object; - - MovieClip=external class - // the "as" keyword let you map the constructor to a class method - // the first parameter of the constructor have to be a class type - // this parameter is replaced by a variable name when the code is compiled - constructor Create(Parent:MovieClip; Name:string; Depth:integer) as Parent.createEmptyMovieClip; - procedure beginFill(color:integer); - procedure lineStyle(width,color:integer); - procedure moveTo(x,y:integer); - procedure lineTo(x,y:integer); - property _x:integer; - property _y:integer; - property onRelease:TMethod; - end; - - TextField=external class - constructor Create(Parent:MovieClip; Name:string; depth,left,top,width,height:integer) as Parent.createTextField; - procedure setTextFormat(Format:TextFormat); - property text:string; - end; - // user defined class ! TMovieClip=class(MovieClip) edit :TextField;