A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: End a variable?

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    109
    i want to stop or end a variable. I have an input box (name) I have it save the variable to a txt file. I want to be able to pull up that variable again from the txt file. I noticed that it loads the variable from the name as well as the txt file. So i dont want it to read the name variable in the movie just the .txt file.
    Any help would be apriciated.
    I have:
    frame 1: input box (input)
    button: on (release) {
    fscommand ("save", "c:/new folder/Amex/new folder/cool.txt");
    }
    Then I have another button to load the txt back to a dynamic txt box(output)on (press){
    gotoAndPlay(15);
    }
    Frame 15: load loadVariablesNum ("./cool.txt", 0);
    Frame 16: if (text ne"")gotoAndPlay(19);
    Frame 17: gotoAndPlay(16);
    Frame 18: output=input; This is the problem I want the output to come from the txt file not the movie. How can I end that variable. I thought in the {} made it local. Does local mean that its anywhere in the timeline on the main stage?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Posts
    588
    If you are talking about ending the variable "output", or any variable, you can use the "delete" action to do that.

    So somewhere before you load the text file, you can write:

    delete output;

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