|
-
Help loading external data as a number array
So this is driving me a little nutty...
I'm trying to create an interface that is customizable by changing the data in an external text file, rather than having to open up AS and code away. My main issue comes from the fact that I can't get the data from the external file to be accessible from the main timeline.
Code:
PortfolioLoadVars = new LoadVars();
PortfolioLoadVars.load("portfolio.txt");
PortfolioLoadVars.onLoad = function() {
PortfolioTxt.html = true;
PortfolioTxt.multiline = true;
PortfolioTxt.wordWrap = true;
PortfolioTxt.autoSize = "left";
PortfolioTxt.htmlText = PortfolioLoadVars.Empty;
port_preview_x = PortfolioLoadVars.xloc;
};
Now, in the text file "porfolio.txt", there are the following values:
&Empty =
&xloc=-130,8,-130,8,-130,8,-130,8
If I try to trace port_preview_x, I get undefined. However, if I remove the code from this loadvars command and attach it to a button, it loads up just fine. I din't particularly want to attach code to buttons (that's just sloppy programming), so what do i do to make my .fla able to read this information from the main timeline?
I am using MX 04, if that makes any difference.
Thanks in advance for any help offered!
Pacem!
--T
"Clearly I cannot choose the cup in front of you!"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|