Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-23-2004, 06:32 AM
Junior Member
 
Join Date: Jul 2004
Posts: 2
Default populating dynamic variables with object array

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");
//>>>>>>
thanks.
Reply With Quote
  #2 (permalink)  
Old 07-23-2004, 03:20 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:populating dynamic variables with object array

There isn't a global variable in SWFKit.
Reply With Quote
  #3 (permalink)  
Old 07-24-2004, 03:20 AM
Junior Member
 
Join Date: Jul 2004
Posts: 2
Default Re:populating dynamic variables with object array

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.
Reply With Quote
  #4 (permalink)  
Old 07-26-2004, 12:49 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:populating dynamic variables with object array

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.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:16 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.