0

Assuming a client won't have the debug version of Flash player installed, is there any way we can log errors that happen on the client side on a browser?

Or at worst, can we somehow log using Flash Media Server?

Any help would be appreciated.

wrahool
  • 1,101
  • 4
  • 18
  • 42

2 Answers2

0

You can use "flash.external.ExternalInterface" class.

Inside your application use like this,

ExternalInterface.call("console.log","your message");

This will log your message in browser's console. (ie, Console of developer tools in browser)

Subash Selvaraj
  • 3,385
  • 1
  • 14
  • 17
  • But then,those messages can't be recovered, right? Say, once the browser is closed? – wrahool Oct 21 '13 at 09:53
  • If you want to save the errors into a file, You can use ajax in combination with ExternalInterface call. You need to have a javascript method in your html page namely logErrors. `function logErrors(message) { //use ajax calls here to save the error into a file in your server }` Then you need to use this inside your flash, `ExternalInterface.call("logErrors","your message");` Hope this will help you. – Subash Selvaraj Oct 21 '13 at 10:49
0

Since in comment the formatting is not proper I posted as new answer.

If you want to save the errors into a file, You can use ajax in combination with ExternalInterface call. You need to have a javascript method in your html page namely logErrors.

function logErrors(message) {

//use ajax calls here to save the error into a file in your server

}

Then you need to use this inside your flash,

ExternalInterface.call("logErrors","your message");

Hope this will help you.

Subash Selvaraj
  • 3,385
  • 1
  • 14
  • 17