I’m using a button to display an image and I want to use the same button to get rid of the image. Displaying the image is working great but I’m having trouble getting rid of the image.
Any help/suggestions greatly appreciated.
[code]
local function onMasterImage( event )
print(“in onMasterImage”)
if imageup == false then
print(“in onMasterImage imageup=false”)
local myImage2 = {}
local function networkListener2( event )
if ( event.isError ) then
print ( “Network error - download failed” )
else
event.target.alpha = 0
transition.to( event.target, { alpha = 1.0 } )
end
myImage2 = event.target
print ( "RESPONSE: " … event.response )
end
display.loadRemoteImage(
“http://shop.rareparts.com/img/img300/” … “10100” … “.jpg”,
“GET”,
networkListener2,
“helloCopy2.png”,
system.TemporaryDirectory,
10, 180 )
imageup = true
else
– need to get rid if image here
print(“in onMasterImage imageup=true”)
—> code needed to get rid of the image displayed
imageup = false
end
end
[/code] [import]uid: 6547 topic_id: 21680 reply_id: 321680[/import]