A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: External .txt loader won't load

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    4

    External .txt loader won't load

    I have a whole flash website that calls upon external swf depending on the section. There is one section that has a txt scroller that pulls an external txt. It works fine when it's isolated and opened directly, when I try to view it as part of the whole website the scrollbar is there and scrolls but no text shows up.

    I'm at a loss.

    Assuming it was an error on my part I've even gone so far as to buy a prebuilt scroller figurin that would work and I get the same issue.


    lv = new LoadVars();

    lv.onLoad = onLoadCallBack;

    // send and load variables
    lv.load("dynamicfield.txt");

    // onLoad Callback
    function onLoadCallBack(succes)
    {
    // if succes
    if(succes)
    {
    // trace variables
    page.page.htmlText = this.thetext;
    }
    else
    {
    trace("Loading Error!!");
    }
    }

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Location
    Philadelphia, PA, USA, Earth, Sol System, Spiral Arm of Milky Way, Local Group, Virgo Supercluster, Known Universe
    Posts
    470
    Could the path from the parent movie to the text file be different from the path from the individual section to the text file?

    Once a child movie is loaded into a parent movie, paths to external files are relative to the parent movie (or more usually, to the HTML file containing the parent movie).
    Argon Zark!, The original interactive webcomic (since 1995)

  3. #3
    Junior Member
    Join Date
    Mar 2009
    Posts
    4
    the file that contains everything, the file that contains this script and the txt file are all in the same folder.

    for the time-being since this is the least load-intensive portion of my website I put it at the base of the main window and load the other sections on overtop. total duct tape solution but it'll suffice for now.. I'm thinkin I'll have to rip apart the code and start from scratch but I'm so far into the web this slider was more an afterthought.

    I appreciate the response!!

  4. #4
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    I think is a LEVEL ISSUE. maybe the text from the textfile is loading "under" the content, or in another location, and that's why you can't see it. Let me know

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