-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenuRight1.as
More file actions
71 lines (60 loc) · 1.59 KB
/
MenuRight1.as
File metadata and controls
71 lines (60 loc) · 1.59 KB
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
class MenuRight1 extends MovieClip
{
/* STAGE ELEMENTS */
public var name: MovieClip;
public var author: MovieClip;
public var originPackage: MovieClip;
public var tags: MovieClip;
public var annotations: MovieClip;
/* PRIVATE VARIABLES */
private var _annotations: String;
private var _activeScene: Object;
/* INITIALIZATION */
public function MenuRight1()
{
super();
}
/* PUBLIC FUNCTIONS */
public function setActiveScene(scene: Object): Void
{
_activeScene = scene;
}
public function updateFields()
{
name.init({ name: "$SSL_Name", align: "left", extra: _activeScene.name });
author.init({ name: "$SSL_Author", align: "left", extra: _activeScene.author });
originPackage.init({ name: "$SSL_Package", align: "left", extra: _activeScene.package });
tags.init({ name: "$SSL_Tags", content: _activeScene.tags });
annotations.init({ name: "$SSL_CustomTags", content: _activeScene.annotations });
}
public function setDefault()
{
annotations.setSelected(true);
}
public function resetSelection()
{
annotations.setSelected(false);
exitAnnotations();
}
public function handleInputEx(keyStr: String, modes: Boolean, reset: Boolean): Boolean
{
if (keyStr == KeyType.SELECT) {
_annotations = annotations.getText();
annotations.setFocus();
} else if (keyStr == KeyType.END) {
return exitAnnotations();
}
return true;
}
private function exitAnnotations()
{
if (!annotations.hasFocus())
return false;
annotations.endInput();
if (_annotations != annotations.getText()) {
Main.SetSceneAnnotations(annotations.getText());
}
return true;
}
}