Can't remove Slide-View (Need urgent help)

Hi,

I was wondering how can you remove the slide-view. I want to be able to close it to change screens. It works fine with removing scrollview :s

I use removeSelf() for removing the scroll-view which works great. If i try use it for slide-view it don’t work though.

I really need this as trying to make this app for a client so need it working soon if possible.

I have tryed doing this with director aswell but still didn’t seem to work.

Thanks :smiley:

I changed the code inside the slide-view to
local p = display.newImage(imageSet[i], system.DocumentsDirectory)
line 53 but doubt would make any difference.

Code:

[code] display.setStatusBar( display.HiddenStatusBar )

function Events()

– Create local file for saving data
local path = system.pathForFile(“summerfundayoriginal72.jpg”, system.DocumentsDirectory )
myFile = io.open( path, “w+b” )

local path2 = system.pathForFile(“outdoorworkshopsweb3.jpg”, system.DocumentsDirectory )
myFile2 = io.open( path2, “w+b” )

– Request remote file and save data to local file
http.request
{ url =“http://www.anscamobile.com/images/showcase/CoronaBadge_240x230.png”,
sink = ltn12.sink.file(myFile),
}

http.request
{ url =“http://www.anscamobile.com/images/showcase/CoronaBadge_240x230.png”,
sink = ltn12.sink.file(myFile2),
}

local function listener(event)

local ontouch = event.target

if(ontouch == count) then
slideView:removeSelf()
count:removeSelf()
end

return true
end

local myImages = {
“summerfundayoriginal72.jpg”,
“outdoorworkshopsweb3.jpg”
}

slideView.new( myImages )

count = display.newText( “Exit”, 140, 0, “Arial”, 20 )
count:setTextColor( 255, 0, 0, 255 )
count:addEventListener(“touch”,listener)

end [import]uid: 22223 topic_id: 11867 reply_id: 311867[/import]

Hi,

Did you try to equal the slide with a variable, i think it will work. I mean to do like this

change the line 40

slideView.new( myImages )

to be like this

local variable = slideView.new( myImages )

then try to remove the variable ( variable:removeSelf() ).

Regards,

Ali [import]uid: 41548 topic_id: 11867 reply_id: 46401[/import]