I initialized OpenFeint correctly in my Main.lua… but whenever I put the Open feint into app, it’s clickable, but won’t launch the dashboard.
Please see if you can see the problem. Thanks.
[code]
local ofbtn = display.newImage(“ofbtn.png”, 234, 48)
ofbtn.x = display.contentWidth/2
ofbtn.y = 835
ofbtn.isVisible = true
ofbtn.isBodyActive = true
localGroup:insert(ofbtn) – need this
local onofbtnTouch = function (event)
if event.phase == “ended” then
openfeint.launchDashboard()
end
end
ofbtn:addEventListener(“touch”, onofbtnTouch)
[/code] [import]uid: 19768 topic_id: 7175 reply_id: 307175[/import]
Anybody? [import]uid: 19768 topic_id: 7175 reply_id: 25285[/import]
Come on guys please help me out. [import]uid: 19768 topic_id: 7175 reply_id: 25360[/import]
This is what I have in main.lua. Be sure you check case sensititvity and number of arguments in init statement
local openfeint = require("openfeint")
openfeint.init( "XXXXXX", "XXXXXXX", "XXXXX", "XXXXX" )
And my button in splash.lua
if event.phase == "ended" then
openfeint.launchDashboard()
end
I assume you have put a print statement in to check your button function is being called. [import]uid: 7863 topic_id: 7175 reply_id: 25364[/import]
Yup. I do. Still not working. I already have what you said. Is it just not working cause it’s in the simulator? Or what? [import]uid: 19768 topic_id: 7175 reply_id: 25366[/import]
This functionality will not work in the Simulator. You will need to test on a device. [import]uid: 7863 topic_id: 7175 reply_id: 25367[/import]
evs
February 27, 2011, 2:21am
7
Or you can build and test in the Xcode Simulator [import]uid: 8366 topic_id: 7175 reply_id: 25378[/import]
Thanks for the answer mediakitchen. And naw, I don’t wanna do it in xcode… too confusing. Thanks. [import]uid: 19768 topic_id: 7175 reply_id: 25396[/import]