check if file exists

Software: Away3D 4.x

pool338, Jr. Member
Posted: 20 July 2012 07:35 AM   Total Posts: 37

Hello,

I’m loading obj/mtl files in my small swf. That warks all fine as long as the file I want to load exist. But if the file doesn’t exist, I get a stream error.

Is there a possability to check if a file exists, before I try to load it?

   

Richard Olsson, Administrator
Posted: 20 July 2012 11:39 AM   Total Posts: 1192   [ # 1 ]

Make sure you listen for the LoaderEvent.LOAD_ERROR event on the loader that you’re using. That way no errors will be thrown, and you will instead just get the event and can handle it in any way you want.

   

pool338, Jr. Member
Posted: 20 July 2012 11:40 AM   Total Posts: 37   [ # 2 ]

Thanks again.

Btw.: Are you the only one giving answers in this forum?

   

Richard Olsson, Administrator
Posted: 20 July 2012 11:41 AM   Total Posts: 1192   [ # 3 ]

No, I’m not, but I’m one of the more active ones.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X