2019独角兽企业重金招聘Python工程师标准>>>
第二版对第一版做了一些优化,其中最主要的优化就是将属性提示界面单独封装为一个类。这样不但减少了属性界面与editor功能的耦合,而且使整个代码清爽了许多,并且同时解决了一部分BUG
更新主要代码如下:
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
InforAlert.as package { import flash.display.Sprite; import flash.events.MouseEvent; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.text.TextFieldType; public class InforAlert extends Sprite {editor02 private var hotSpot:HotspotEditor02; private var txtBack:TextField; private var txtInput:TextField; private var txtInput1:TextField; private var txtInput2:TextField; private var txtLable1:TextField; private var txtLable2:TextField; private var txtLable3:TextField; private var btn1:TextField; private var btn2:TextField; public function InforAlert(hotSpot:HotspotEditor02) { this.hotSpot = hotSpot; init(); addToStage(); } private function init():void{ txtBack = new TextField(); txtInput = new TextField(); txtInput1 = new TextField(); txtInput2 = new TextField(); txtLable1 = new TextField(); txtLable2 = new TextField(); txtLable3 = new TextField(); btn1 = new TextField(); btn2 = new TextField(); txtInput.type = TextFieldType.INPUT; txtInput1.type = TextFieldType.INPUT; txtInput2.type = TextFieldType.INPUT; txtInput.width = 100; txtInput.height = 25; txtInput1.width = 100; txtInput1.height = 25; txtInput2.width = 100; txtInput2.height = 25; txtLable1.width = 100; txtLable1.height = 50; txtLable1.textColor = 0xffffff; txtLable2.width = 100; txtLable2.height = 50; txtLable2.textColor = 0xffffff; txtLable3.width = 100; txtLable3.height = 50; txtLable3.textColor = 0xffffff; btn1.width = 70; btn1.height = 25; btn1.autoSize = TextFieldAutoSize.CENTER; btn1.text = “确定”; btn1.background = true; btn1.backgroundColor = 0xdddddd; btn2.width = 70; btn2.height = 25; btn2.autoSize = TextFieldAutoSize.CENTER; btn2.text = “取消”; btn2.background = true; btn2.backgroundColor = 0xdddddd; txtBack.background = 0xddff00; txtBack.backgroundColor = 0×000000; txtInput.background = 0xFFFFFF; txtInput1.background = 0xFFFFFF; txtInput2.background = 0xFFFFFF; txtBack.x = 500; txtBack.y = 150; btn1.x = txtBack.x+50; btn1.y = txtBack.y+110; btn1.addEventListener(MouseEvent.CLICK,hotSpot.baginDraw); btn2.x = txtBack.x+195; btn2.y = txtBack.y+110; btn2.addEventListener(MouseEvent.CLICK,hotSpot.baginDraw); txtInput.x = txtBack.x+120; txtInput.y = txtBack.y+20; txtInput1.x = txtBack.x+120; txtInput1.y = txtBack.y+50; txtInput2.x = txtBack.x+120; txtInput2.y = txtBack.y+80; txtLable1.x = txtBack.x+50; txtLable1.y = txtBack.y+20; txtLable2.x = txtBack.x+50; txtLable2.y = txtBack.y+50; txtLable3.x = txtBack.x+50; txtLable3.y = txtBack.y+80; txtBack.alpha = 0.25; txtBack.width = 300; txtBack.height = 150; txtLable1.text = “商品ID:”; txtLable2.text = “商品编号:”; txtLable3.text = “商品URL:”; } public function addToStage():void{ this.addChild(txtBack); this.addChild(txtLable1); this.addChild(txtLable2); this.addChild(txtLable3); this.addChild(txtInput); this.addChild(txtInput1); this.addChild(txtInput2); this.addChild(btn1); this.addChild(btn2); } } }
版本下载
转载于:https://my.oschina.net/xinyuan6009/blog/295586
最后
以上就是寒冷滑板最近收集整理的关于基于Krpano的Hotspot热区插件·第二版的全部内容,更多相关基于Krpano内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复