Permalink
Browse files

Added pure red and pure blue.

  • Loading branch information...
AndreasOM committed Jan 20, 2012
1 parent 3e17245 commit 69672adf76de1454517e8049869ab6e68f07f949
View
@@ -0,0 +1,14 @@
+all: redonly blueonly
+
+blueonly: blue/blue.swf src/blueonly/blueonly.hx
+ haxe blueonly.hxml
+
+blue/blue.swf: blue/blue.png
+ make -C blue
+
+redonly: red/red.swf src/redonly/redonly.hx
+ haxe redonly.hxml
+
+red/red.swf: red/red.png
+ make -C red
+
View
@@ -0,0 +1,4 @@
+all: blue.swf
+
+blue.swf: blue.xml blue.png
+ swfmill simple $< $@
View
Binary file not shown.
View
Binary file not shown.
View
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<movie version="9" width="600" height="400" framerate="120">
+ <background color="#5555AA"/>
+ <frame>
+ <library>
+ <bitmap id='bluelib.BlueBitmap' import='blue.png' />
+ </library>
+ </frame>
+</movie>
@@ -0,0 +1,4 @@
+package bluelib;
+import flash.display.Bitmap;
+
+class BlueBitmap extends Bitmap{ public function new( ){ super(); } }
View
@@ -0,0 +1,9 @@
+-main BlueOnly
+-swf blueonly.swf
+-swf-version 10.1
+-swf-header 640:480:30:5555ee
+-swf-lib blue/blue.swf
+-cp src/blueonly
+-cp blue/interface
+
+
View
Binary file not shown.
View
@@ -0,0 +1,4 @@
+all: red.swf
+
+red.swf: red.xml red.png
+ swfmill simple $< $@
@@ -0,0 +1,4 @@
+package redlib;
+import flash.display.Bitmap;
+
+class RedBitmap extends Bitmap{ public function new( ){ super(); } }
View
Binary file not shown.
View
Binary file not shown.
View
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<movie version="9" width="600" height="400" framerate="120">
+ <background color="#AA5555"/>
+ <frame>
+ <library>
+ <bitmap id='redlib.RedBitmap' import='red.png' />
+ </library>
+ </frame>
+</movie>
View
@@ -0,0 +1,9 @@
+-main RedOnly
+-swf redonly.swf
+-swf-version 10.1
+-swf-header 640:480:30:ee5555
+-swf-lib red/red.swf
+-cp src/redonly
+-cp red/interface
+
+
View
Binary file not shown.
View
@@ -0,0 +1,43 @@
+package;
+
+import flash.display.Bitmap;
+import flash.display.Sprite;
+import flash.events.Event;
+import flash.Lib;
+import haxe.Log;
+
+import bluelib.BlueLib;
+
+class BlueOnly extends Sprite
+{
+ static function main()
+ {
+ var blueOnly = new BlueOnly();
+ }
+
+ var mBlue:Bitmap;
+
+ public function new()
+ {
+ super();
+ Lib.current.root.addEventListener(Event.ENTER_FRAME, onEnterFrame);
+ }
+
+ public function onEnterFrame( event : Event )
+ {
+ if (Lib.current.root.loaderInfo.bytesLoaded == Lib.current.root.loaderInfo.bytesTotal)
+ {
+ Lib.current.root.removeEventListener( Event.ENTER_FRAME, onEnterFrame );
+ run();
+ }
+ }
+
+ public function run( ):Void
+ {
+ Log.trace( "run()" );
+ mBlue = new bluelib.BlueBitmap();
+ Log.trace( mBlue );
+
+ Lib.current.root.stage.addChild( mBlue );
+ }
+}
View
@@ -0,0 +1,43 @@
+package;
+
+import flash.display.Bitmap;
+import flash.display.Sprite;
+import flash.events.Event;
+import flash.Lib;
+import haxe.Log;
+
+import redlib.RedLib;
+
+class RedOnly extends Sprite
+{
+ static function main()
+ {
+ var redOnly = new RedOnly();
+ }
+
+ var mRed:Bitmap;
+
+ public function new()
+ {
+ super();
+ Lib.current.root.addEventListener(Event.ENTER_FRAME, onEnterFrame);
+ }
+
+ public function onEnterFrame( event : Event )
+ {
+ if (Lib.current.root.loaderInfo.bytesLoaded == Lib.current.root.loaderInfo.bytesTotal)
+ {
+ Lib.current.root.removeEventListener( Event.ENTER_FRAME, onEnterFrame );
+ run();
+ }
+ }
+
+ public function run( ):Void
+ {
+ Log.trace( "run()" );
+ mRed = new redlib.RedBitmap();
+ Log.trace( mRed );
+
+ Lib.current.root.stage.addChild( mRed );
+ }
+}

0 comments on commit 69672ad

Please sign in to comment.