Director help

Does anyone know how to switch scenes using the Director class, so if I call a function from nav.lua from a list view this will work:

--setup functions to execute on touch of the list view items  
function listButtonRelease( event )  
 self = event.target  
 local id = self.id  
  
 -- Trying to switch to item section based on id  
 if (data[id].title == "item 1")   
 director:changeScene("item\_section1","moveFromLeft")) --does not work  
 else if (data[id].title == "item 2")   
 director:changeScene("item\_section2","moveFromLeft")) --does not work  
 else if (data[id].title == "item 3")   
 director:changeScene("item\_section3","moveFromLeft")) --does not work  
 else if (data[id].title == "item 4")   
 director:changeScene("item\_section4","moveFromLeft")) --does not work  
 else   
 director:changeScene("item\_section5","moveFromLeft")) --does not work  
 end  
  
 end  
end  
  

[import]uid: 29983 topic_id: 10298 reply_id: 310298[/import]

are there any lua files for item_section1,item_section2,…

???

you can find director class from code exchange with example see that [import]uid: 12482 topic_id: 10298 reply_id: 37567[/import]

this is the link

http://developer.anscamobile.com/code/director-class-10

see how it works!!!

:slight_smile: [import]uid: 12482 topic_id: 10298 reply_id: 37568[/import]

Thanks for the link. There were seperate lua files for all the sections. I found that I had a typo that was throwing an error. [import]uid: 29983 topic_id: 10298 reply_id: 38484[/import]