A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: load a .txt variable into MC?

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    109
    How can I get a variable from a .txt file to load into a MC?..
    I can get it toload into the main stage but when I try to load it to a MC it doesn't show up and I get no errors.



  2. #2
    Senior Member
    Join Date
    Dec 2000
    Posts
    120

    it could be a bunch of stuff...

    can I see the text file before i comment?

  3. #3
    Senior Member
    Join Date
    Dec 2000
    Posts
    120

    oh, and...

    exactly what command are you using to load it?
    and where is the command to load placed?

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Posts
    109

    Re: oh, and...

    Maybe you vcould tell me how you would do it.

    Forget the .txt file dor now. I just want to get a variable into a MC for now. ( of course if you want to tel me how to do that anyway that woudl be great..

    _root.(main stage)

    layer1 > actions: telltarget(_root.MC)
    gotoandstop(1)
    Layer2 > input box Name: input
    Layer3 > MC named MC
    Layer4 > button (actionsn (press)(telltarget(_root.MC){gotoandplay(2);}} Not exactly like this but you get the pic.

    MC:
    Layer1 > frame1 Blank
    Layer2 > frame2 Dynamic box named output With action on frame: output=name;

    Hope that you can figure that out as Im not very good at this yet.
    Anyway if there is another way please let me know.

  5. #5
    Senior Member
    Join Date
    Dec 2000
    Posts
    120

    well, let's start basically

    well, first of all I like
    _root.MC.gotoAndStop(1); better then the telltarget way

    on the next (or after all the telltarget stuff) line I'd put:

    loadVariables ("http://www.wherever.com/myTextFile.txt", "MC");

    that >should< work.


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