A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: unload external text file?

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    14

    unload external text file?

    Hi,

    I am using text in a movie whis is fed from an external text file using the script:
    this.loadVariables("moreinfo.txt");

    My questions is how the heck do i unload it?
    It is used in a sprite acting like a popup and has a button to close but the text from the external file remains in place.

    Failing that, is there a script command which will unload the sprite (remeber the close button is in the same sprite)

    Many thanks

    Matt

  2. #2
    Senior Member Lys12's Avatar
    Join Date
    Feb 2001
    Location
    Munich, Germany
    Posts
    5,237
    hi,

    there's no way to unload a movie from a sprite like you can from alevel.

    what you can do is either remove the sprite, (sprite._visible=false), or load a second, empty textfile.

  3. #3
    Junior Member
    Join Date
    Oct 2004
    Posts
    2
    // this will delete all variables in "this"
    for (x in this) {
    delete this[x];
    };

    // this will delete all variables and objects in "this"
    for (x in this) {
    this[x]=undefined;
    };

  4. #4
    SWiSHer extraordinaire
    Join Date
    Dec 2000
    Location
    Australia
    Posts
    3,900
    // this will delete all variables and objects in "this"
    for (x in this) {
    this[x]=undefined;
    };
    that won't delete the variables .. it keeps them but sets their value to 'undefined'.

    Both of the above techinques will, however, usually have the side effect of removing any scripting objects (like Arrays) (as opposed to clips or sprites etc) as long as there are no other references to them.
    Roger Onslow - SWiSHmax: its here!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center