-
[RESOLVED] var's to array problem
Please help. The problem is the string of numbers load from the file.txt and look ok. But they do not become a usable array(undefined). So mc1 does not move.
The data in the file.txt is formatted like this -
&myData=10,15,20,25,30,35,40,45,50,55,60,65,70
// the code
var inc = 0;
var lv = new LoadVars();
lv.onLoad = function(success)
{
if(success)
{
myData = lv.myData;
move = new Array(myData);
}
}
lv.load("file.txt");
onEnterFrame = function()
{
_root.mc1._x = move[inc];
inc += 1;
if(inc > 10) {inc = 0};
}
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
|