- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
public function algorithmChanged(arg1:flash.events.Event):*
{
var loc1:*;
loc1 = null;
if (currentAlgorithm != null)
removeChild(currentAlgorithm);
loc1 = arg1.target.selectedLabel;
currentAlgorithm = null;
animationManager.resetAll();
if (loc1 != "Heap")
if (loc1 != "Comparison Sort")
if (loc1 != "Counting Sort")
if (loc1 != "Bucket Sort")
if (loc1 != "Radix Sort")
if (loc1 != "Heap Sort")
if (loc1 != "Binary Search Tree")
if (loc1 != "AVL Tree")
if (loc1 != "Open Hashing")
if (loc1 != "Closed Hashing")
if (loc1 != "Graph")
if (loc1 != "DFS")
if (loc1 != "BFS")
if (loc1 != "Connected Components")
if (loc1 != "Dijkstra")
if (loc1 != "Prim")
if (loc1 != "Kruskal")
if (loc1 != "Topological Sort")
if (loc1 != "Floyd-Warshall")
if (loc1 != "B Tree")
if (loc1 != "Binomial Queue")
if (loc1 != "Disjoint Sets")
if (loc1 != "Array Stack")
if (loc1 != "Array Queue")
if (loc1 != "Linked List Stack")
if (loc1 != "Linked List Queue")
if (loc1 != "Red Black Tree")
if (loc1 != "Closed Hashing (buckets)")
if (loc1 == "B+ Tree")
{
currentAlgorithm = new BPlusTree(animationManager);
addChildAt(currentAlgorithm, 0);
}
else
{
currentAlgorithm = new ClosedHash2(animationManager);
addChildAt(currentAlgorithm, 0);
}
else
{
currentAlgorithm = new RedBlackTree(animationManager);
addChildAt(currentAlgorithm, 0);
}
и т.д. пока не закроются все if'ы