チェンジセット 835
- コミット日時:
- 2008/07/13 23:51:17 (4 ヶ月前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
air/ByteCodeDisassembler/Controller.as
r834 r835 10 10 11 11 public class Controller{ 12 public var frame : Array = []; 13 public var onUpdate : Function; 12 public var frame : Array = []; 13 public var info : Object = []; 14 public var onUpdateTree : Function; 15 public var onUpdatePanel : Function; 14 16 15 17 private var stream : URLStream; … … 40 42 switch (tag) { 41 43 case 82: { 42 frame.push({label:'abc'}); 44 frame.push({label:'abc',tag:'abc',children:[ 45 1,2,3 46 ]}); 43 47 } 44 48 break; 45 49 46 50 default: { 47 frame.push({label:'??? ?',tag:tag,length:length});51 frame.push({label:'???',tag:tag,length:length}); 48 52 swf.seek(length); 49 53 } … … 56 60 trace(e); 57 61 } 58 this.onUpdate ();62 this.onUpdateTree(); 59 63 } 60 64 61 65 private function onIOError() : void{ 62 66 } 67 68 public function showInfo(item : Object):void{ 69 // if(item.label == '???'){ 70 this.info = item; 71 // } 72 this.onUpdatePanel(); 73 } 63 74 } 64 75 } air/ByteCodeDisassembler/Main.mxml
r834 r835 11 11 private function init() : void{ 12 12 var self : Object = this; 13 controller.onUpdate = function() : void{13 controller.onUpdateTree = function() : void{ 14 14 self.tree.dataProvider = controller.frame; 15 15 }; 16 }17 16 18 private function open() : void{ 19 controller.disassemble(this.path.text); 17 controller.onUpdatePanel = function() : void{ 18 trace('update'); 19 switch(controller.info.tag){ 20 case 'abc': 21 self.abc.visible = true; 22 self.etc.visible = false; 23 break; 24 default: 25 self.abc.visible = false; 26 self.etc.visible = true; 27 self.etc_tag.text = controller.info.tag; 28 self.etc_length.text = controller.info.length; 29 } 30 } 20 31 } 21 32 ]]> 22 33 </Script> 23 34 <HBox width="100%" height="20"> 24 <TextInput width="100%" id="path" enter=" open()" text="http://localhost:3001/swf/Main.swf"/>35 <TextInput width="100%" id="path" enter="controller.disassemble(this.path.text);" text="http://localhost:3001/swf/Main.swf"/> 25 36 <Button label="..." /> 26 37 </HBox> 27 38 <HBox width="100%" height="100%"> 28 <Tree width="200" height="100%" id="tree"/> 29 <Button label="hoge" /> 39 <Tree width="200" height="100%" id="tree" change="controller.showInfo(this.tree.selectedItem)"/> 40 <HBox id="abc" visible="false"></HBox> 41 <HBox id="etc" visible="false" width="100%"> 42 <Form width="100%"> 43 <FormHeading label="ABC" /> 44 <FormItem label="tag"><Label id="etc_tag" /></FormItem> 45 <FormItem label="length"><Label id="etc_length" /></FormItem> 46 </Form> 47 </HBox> 30 48 </HBox> 31 49 </Application> air/ByteCodeDisassembler/Makefile
r834 r835 4 4 .PHONY: clean rascut 5 5 rascut: 6 LC_ALL=C rascut -s Main.mxml -l ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt6 LC_ALL=C rascut -s Main.mxml 7 7 8 8 cleanlog:
