display.loadRemoteImage EXAMPLE code not working.

Here is the page for display.loadRemoteImage:

https://docs.coronalabs.com/api/library/display/loadRemoteImage.html

I copied and pasted the example code and it didn’t work.

I get the error:

attempt to index field ‘target’ <a nil value>

Here’s the code:

local function networkListener( event ) if ( event.isError ) then print ( "Network error - download failed" ) else event.target.alpha = 0 transition.to( event.target, { alpha = 1.0 } ) end print ( "event.response.fullPath: ", event.response.fullPath ) print ( "event.response.filename: ", event.response.filename ) print ( "event.response.baseDirectory: ", event.response.baseDirectory ) end display.loadRemoteImage( "http://www.coronalabs.com/demo/hello.png", "GET", networkListener, "helloCopy.png", system.TemporaryDirectory, 50, 50 )

I have the latest release of corona sdk.

Just use this image path:

https://coronalabs.com/images/coronalogogrey.png

The other logo is missing.

The code works fine.

Note: The API docs have a button at the bottom (blue)  with the text ‘Report Issue’.  

I’ll report this, but in the future, you can notify the Docs guys(s) via that button.

Cheers,

Ed

Oh, thanks!

Just use this image path:

https://coronalabs.com/images/coronalogogrey.png

The other logo is missing.

The code works fine.

Note: The API docs have a button at the bottom (blue)  with the text ‘Report Issue’.  

I’ll report this, but in the future, you can notify the Docs guys(s) via that button.

Cheers,

Ed

Oh, thanks!