Ask a Question related to Macromedia Flash Data Integration, Design and Development.
-
crisbosch #1
Global Array
Hello, I want to organize XML information into an array that can be accessed by
any function in the timeline. I also want to give the array an index ID
(unitID) so I can easily access the array's indexed elements by name, but for
some reason my array is not being defined outside the function. What is the
best way to assign an array global scope such as a variable?
thanks!
//Timeline variable
var unitsArray:Array = new Array();
function loadFloorplans(selectedUnitSize) {
var nodeUnitSize:String;
var unitID:String;
var unitCount:Number;
var pdf:String;
var sqft:String;
for (var i:Number = 0; i<RootNode.childNodes.length; i++) {
nodeUnitSize = RootNode.childNodes[i].attributes.unitsize;
if (nodeUnitSize == selectedUnitSize) {
unitID = RootNode.childNodes[i].attributes.unit;
pdf = RootNode.childNodes[i].attributes.pdf;
sqft = RootNode.childNodes[i].attributes.sqft;
var unitdata = [unitID,pdf,sqft];
unitsArray.unitID = unitdata;
}else{
null;
};
};
};
crisbosch Guest
-
Global array slows script way down
....been screwing around with multidimensional arrays in this script I'm writing and when I make the arrays global the script slows to the point... -
Global array usage?
This is probably one of the dumbest and simplest questions but I just can't find an answer. I have the following line in my PHP file: $version... -
PHP5 and Global Array ($_GET)
I had a client recently contact me with a script that wasn't working. I quickly isolated the problem as to the fact that the $_GET array was not... -
#19617 [Ver->Bgs]: Array_multisort don't work on GLOBAL array
ID: 19617 Updated by: sniper@php.net Reported By: jpapin at free dot fr -Status: Verified +Status: ... -
how to make a global scope array
<20030725224852.1123.qmail@pb1.pair.com> Jack Lee: global $a;



Reply With Quote

