A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Should be very simple....But it's not !!!! Please help this pathetic bonehead!

  1. #1
    Junior Member
    Join Date
    Nov 2000
    Posts
    15

    Should be very simple....But it's not !!!! Please help this pathetic bonehead!

    Yo Gods! Thanks in advance for your time.

    As I said, this should be a very easy loadVariables question. But I've tried & tried & tried & can't get it to work....

    Am trying to simply load variables from a text file:

    1) First frame of movie, I set Frame Action as follows:

    loadVariables ("data1.txt","")
    Stop

    2) In this frame, I place a Dynamic Text Field, refering to the variable text1

    3) In my text file, named data1.txt and located in the same folder as my .fla and .swf files, I have the following

    text1=testmessage

    I run the movie, and expect I should see "testmessage" appear in the field... But no joy!

    I've tried every permutation and variation of this I can think of, with no luck....

    Please Gods, give me the answer!

    Kelly C aka The Mouse

  2. #2

    Re: Should be very simple....But it's not !!!! Please help this pathetic bonehead!

    Originally posted by The Mouse
    Yo Gods! Thanks in advance for your time.

    As I said, this should be a very easy loadVariables question. But I've tried & tried & tried & can't get it to work....

    Am trying to simply load variables from a text file:

    1) First frame of movie, I set Frame Action as follows:

    loadVariables ("data1.txt","")
    Stop

    2) In this frame, I place a Dynamic Text Field, refering to the variable text1

    3) In my text file, named data1.txt and located in the same folder as my .fla and .swf files, I have the following

    text1=testmessage

    I run the movie, and expect I should see "testmessage" appear in the field... But no joy!

    I've tried every permutation and variation of this I can think of, with no luck....

    Please Gods, give me the answer!

    Kelly C aka The Mouse

    hi there... im not a God but hope i can help u.. i really didnt find any mistake/s from the movie u created.. i did it myself... i created a dynamic textfield and named it text1... also on the frame where i added an actionscript which loads txt file...

    loadVariables("data.txt", "");

    also i did put this one on the txt file...

    text1="test message"

    and it works! but try looking for some mispelled or even char cases.. flash is txt sensitive... hope this helps

    cheers!

  3. #3
    Junior Member
    Join Date
    Nov 2000
    Posts
    15

    Thanks much for help, but still no luck.....

    Thanks, Belte, for the comeback....

    In fact, I have looked closely for misspellings and character case, but still no luck.

    Perhaps I should have added that this pathetic bonehead is using Mac, System 9.1, Flash 5, and Netscape 4.5.

    Any help greatly greatly appreciated.

    Kelly C aka The Mouse

  4. #4

    Re: Thanks much for help, but still no luck.....

    Originally posted by The Mouse
    Thanks, Belte, for the comeback....

    In fact, I have looked closely for misspellings and character case, but still no luck.

    Perhaps I should have added that this pathetic bonehead is using Mac, System 9.1, Flash 5, and Netscape 4.5.

    Any help greatly greatly appreciated.

    Kelly C aka The Mouse
    oic.... no worries... fortunately.. im a mac user.. i have one in the office.. so later ill try it there and post my comment/s..

    o yah i remember... i have that same problem before over mac... that i could see the external file i typed... but when i run my movie over PC, its workking perfectly fine... i think its on the version of the browser... let me check on that again....

    cheers!

  5. #5

    Re: Re: Thanks much for help, but still no luck.....

    Are the swf file and the txt file in the same directory as the HTML file? It sounds like they are in a different directory? IE makes all external calls relative to the directory of the swf file but some versions of Netscape make them relative to the HTML file. Try putting all 3 files in the same directory.

    Also sometimes when you loadvariables on one frame and then stop the movie's playback head and the text fields representing the variables are on the same frame they don't refresh to display the variable. The variables are loaded but the text fields don't refresh. If the first solution doesn't work, try loading on frame 1 and putting the text fields on a later frame. Also use the debugger to find out if the variables are loading correctly. To do this in a browser you have to replace the normal Flash plug in with the debugger plug in in the browsers plug in folder.

    Does any of that make sense?

  6. #6
    Junior Member
    Join Date
    Nov 2000
    Posts
    15
    Yo - This pathetic bonehead wants to first thank everyone for their time and assistance. Here's my report:

    1- Yes, thanks - SWF, text, and HTML are all in the same folder..... No joy!

    2- In fact, I have moved this over to my PC, Win 95 with IE 5.50, and still works the same as on Mac..... No joy!

    3- Paul, thanks for both your excellent suggestions. In fact, I tried the trick of putting text field on frame 2 instead of frame 1, and still the same thing.... No joy!

    However, using your suggestion with the debugger, I was at least able to verify that the variable is being read... It is still not updating or displaying, but at least I know it's reading the bloody thing... I'll keep hacking away on it and let you know...

    Any other suggestions greatly greatly appreciated....

    Until then, I remain

    Kelly C aka The Mouse aka a pathetic bonehead

  7. #7
    Junior Member
    Join Date
    Aug 2000
    Posts
    6

    here's a checklist...if this won't work...cut bait.

    here's a quick checklist to run down...
    I know you've hit most of it, but
    maybe not all...

    .: Is HTML checked for field? if so you could have issues
    with embedding text. uncheck html and do-embed fonts

    .: same folder...

    .: case sensitive...

    .: levels appropriate regarding var name. Must be calling
    variable from the right level. i.e. _level0.varname even
    though you load vars in level0 by default. put 0 in your
    get vars and put _level0 before your var in the text
    menu.

    That's all from me.
    ~Peace

  8. #8
    Junior Member
    Join Date
    Nov 2000
    Posts
    15

    Thanks & more Thanks & even more Thanks

    Yes!

    YES!

    OOOOOOOOHHHHHHH YES!!!!!!!!!!!!!!

    I am a pathetic bonehead, no longer !

    And it feels soooooooo gooood!

    Thank you all very much. The last suggestion did the trick: Put _level0. in the variable name for the text field....

    I am reborn. Groovy! Moby! MONDO !!

    You are all truly: THE GODS OF FLASH !

    KC

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