#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    3
    Rep Power
    0

    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!
  2. #2
  3. No Profile Picture
    Gotta get to the next screen..
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2003
    Location
    Legion of Dynamic Discord
    Posts
    6,678
    Rep Power
    3164
    Hi, that part is actually working fine. The problem is that biblio_vid1 and the other array elements are undefined meaning you have not created variables or MovieClip instances with those name. Maybe you meant it as a series of strings in which case it would be:

    var vector1:Array = ["biblio_vid1", "biblio_vid2", "biblio_vid3", "btn_1_4", "biblio_vid4"];
    Last edited by Tann San; July 9th, 2011 at 06:07 PM.
    Quis custodiet ipsos custodes?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    3
    Rep Power
    0
    Thank you!

    That worked just fine

IMN logo majestic logo threadwatch logo seochat tools logo