Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to write log file in AS3 ?

New Here ,
Oct 29, 2009 Oct 29, 2009

I've a flash project that's developed in Flash 3.0 and action script 3.0. My requirement is I need to print debug statements
into a seperate text file. on the server
To be in detail Let's assume that I need to print my debug statements inside the file can someone provide us with the sample code
snippet that prints stataments inside a text file?. Your help would be much appreciated.

TOPICS
ActionScript
3.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 29, 2009 Oct 29, 2009

A good way to do this would be to connect to a php script and use the following statements

try{

}catch(e:Error){

var newUrlRequest('php server script here')

     newUrlVariables.target=e.target

      newUrlVariables.type=e.type

     newUrlVariables.typeOfCaller=arguments.callee

  newUrlRequest.data= newUrlVariables

     sendToURL(newUrlRequest)

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 29, 2009 Oct 29, 2009

Is it possible to write the txt file without php.or any oher methad by to write xml file..

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 29, 2009 Oct 29, 2009
LATEST

Error class haven't properties like target and type.

In most cases you must provide your custom exeptions that extends the error class or because error class is dynamic you may define own properties but must rethrow the error class.

You may in catch just log your custom msg like this

try

{
}

catch( exc: Error )

{

     // Something bad was happend
}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines