-
Access array elements throw different swf's
Hi there,
I need to access the elements of an array that is declared in the main swf(_level0). But I need to change it from another swf.
How can I do it??
So far I have this:
MAIN SWF:
var vector1:Array = [biblio_vid1, biblio_vid2, biblio_vid3, btn_1_4, biblio_vid4];
OTHER SWF:
var vector2:Array = _level0.vector1.slice();
trace(vector2); // undefined,undefined,undefined,undefined,undefined
Thanks!
-
Curious... I wonder if it's failing to evaluate the paths because it's referencing the wrong level? Clearly it's copying the array if it's returning multiple undefined's; it's just the contents of the array that's awry.
What happens if you individually access the array elements like this:
Code:
var vector2:Array = _level0.vector1.slice();
trace(_level0[ vector2[0] ]);
Also make sure that the instances of the movieclips referenced in the array are actually on the timeline when your other SWF is trying to access them.
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
|