A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: missing text in dynamic text field

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    249

    missing text in dynamic text field

    Hi

    I have a dynamic text field in my flash presentation where I have attached the commponent scroll bar that comes with Flash MX. The text for this field is pulled from a data.txt file. I am using html forms on a web browser to collect the data and then using ASP dor the server side scripting.

    I notice that in certian instances that text that is in qouation marks (ie,"mytext") does not show up in the dynamic text field and any text after the qoutation marks does not show up(ie, "mytext";more text)

    If there is text before the qoutation marks shows up and displays in the dynamic text field. (ie, mytext "moretext"

    I haven't a clue as to why this would be happening. Anyone run into this before?


    The code for the dynamic text follows:

    [code]
    loadVarsText = new loadVars();
    loadVarsText.load("data.txt");
    // assign a function which fires when the data is loaded:
    loadVarsText.onLoad = function(success) {
    if (success) {
    trace("done loading");
    // Now that we know the data is loaded,
    // set the text content of the Text Field
    // with the instance name "scroller" equal to the
    // display new image
    // contents of the variable
    scroller.text = this.vh_p1text;
    // add image here
    } else {
    trace("not loaded");
    }
    };
    [\code]

  2. #2
    Senior Member of Toon Army lucky-black-cat's Avatar
    Join Date
    Aug 2002
    Location
    Benarraba Andalucia Spain
    Posts
    303
    Hi,

    It sounds like a string thing. Your text field is ok.

    It must be the text field variable from your ASP ... can you change the outside pair of quotes to ' ?

    Or you will have to use \" for quotes inside your string.
    Last edited by lucky-black-cat; 10-21-2002 at 08:54 AM.
    http://www.property-in-the-sun.com
    Cheap Holidays in Andalucia Spain for Flash Programmers from 2005!

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Posts
    249
    luck-black-cat

    I'm not an ASP programmer, this is all I have so far:

    Code:
    set objFS = server.CreateObject("Scripting.Filesystemobject")
    set objFile = objFS.OpenTextFile(server.MapPath("/flash/data.txt"), 2, true)
    objFile.Write Request.Form
    objFile.close
    Last edited by Navarone; 10-21-2002 at 08:13 AM.

  4. #4
    Senior Member of Toon Army lucky-black-cat's Avatar
    Join Date
    Aug 2002
    Location
    Benarraba Andalucia Spain
    Posts
    303
    Hi

    I don't understand, I thought you were using ASP?
    http://www.property-in-the-sun.com
    Cheap Holidays in Andalucia Spain for Flash Programmers from 2005!

  5. #5
    Senior Member
    Join Date
    Apr 2001
    Posts
    249
    Hi,

    I am using asp. is not the code in my last post asp?

  6. #6
    Senior Member of Toon Army lucky-black-cat's Avatar
    Join Date
    Aug 2002
    Location
    Benarraba Andalucia Spain
    Posts
    303
    The code wasn't there ... you've just edited it???
    http://www.property-in-the-sun.com
    Cheap Holidays in Andalucia Spain for Flash Programmers from 2005!

  7. #7
    Senior Member
    Join Date
    Apr 2001
    Posts
    249
    Yeh, sorry

    It didn't post correctly the first time.

  8. #8
    Senior Member of Toon Army lucky-black-cat's Avatar
    Join Date
    Aug 2002
    Location
    Benarraba Andalucia Spain
    Posts
    303
    Hi

    Ok your using ASP to read in a text file. (You can load that straight into Flash).

    You need to read about escaping characters in F1 Help under Strings.

    Or change the " in your text file to ' that might work.
    http://www.property-in-the-sun.com
    Cheap Holidays in Andalucia Spain for Flash Programmers from 2005!

  9. #9
    Senior Member
    Join Date
    Apr 2001
    Posts
    249
    Ok

    I read it, but how to I code that into the Action Script? I certianly cant expect the cleint to use slash marks and so forth when he is typing text in the html form?

  10. #10
    Senior Member of Toon Army lucky-black-cat's Avatar
    Join Date
    Aug 2002
    Location
    Benarraba Andalucia Spain
    Posts
    303
    You are going to have to write a find and replace script in ASP that runs on the text file before you load it into Flash.

    You might want to try an ASP forum for that, or the Scripting and Backend forum here is good for php you might get some 'expert' help there. I use PHP. So I can't really help with the ASP.
    http://www.property-in-the-sun.com
    Cheap Holidays in Andalucia Spain for Flash Programmers from 2005!

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