Hi, I’m new in using Corona SDK … I hope that my request is not stupid! I’m working for a game (usually candycrash) If you end the 10th level, displays an image promotion (h_img), pressing the picture you get to the facebook page (h_link). I’ll explain…
if self.level == 5 then
h_img = “immage01.png”
h_link = "https://www.facebook.com/link"
end
local houseAdsGroup = display.newGroup()
self.parent:insert(houseAdsGroup)
local houseAds = display.newImageRect(“images/background/”…h_img, G_MAX_WIDTH, G_MAX_HEIGHT)
houseAds.x, houseAds.y = display.contentCenterX, display.contentCenterY
houseAdsGroup:insert(houseAds)
local function onBannerTouch( event )
if event.phase == “began” then
system.openURL(h_link)
return true
end
end
I wish that the player can go to the link once, if repeated the 10th level has to find another image and the link disappears.
I searched around but I can not find a function … <_<
A help would be really grateful!
Sorry for my English …
Good luck to all the Forum!