adding ipc example and drastically simplifying makefile crap
This commit is contained in:
parent
119cc1a0a9
commit
0eaf4d8cfd
@ -1,16 +0,0 @@
|
|||||||
MXMLC ?= mxmlc
|
|
||||||
|
|
||||||
|
|
||||||
all: FlickrRIA.swf FlickrThumbnail.swf
|
|
||||||
|
|
||||||
|
|
||||||
FlickrRIA.swf: FlickrRIA.mxml
|
|
||||||
$(MXMLC) FlickrRIA.mxml
|
|
||||||
|
|
||||||
|
|
||||||
FlickrThumbnail.swf: FlickrThumbnail.mxml
|
|
||||||
$(MXMLC) FlickrThumbnail.mxml
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.swf
|
|
@ -1,12 +0,0 @@
|
|||||||
MXMLC ?= mxmlc
|
|
||||||
|
|
||||||
|
|
||||||
all: PlainText.swf
|
|
||||||
|
|
||||||
|
|
||||||
PlainText.swf: PlainText.mxml
|
|
||||||
$(MXMLC) PlainText.mxml
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.swf
|
|
@ -1,12 +0,0 @@
|
|||||||
MXMLC ?= mxmlc
|
|
||||||
|
|
||||||
|
|
||||||
all: YahooWeather.swf
|
|
||||||
|
|
||||||
|
|
||||||
YahooWeather.swf: YahooWeather.mxml
|
|
||||||
$(MXMLC) YahooWeather.mxml
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.swf
|
|
@ -1,16 +0,0 @@
|
|||||||
MXMLC ?= mxmlc
|
|
||||||
|
|
||||||
|
|
||||||
all: CRUDDynamic.swf CRUDStatic.swf
|
|
||||||
|
|
||||||
|
|
||||||
CRUDDynamic.swf: CRUDDynamic.mxml
|
|
||||||
$(MXMLC) CRUDDynamic.mxml
|
|
||||||
|
|
||||||
|
|
||||||
CRUDStatic.swf: CRUDStatic.mxml
|
|
||||||
$(MXMLC) CRUDStatic.mxml
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.swf
|
|
48
05-ipc/LocalConn.mxml
Normal file
48
05-ipc/LocalConn.mxml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||||
|
layout="absolute"
|
||||||
|
creationComplete="initConn()"
|
||||||
|
backgroundAlpha="0" backgroundColor="#FFFFFF">
|
||||||
|
<mx:Script>
|
||||||
|
<![CDATA[
|
||||||
|
import flash.net.LocalConnection;
|
||||||
|
|
||||||
|
private var conn:LocalConnection;
|
||||||
|
|
||||||
|
private function initConn():void{
|
||||||
|
btnSend.addEventListener(MouseEvent.CLICK, sendMessage);
|
||||||
|
conn = new LocalConnection();
|
||||||
|
conn.addEventListener(StatusEvent.STATUS, onStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function sendMessage(event:MouseEvent):void {
|
||||||
|
conn.send("taskConnection", "localconnectionHandler", inputTask.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function onStatus(event:StatusEvent):void {
|
||||||
|
switch (event.level) {
|
||||||
|
case "status":
|
||||||
|
ExternalInterface.call("showStatus", "Task successfully sent");
|
||||||
|
break;
|
||||||
|
case "error":
|
||||||
|
ExternalInterface.call("showStatus", "Task failed to send");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
]]>
|
||||||
|
</mx:Script>
|
||||||
|
<mx:Panel horizontalCenter="0" verticalCenter="0">
|
||||||
|
<mx:Form width="100%" height="100%" horizontalCenter="0" verticalCenter="0">
|
||||||
|
<mx:FormItem label="Enter Task">
|
||||||
|
<mx:TextInput id="inputTask"/>
|
||||||
|
</mx:FormItem>
|
||||||
|
<mx:FormItem label="Send Task ">
|
||||||
|
<mx:Button id="btnSend" label="Send"/>
|
||||||
|
</mx:FormItem>
|
||||||
|
<mx:ControlBar>
|
||||||
|
<mx:Label id="labelStatus" text=""/>
|
||||||
|
</mx:ControlBar>
|
||||||
|
</mx:Form>
|
||||||
|
</mx:Panel>
|
||||||
|
</mx:Application>
|
14
Makefile
14
Makefile
@ -1,12 +1,10 @@
|
|||||||
PROJECTS = $(wildcard ./[0-9]*-*)
|
BASE = $(PWD)
|
||||||
|
MXMLC ?= mxmlc
|
||||||
|
SWFS = $(patsubst %.mxml,%.swf,$(wildcard [0-9]*-*/*.mxml))
|
||||||
|
|
||||||
|
|
||||||
all:
|
%.swf : %.mxml
|
||||||
@for project in $(PROJECTS) ; \
|
$(MXMLC) $< -output $@
|
||||||
do \
|
|
||||||
cd $$project && $(MAKE) && cd .. ; \
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
all: $(SWFS)
|
||||||
find -name \*.swf -exec rm {} \;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user