-
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
-
Senior Member
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.
-
// 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;
};
-
// 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|