-----------------------------------------------------------------------------------------  
--  
 --level1.lua  
--  
-----------------------------------------------------------------------------------------  
   
local storyboard = require( "storyboard" )  
local scene = storyboard.newScene()  
   
-----------------------------------------------------------------------------------------  
-- BEGINNING OF YOUR IMPLEMENTATION  
--   
-- NOTE: Code outside of listener functions (below) will only be executed once,  
-- unless storyboard.removeScene() is called.  
--   
-----------------------------------------------------------------------------------------  
   
-- Called when the scene's view does not exist:  
function scene:createScene( event )  
 local group = self.view  
   
 -- create a grey rectangle as the backdrop  
 local background = display.newRect( 0, 0, screenW, screenH )  
 background:setFillColor( 255 )  
  
   
local font = "HelveticaNeue" or native.systemFont;  
   
local label =display.newText("Tap here to send a text", 0, 0, font, 18) ;  
label:setReferncePoint(display.CenterReferencePoint) ;  
label:setTextColor(0, 0, 0) ;   
label.x = \_W \* 0.5;  
label.y = \_H - 50;  
   
function label:tap(e)  
 native.showPopup("sms",{  
 body = "I sent this text from my app",  
 to = {5550000000}  
}) ;  
end  
   
label:addEventListner("tap", label);  
   
-- \*\*\*\*\*\*\*\*\*\*  
-- this is the "end" that is missing  
-- \*\*\*\*\*\*\*\*\*\*\*  
end  
   
-----------------------------------------------------------------------------------------  
-- END OF YOUR IMPLEMENTATION  
-----------------------------------------------------------------------------------------  
   
-- "createScene" event is dispatched if scene's view does not exist  
scene:addEventListener( "createScene", scene )  
   
-- "enterScene" event is dispatched whenever scene transition has finished  
scene:addEventListener( "enterScene", scene )  
   
-- "exitScene" event is dispatched whenever before next scene's transition begins  
scene:addEventListener( "exitScene", scene )  
   
-- "destroyScene" event is dispatched before view is unloaded, which can be  
-- automatically unloaded in low memory situations, or explicitly via a call to  
-- storyboard.purgeScene() or storyboard.removeScene().  
scene:addEventListener( "destroyScene", scene )  
   
-----------------------------------------------------------------------------------------  
   
return scene  [import]uid: 19626 topic_id: 30033 reply_id: 120403[/import]
