Arrays Broken
i've taken an xml file and turned it into a couple of arrays. the problem is the variables seem to be storing the information odly. At the bottom i have listed 1. What shows up when i test the movie then go Debug -> List Variables and 2. The actionscript i used.
There is also a highlight from the variables section. The problem to note is that if i type:
trace(diagnosticMenuLayer[1][2]);
at the end of my actionscript, the output says:
undefined.
Am i doing something wrong?
Thanks in advance.
Here's all the attached code:
Attach Code
---------------- HIGHLIGHT ----------------
Variable _level0.diagnosticMenuLayer = [object #89, class 'Array'] [
1:[object #90, class 'Array'] [
0:"1",
1:"2",
...
-----------------------------------------------------
1. -------- VARIABLES --------
Level #0:
Variable _level0.$version = "WIN 8,0,22,0"
Variable _level0.diagnostic = [object #1] {
<?xml version="1.0" encoding="ISO-8859-1" ?>
<menu>
<menuItem>
<label>
Ski-slope
</label>
<type>
item
</type>
<location>
1
</location>
<image>
Ski slope spectrum.bmp
</image>
<rtfTitles>
::Ski-slope::
</rtfTitles>
<gifName>
Accel
</gifName>
<moduleName>
va3
</moduleName>
<slideName>
#27 Scene
</slideName>
</menuItem>
(There are a fair few other <menuItem>’s but I don’t think listing the entire XML is relevant.)
</menu>
}
Variable _level0.diagnosticLength = 86
Variable _level0.diagnosticMenuPlace = 86
Variable _level0.diagnosticMenuItem = [object #2, class 'Array'] [
0:[object #3, class 'Array'] [
0:"Ski-slope",
1:"item",
2:"1",
3:"Ski slope spectrum.bmp",
4:"::Ski-slope::",
5:"Accel",
6:"va3",
7:"#27 Scene"
],
1:[object #4, class 'Array'] [
0:"High noise floor",
1:"item",
2:"2",
3:"Noise floor spectrum.bmp",
4:"::Raised noise floor::",
5:"Bearing2",
6:"va3",
7:"#104 Scene"
],
2:[object #5, class 'Array'] [
0:"Most common fault conditions",
1:"sub",
2:"3.0"
],
3:[object #6, class 'Array'] [
0:"Strong 1x",
1:"sub",
2:"3.1.0"
],
4:[object #7, class 'Array'] [
0:"Strongest in vertical and horizontal [imbalance]",
1:"item",
2:"3.1.1",
3:"Imbalance statis spectrum VH.bmp",
4:"::Static imbalance::",
5:"Bal static",
6:"dmf1",
7:"#33 Scene|GBal static"
],
5:[object #8, class 'Array'] [
0:"Strongest in horizontal [flexibility]",
1:"item",
2:"3.1.2",
3:"Looseness Structural spectrum VH.bmp",
4:"::Structural looseness::",
5:"Flexibility",
6:"dmf2",
7:"#61 |GFlexibility"
],
6:[object #9, class 'Array'] [
0:"Strongest in axial (overhung machine) [imbalance]",
1:"item",
2:"3.1.3",
3:"Imbalance overhung spectrum VHA.bmp",
4:"::Imbalance: Overhung machines::",
5:"Bal overhung",
6:"dmf1",
7:"#45 Scene|GBal Overhungy"
],
7:[object #10, class 'Array'] [
0:"Strongest in axial (NOT overhung) [angular misalignment]",
1:"item",
2:"3.1.4",
3:"Angular misalignment spectrum Axial.bmp",
4:"::Angular Misalignment::",
5:"Align angular",
6:"dmf2",
7:"#6 Scene"
],
8:[object #11, class 'Array'] [
0:"Strong 2x",
1:"sub",
2:"3.2.0"
],
9:[object #12, class 'Array'] [
0:"Strongest vertical and horizontal [parallel misalignment]",
1:"item",
2:"3.2.1",
3:"Parallel misalignment spectrum VH.bmp",
4:"::Parallel Misalignment::",
5:"Align parallel",
6:"dmf2",
7:"#10 Scene|GAlign parallel"
],
10:[object #13, class 'Array'] [
0:"Strong Harmonics",
1:"sub",
2:"3.3.0"
],
11:[object #14, class 'Array'] [
0:"1X harmonics [rotating looseness]",
1:"item",
2:"3.3.1",
3:"Looseness Bearing worse spectrum VH.bmp",
4:"::Rotating looseness::",
5:"Brg looseness",
6:"dmf2",
7:"#49 Scene|GBrg looseness"
],
12:[object #15, class 'Array'] [
0:"Non-synchronous harmonics [bearing wear]",
1:"item",
2:"3.3.2",
3:"Bearings stage five.bmp",
4:"::Rolling element bearings::",
5:"Brg inner race",
6:"dmf3",
7:"#14 Scene|GBearing1|"
],
13:[object #16, class 'Array'] [
0:"Sub-synchronous peak (less than 1X)",
1:"sub",
2:"4.0"
],
14:[object #17, class 'Array'] [
0:"There is a single peak",
1:"sub",
2:"4.1.0"
],
15:[object #18, class 'Array'] [
0:"Machine is a turbine [oil whirl]",
1:"item",
2:"4.1.1",
3:"Journal oil whirl spectrum VH.bmp",
4:"::Oil whirl::",
5:"Oil whirl",
6:"dmf2",
7:"#81 Scene"
],
16:[object #19, class 'Array'] [
0:"Machine has rolling element bearings [cage fault]",
1:"item",
2:"4.1.2",
3:"Bearings stage five.bmp",
4:"::Rolling element bearings::",
5:"Brg inner race",
6:"dmf3",
7:"#14 Scene|GBearing1|"
],
17:[object #20, class 'Array'] [
0:"From gearbox [hunting tooth frequency]",
1:"item",
2:"4.1.3",
3:"Hunting tooth spectrum VH.bmp",
4:"::Hunting tooth frequency::",
5:"Gear single",
6:"dmf6",
7:"#36 Scene"
],
18:[object #21, class 'Array'] [
0:"Reciprocating machine [4-stroke engine]",
1:"item",
2:"4.1.4",
3:"Reciprocating 4-stroke engine spectrum VH.bmp",
4:"::Reciprocating machines::",
5:"Piston",
6:"dmf4",
7:"#26 Scene"
],
19:[object #22, class 'Array'] [
0:"There are a series of harmonics",
1:"sub",
2:"4.2.0"
],
20:[object #23, class 'Array'] [
0:"Belt driven machine [belt wear]",
1:"item",
2:"4.2.1",
3:"Belts worn spectrum VH.bmp",
4:"::Worn or loose belts::",
5:"Sheaves per",
6:"dmf6",
7:"#45 Scene|GSheaves per"
],
21:[object #24, class 'Array'] [
0:"Harmonics of 0.5X [severe looseness]",
1:"item",
2:"4.2.2",
3:"Looseness Bearing severe spectrum VH.bmp",
4:"::Rotating looseness::",
5:"Brg looseness",
6:"dmf2",
7:"#49 Scene|GBrg looseness"
],
22:[object #25, class 'Array'] [
0:"From gearbox [hunting tooth frequency]",
1:"item",
2:"4.2.2",
3:"Hunting tooth spectrum VH.bmp",
4:"::Hunting tooth frequency::",
5:"Gear single",
6:"dmf6",
7:"#36 Scene"
],
23:[object #26, class 'Array'] [
0:"There is a broad peak",
1:"sub",
2:"4.3.0"
],
24:[object #27, class 'Array'] [
0:"Machine is a pump or fan [flow noise]",
1:"item",
2:"4.3.1",
3:"Turbulence spectrum VH.bmp",
4:"::Flow turbulence::",
5:"Pump flow",
6:"dmf4",
7:"#5 Scene"
],
25:[object #28, class 'Array'] [
0:"Peak at 1X",
1:"sub",
2:"5.0"
],
26:[object #29, class 'Array'] [
0:"There is a single strong peak",
1:"sub",
2:"5.1.0"
],
27:[object #30, class 'Array'] [
0:"Stronger in vertical and horizontal [imbalance]",
1:"item",
2:"5.1.1",
3:"Imbalance static spectrum VH.bmp",
4:"::Static imbalance::",
5:"Bal static",
6:"dmf1",
7:"#33 Scene|GBal static"
],
28:[object #31, class 'Array'] [
0:"Strong in vertical and horizontal on motor [rotor bow]",
1:"item",
2:"5.1.2",
3:"Rotor bow spectrum VH.bmp",
4:"::Rotor bow::",
5:"Motor",
6:"dmf5",
7:"#29 Scene"
],
29:[object #32, class 'Array'] [
0:"Observed on both sheaves of a belt driven machine [belt resonance]",
1:"item",
2:"5.1.3",
3:"Belt resonance spectrum VH.bmp",
4:"::Belt resonance::",
5:"Sheaves per",
6:"dmf6",
7:"#58 Scene"
],
30:[object #33, class 'Array'] [
0:"Stronger in horizontal [flexibility]",
1:"item",
2:"5.1.4",
3:"Looseness Structural spectrum VH.bmp",
4:"::Structural looseness::",
5:"Flexibility",
6:"dmf2",
7:"#61 |GFlexibility"
],
31:[object #34, class 'Array'] [
0:"Stronger in axial (overhung machine) [imbalance]",
1:"item",
2:"5.1.5",
3:"Imbalance overhung spectrum VHA.bmp",
4:"::Imbalance: Overhung machines::",
5:"Bal overhung",
6:"dmf1",
7:"#45 Scene|GBal Overhung"
],
32:[object #35, class 'Array'] [
0:"Stronger in axial (NOT overhung) [angular misalignment]",
1:"item",
2:"5.1.6",
3:"Angular misalignment spectrum Axial.bmp",
4:"::Angular Misalignment::",
5:"Align angular",
6:"dmf2",
7:"#6 Scene"
],
33:[object #36, class 'Array'] [
0:"There are harmonics",
1:"sub",
2:"5.2.0"
],
34:[object #37, class 'Array'] [
0:"1X, 2X and 3X high in axial [cocked bearing]",
1:"item",
2:"5.2.1",
3:"Cocked bearing spectrum Axial.bmp",
4:"::Cocked bearing::",
5:"Brg cocked",
6:"dmf2",
7:"#45 Scene|GBrg cocked"
],
35:[object #38, class 'Array'] [
0:"1X, 2X and 3X high in vertical [loose pedestal brg]",
1:"item",
2:"5.2.2",
3:"Looseness Pillow block Bearing spectrum VH.bmp",
4:"::Pedestal bearing looseness::",
5:"Pillowblock loose",
6:"dmf2",
7:"#65 Scene|GPillowblock loose"
],
36:[object #39, class 'Array'] [
0:"Many harmonics [rotating looseness]",
1:"item",
2:"5.2.3",
3:"Looseness Bearing worse spectrum VH.bmp",
4:"::Rotating looseness::",
5:"Brg looseness",
6:"dmf2",
7:"#49 Scene|GBrg looseness"
],
37:[object #40, class 'Array'] [
0:"Electric motor [loose rotor]",
1:"item",
2:"5.2.4",
3:"Loose rotor spectrum VH.bmp",
4:"::Loose rotor::",
5:"Motor",
6:"dmf5",
7:"#33 Scene"
],
38:[object #41, class 'Array'] [
0:"There are sidebands",
1:"sub",
2:"5.3.0"
],
39:[object #42, class 'Array'] [
0:"1X has a "skirt" of sidebands and 100/120 Hz peak [shorted laminations]",
1:"item",
2:"5.3.1",
3:"Shorted laminations spectrum VH.bmp",
4:"::Lamination problems::",
5:"Motor",
6:"dmf5",
7:"#35 Scene"
],
40:[object #43, class 'Array'] [
0:"1X and 100/120 Hz have a "skirt" of sidebands [rotor eccentricity]",
1:"item",
2:"5.3.2",
3:"Rotor eccentricity spectrum VH.bmp",
4:"::Eccentric rotor::",
5:"Motor",
6:"dmf5",
7:"#25 Scene"
],
41:[object #44, class 'Array'] [
0:"1X and harmonics have a "skirt" of sidebands [cracked rotor bar]",
1:"item",
2:"5.3.3",
3:"Cracked rotor bar spectrum VH.bmp",
4:"::Cracked or broken rotor bars::",
5:"Motor",
6:"dmf5",
7:"#30 Scene"
],
42:[object #45, class 'Array'] [
0:"A 100/120 Hz peak also exists",
1:"sub",
2:"5.4.0"
],
43:[object #46, class 'Array'] [
0:"1X and 100/120 Hz have a "skirt" of sidebands [rotor eccentricity]",
1:"item",
2:"5.4.1",
3:"Rotor eccentricity spectrum VH.bmp",
4:"::Eccentric rotor::",
5:"Motor",
6:"dmf5",
7:"#25 Scene"
],
44:[object #47, class 'Array'] [
0:"High 1X and high 100/120 Hz [stator eccentricity]",
1:"item",
2:"5.4.2",
3:"Stator eccentricity spectrum VH.bmp",
4:"::Stator Eccentricity::",
5:"Motor",
6:"dmf5",
7:"#23 Scene"
],
45:[object #48, class 'Array'] [
0:"The peak is broad",
1:"sub",
2:"5.5.0"
],
46:[object #49, class 'Array'] [
0:"Broad peak [resonance]",
1:"item",
2:"5.5.1",
3:"Resonance spectrum VH.bmp",
4:"::Resonance::",
5:"Flexibility",
6:"dmf2",
7:"#2 Scene|GFlexibility"
],
47:[object #50, class 'Array'] [
0:"Peak at 2X (not part of harmonic series)",
1:"sub",
2:"6.0"
],
48:[object #51, class 'Array'] [
0:"Stronger in vertical and horizontal [parallel misalignment]",
1:"item",
2:"6.1",
3:"Parallel misalignment spectrum VH.bmp",
4:"::Parallel Misalignment::",
5:"Align parallel",
6:"dmf2",
7:"#10 Scene|GAlign parallel"
],
49:[object #52, class 'Array'] [
0:"Broad peak [resonance]",
1:"item",
2:"6.2",
3:"Resonance spectrum VH.bmp",
4:"::Resonance::",
5:"Flexibility",
6:"dmf2",
7:"#2 Scene|GFlexibility"
],
50:[object #53, class 'Array'] [
0:"1X and harmonics",
1:"sub",
2:"7.0"
],
51:[object #54, class 'Array'] [
0:"1X, 2X and 3X high in axial [cocked bearing]",
1:"item",
2:"7.1",
3:"Cocked bearing spectrum Axial.bmp",
4:"::Cocked bearing::",
5:"Brg cocked",
6:"dmf2",
7:"#45 Scene|GBrg cocked"
],
52:[object #55, class 'Array'] [
0:"1X, 2X and 3X high in vertical [loose pedestal brg]",
1:"item",
2:"7.2",
3:"Looseness Pillow block Bearing spectrum VH.bmp",
4:"::Pedestal bearing looseness::",
5:"Pillowblock loose",
6:"dmf2",
7:"#65 Scene|GPillowblock loose"
],
53:[object #56, class 'Array'] [
0:"Many harmonics [rotating looseness]",
1:"item",
2:"7.3",
3:"Looseness Bearing worse spectrum VH.bmp",
4:"::Rotating looseness::",
5:"Brg looseness",
6:"dmf2",
7:"#49 Scene|GBrg looseness"
],
54:[object #57, class 'Array'] [
0:"Electric motor [loose rotor]",
1:"item",
2:"7.4",
3:"Loose rotor spectrum VH.bmp",
4:"::Loose rotor::",
5:"Motor",
6:"dmf5",
7:"#33 Scene"
],
55:[object #58, class 'Array'] [
0:"1X and harmonics have a "skirt" of sidebands [cracked rotor bar]",
1:"item",
2:"7.5",
3:"Cracked rotor bar spectrum VH.bmp",
4:"::Cracked or broken rotor bars::",
5:"Motor",
6:"dmf5",
7:"#30 Scene"
],
56:[object #59, class 'Array'] [
0:"Synchronous peak(s) (3X, 4X, 5X...)",
1:"sub",
2:"8.0"
],
57:[object #60, class 'Array'] [
0:"Machine is pump/fan/compressor [blade or vane wear]",
1:"item",
2:"8.1",
3:"Blade pass spectrum VH.bmp",
4:"::Pumps/Fans Blade/Vane pass::",
5:"Pump flow",
6:"dmf4",
7:"#2 Scene"
],
58:[object #61, class 'Array'] [
0:"Broad peak [resonance]",
1:"item",
2:"8.2",
3:"Resonance spectrum VH.bmp",
4:"::Resonance::",
5:"Flexibility",
6:"dmf2",
7:"#2 Scene|GFlexibility"
],
59:[object #62, class 'Array'] [
0:"Peak at twice line frequency (100/120 Hz)",
1:"sub",
2:"9.0"
],
60:[object #63, class 'Array'] [
0:"High 100/120 Hz [loose stator windings]",
1:"item",
2:"9.1",
3:"Loose stator windings spectrum VH.bmp",
4:"::Loose stator windings::",
5:"Motor",
6:"dmf5",
7:"#34 Scene"
],
61:[object #64, class 'Array'] [
0:"High 100/120 Hz plus 1X and 2X peaks [stator eccentricity]",
1:"item",
2:"9.2",
3:"Stator eccentricity spectrum VH.bmp",
4:"::Stator Eccentricity::",
5:"Motor",
6:"dmf5",
7:"#23 Scene"
],
62:[object #65, class 'Array'] [
0:"High 100/120 Hz with 1/3X sidebands [loose connections]",
1:"item",
2:"9.3",
3:"Loose connectors spectrum VH.bmp",
4:"::Loose connections::",
5:"Motor",
6:"dmf5",
7:"#37 Scene"
],
63:[object #66, class 'Array'] [
0:"100/120 Hz peak has a "skirt" of sidebands [rotor eccentricity]",
1:"item",
2:"9.4",
3:"Rotor eccentricity spectrum VH.bmp",
4:"::Eccentric rotor::",
5:"Motor",
6:"dmf5",
7:"#25 Scene"
],
64:[object #67, class 'Array'] [
0:"100/120 Hz peak and 1X has a "skirt" of sidebands [shorted laminations]",
1:"item",
2:"9.5",
3:"Shorted laminations spectrum VH.bmp",
4:"::Lamination problems::",
5:"Motor",
6:"dmf5",
7:"#35 Scene"
],
65:[object #68, class 'Array'] [
0:"Non-synchronous peaks",
1:"sub",
2:"10.0"
],
66:[object #69, class 'Array'] [
0:"Single frequency [external noise]",
1:"item",
2:"10.1",
3:"External noise spectrum.bmp",
4:"::External noise::",
5:"XX",
6:"va3",
7:"#27 Scene"
],
67:[object #70, class 'Array'] [
0:"Non-synchronous harmonics [bearing wear]",
1:"item",
2:"10.2",
3:"Bearings stage five.bmp",
4:"::Rolling element bearings::",
5:"Brg inner race",
6:"dmf3",
7:"#14 Scene|GBearing1|"
],
68:[object #71, class 'Array'] [
0:"Gearbox measurement (natural frequency excited)",
1:"sub",
2:"10.3.0"
],
69:[object #72, class 'Array'] [
0:"Sidebands around gearmesh also high [tooth wear]",
1:"item",
2:"10.3.1",
3:"Gear mesh with nat freq spectrum VH.bmp",
4:"::Gear tooth wear::",
5:"Gear single",
6:"dmf6",
7:"#24 Scene"
],
70:[object #73, class 'Array'] [
0:"Load effects levels [gear backlash]",
1:"item",
2:"10.3.2",
3:"Gear backlash spectrum VH.bmp",
4:"::Gear backlash::",
5:"Gear single",
6:"dmf6",
7:"#27 Scene"
],
71:[object #74, class 'Array'] [
0:"High 1X and 1X sidebands of gearmesh [cracked/broken tooth]",
1:"item",
2:"10.3.3",
3:"Gear cracked or broken spectrum VH.bmp",
4:"::Cracked or broken tooth::",
5:"Gear single",
6:"dmf6",
7:"#34 Scene"
],
72:[object #75, class 'Array'] [
0:"High frequency peaks",
1:"sub",
2:"11.0"
],
73:[object #76, class 'Array'] [
0:"Non-synchonous with harmonics",
1:"sub",
2:"11.1.0"
],
74:[object #77, class 'Array'] [
0:"Rolling element bearings [bearing wear]",
1:"item",
2:"11.1.1",
3:"Bearings stage five.bmp",
4:"::Rolling element bearings::",
5:"Brg inner race",
6:"dmf3",
7:"#14 Scene|GBearing1|"
],
75:[object #78, class 'Array'] [
0:"Synchronous peak(s)",
1:"sub",
2:"11.2.0"
],
76:[object #79, class 'Array'] [
0:"Pump/fan/compressor/turbine [blade or vane wear]",
1:"item",
2:"11.2.1",
3:"Blade pass spectrum VH.bmp",
4:"::Pumps/Fans Blade/Vane pass::",
5:"Pump flow",
6:"dmf4",
7:"#2 Scene"
],
77:[object #80, class 'Array'] [
0:"Electric motor",
1:"sub",
2:"11.3.0"
],
78:[object #81, class 'Array'] [
0:"Rotor bar rate with sidebands of 100/120 Hz [loose rotor bars]",
1:"item",
2:"11.3.1",
3:"Loose rotor bar spectrum VH.bmp",
4:"::Loose rotor bars::",
5:"Motor",
6:"dmf5",
7:"#32 Scene"
],
79:[object #82, class 'Array'] [
0:"Gearbox measurement - peak at gearmesh (GM)",
1:"sub",
2:"11.4.0"
],
80:[object #83, class 'Array'] [
0:"1X sidebands of GM [tooth wear]",
1:"item",
2:"11.4.1",
3:"Gear mesh with nat freq spectrum VH.bmp",
4:"::Gear tooth wear::",
5:"Gear single",
6:"dmf6",
7:"#24 Scene"
],
81:[object #84, class 'Array'] [
0:"1X sidebands of GM [gear backlash]",
1:"item",
2:"11.4.2",
3:"Gear backlash spectrum VH.bmp",
4:"::Gear backlash::",
5:"Gear single",
6:"dmf6",
7:"#27 Scene"
],
82:[object #85, class 'Array'] [
0:"High GM peak [tooth load]",
1:"item",
2:"11.4.3",
3:"Gear tooth load spectrum VH.bmp",
4:"::Gear tooth load::",
5:"Gear single",
6:"dmf6",
7:"#26 Scene"
],
83:[object #86, class 'Array'] [
0:"GM and harmonics with 1X sidebands",
1:"item",
2:"11.4.4",
3:"Gear misalignment spectrum VH.bmp",
4:"::Misaligned gears::",
5:"Gear single",
6:"dmf6",
7:"#29 Scene"
],
84:[object #87, class 'Array'] [
0:"Noise floor raised",
1:"sub",
2:"11.5.0"
],
85:[object #88, class 'Array'] [
0:"Noise floor raised [cavitation]",
1:"item",
2:"11.5.1",
3:"Cavitation spectrum VH.bmp",
4:"::Cavitation::",
5:"Pump flow",
6:"dmf4",
7:"#7 Scene"
]
]
Variable _level0.counterx = 2
Variable _level0.countera = 2
Variable _level0.diagnosticMenuLayer = [object #89, class 'Array'] [
1:[object #90, class 'Array'] [
0:"1",
1:"2",
2:"3.0",
3:"4.0",
4:"5.0",
5:"6.0",
6:"7.0",
7:"8.0",
8:"9.0"
],
2:[object #91, class 'Array'] [
0:"3.1.0",
1:"3.2.0",
2:"3.3.0",
3:"4.1.0",
4:"4.2.0",
5:"4.3.0",
6:"5.1.0",
7:"5.2.0",
8:"5.3.0",
9:"5.4.0",
10:"5.5.0",
11:"6.1",
12:"6.2",
13:"7.1",
14:"7.2",
15:"7.3",
16:"7.4",
17:"7.5",
18:"8.1",
19:"8.2",
20:"9.1",
21:"9.2",
22:"9.3",
23:"9.4",
24:"9.5"
],
3:[object #92, class 'Array'] [
0:"3.1.1",
1:"3.1.2",
2:"3.1.3",
3:"3.1.4",
4:"3.2.1",
5:"3.3.1",
6:"3.3.2",
7:"4.1.1",
8:"4.1.2",
9:"4.1.3",
10:"4.1.4",
11:"4.2.1",
12:"4.2.2",
13:"4.2.2",
14:"4.3.1",
15:"5.1.1",
16:"5.1.2",
17:"5.1.3",
18:"5.1.4",
19:"5.1.5",
20:"5.1.6",
21:"5.2.1",
22:"5.2.2",
23:"5.2.3",
24:"5.2.4",
25:"5.3.1",
26:"5.3.2",
27:"5.3.3",
28:"5.4.1",
29:"5.4.2",
30:"5.5.1"
],
4:[object #93, class 'Array'] []
]
Variable _level0.coordinateCheck = 9
2. -------- ACTIONSCRIPT --------
var diagnostic:XML = new XML();
diagnostic.ignoreWhite=true;
diagnostic.load("diagnostic.xml");
diagnostic.onLoad = function(success){
diagnosticLength = diagnostic.firstChild.childNodes.length;
diagnosticMenuPlace = 0;
iagnosticMenuItem = new Array();
while(diagnosticMenuPlace < diagnosticLength) {
diagnosticMenuItem[diagnosticMenuPlace] = new Array();
diagnosticMenuItem[diagnosticMenuPlace][0] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[0].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][1] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[1].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][2] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[2].firstChild.nodeValue;
if (diagnosticMenuItem[diagnosticMenuPlace][1] == "item"){
diagnosticMenuItem[diagnosticMenuPlace][3] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[3].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][4] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[4].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][5] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[5].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][6] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[6].firstChild.nodeValue;
diagnosticMenuItem[diagnosticMenuPlace][7] = diagnostic.firstChild.childNodes[diagnosticMenuPlace].childNodes[7].firstChild.nodeValue;
}
diagnosticMenuPlace++;
}
counterx = 1;
countera = 2;
diagnosticMenuLayer = new Array();
coordinateCheck = 1;
while (countera != counterx) {
counterx = 1;
countera = 2;
diagnosticMenuPlace = 0;
diagnosticMenuLayer[((coordinateCheck+1)/2)] = new Array();
while (diagnosticMenuPlace < diagnosticLength) {
if((length(diagnosticMenuItem[diagnosticMenuPlace][2]) == coordinateCheck)
& (diagnosticMenuItem[diagnosticMenuPlace][2].charAt(coordinateCheck-1) != 0)) {
diagnosticMenuLayer[((coordinateCheck+1)/2)].push(diagnosticMenuItem[diagnosticMenuPlace][2]);
countera++;
}else if((length(diagnosticMenuItem[diagnosticMenuPlace][2]) == coordinateCheck + 2)
& (diagnosticMenuItem[diagnosticMenuPlace][2].charAt(coordinateCheck+1) == 0)){
diagnosticMenuLayer[((coordinateCheck+1)/2)].push(diagnosticMenuItem[diagnosticMenuPlace][2]);
countera++;
}
diagnosticMenuPlace++;
}
counterx++;
coordinateCheck+= 2;
}
}
View Replies !
View Related