Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 990791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:59:54+00:00 2026-05-16T05:59:54+00:00

I have an external log file which name changes each session, with the format

  • 0

I have an external log file which name changes each session, with the format XXXXX.log

I need to load it inside a swf to show its data, but each time the log´s name is different, I need to open the .fla, changing the name of the file and then republishing the swf.

So I have made a simple script to load another .txt, to type manually in it the 5 number of the log´s name and load it externally inside the swf:

var logNumLoader:URLLoader = new URLLoader();
logNumLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
logNumLoader.addEventListener(Event.COMPLETE, loadedLogNum);
logNumLoader.load(new URLRequest("infoLogNum.txt"));

function loadedLogNum(e:Event):void {

         trace(e.target.data.logNum); //  HOW TO GET THE VALUE OF logNum... *(see below)

        }

The “infoLogNum.txt” contains just a variable, which is the manually typed name of the .log, like:

logNum=12345

This script works perfect, as it outputs the variable value, in this case “12345”.

But I need this “logNum” value to be passed inside another function that loads and opens the XXXXX.log (see in the code at the bottom):

...

var tracksLoader:URLLoader = new URLLoader();
tracksLoader.addEventListener(Event.COMPLETE,onTracksLoaded);
tracksLoader.addEventListener(IOErrorEvent.IO_ERROR,onTracksError);
tracksLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,onTracksError);

loadTracks();

function onTracksLoaded(e:Event):void {
    trace("onTracksLoaded");
    parseTracks(tracksLoader.data); 
    reload.start(); 
}

function onTimer(event:TimerEvent):void{ 
    loadTracks();
}

function onTracksError(e:Event):void {
    trace("onTracksError", e);
    reload.start();
}

function loadTracks():void {
    tracksLoader.load(new URLRequest(logNum+".log")); // (*) ...AND SET THE logNum VALUE HERE 
}

While I cannot assign the value of logNum to the last function, the .log cannot be opened.

I have no clue on how to make it work. Any ideas, please?

TIA.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:59:55+00:00Added an answer on May 16, 2026 at 5:59 am

    Perhaps something like this:

    function loadedLogNum(e:Event):void {
      var logNum:String = e.target.data.split("=")[1]; // returns "12345"
      tracksLoader.load(new URLRequest(logNum + ".log"));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an external setting file which has some nodes holiding attribute values of
I have an external file in php, outputed as json format I want the
Under my project, I have a Java class file, inside of which I have
I would like to have external proofreaders to work directly inside my Drupal site.
I have an external distance object ( gdis ) and need to convert it
I have an external javascript library which triggers on the change of a textarea,
I have an external Javascript file and i am trying to alert the value
I have a python script which should parse a file and produce some output
I have made an actionscript that loads an external text file, and scrolls its
I have a small python script which invokes an external process using subprocess .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.