|
|||
|
I am having problems populating dynamic global variable.
Can anybody tell me if the following should work and if the dynamic variable would in this case populate with the array, and become globally available? all code is inside SWFKit Pro. Code:
//>>> version 01 >>>>
buildXMLarray = function (xo){
var xmla = [];
xmla.type = "hello";
this[xo+"_data"] = xmla;
}
buildXMLarray("5403");
//>>>>>>>
//>>>>> version 02 >>>>>>
buildXMLarray = function (xo){
var xmla = [];
xmla.type = "hello";
return xmla;
}
this[xo+"_data"] = buildXMLarray("5403");
//>>>>>>
|
|
|||
|
funny, I distinctly remember reading that declaring variables in SWFKit can be local "var myvar=1" and global "myvar=1".
So is this not the case? What I am tryiong to do is load about 2500 XML documents into memory, then parse through all the documents and create inter-relational information data and pre-indexed search data files. So I need a way to store the parsed XML data of each file for accessing later in other functions. How would I be able to do this? BTW: all data is stored in Object arrays. I have been doing this in Flash itself, but am running into problems with the maximum loop number, and flash being a lot slower in processing. After processing all the data, I convert the data into Binary and write compressed SWF files instead of XML, for faster laoding of data into the final client side flash movie. |
|
|||
|
Sorry, I meant "there isn't a global object in SWFKit".
You can only use "this" within the implementation of methods or constructor of an object. Could you send us a sample? We will try to help you to resolve the problem. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|