-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTabMenuManager.as
More file actions
48 lines (44 loc) · 1.25 KB
/
TabMenuManager.as
File metadata and controls
48 lines (44 loc) · 1.25 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
package tabMenu
{
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
[Event(name="SELECT", type="tabMenu.TabMenuEvent")]
public class TabMenuManager extends EventDispatcher
{
public static var event:TabMenuManager
private static var _currentTabe:Object;
public function TabMenuManager(target:IEventDispatcher=null)
{
super(target);
}
public static function setup():void
{
event = new TabMenuManager();
_currentTabe = new Object();
}
public static function setCurrentTabe(GroupName_p:String,TabeName_p:String,status_p:Boolean):void
{
if(_currentTabe[GroupName_p] == null)
{
_currentTabe[GroupName_p] = new Object();
}
for(var valueName in _currentTabe[GroupName_p])
{
_currentTabe[GroupName_p][valueName] = false;
}
if(TabeName_p!=null && TabeName_p!='')_currentTabe[GroupName_p][TabeName_p]= status_p;
}
public static function getCurrentTabe(GroupName_p:String,TabeName_p:String):Boolean
{
if(_currentTabe[GroupName_p]!=null && _currentTabe[GroupName_p][TabeName_p]!=null)
{
return _currentTabe[GroupName_p][TabeName_p];
}
return false
}
public static function getAtiveGroup(GroupName_p:String):Boolean
{
return _currentTabe[GroupName_p] != null;
}
}
}