Image in front of WebPopUp

I am opening a webPopUp on my app, but I need the user to be able to close it at any time (pretty standard functionality).

I have the button image (circle with an ‘X’ in the middle) and webPopUp showing on screen, but I want the button to overlap the webpopup at the top right of the screen. Is that possible? My code is as follows:

native.showWebPopup(10, 10, display.contentWidth-20, display.contentHeight-20, "http://api.twitter.com/oauth/authorize?oauth\_token=" .. twitter\_request\_token, {urlRequest = listener}) closeBtn = display.newImage('closeBtn.png') closeBtn.x = display.contentWidth - (closeBtn.width/2) closeBtn.y = 20 closeBtn:addEventListener('tap', closeWindow) closeBtn:toFront()

The webPopUp and button both appear, but the closeBtn is behind it.

Thanks [import]uid: 61422 topic_id: 16217 reply_id: 316217[/import]

your images, elements are all part of OpenGL, where as the WebPopup is overlaid on OpenGL, so it will always be on top, you cannot place an element over the WebPopup.

Now to resolve your issue, you can create a backdrop to the webPopup that has the image of a cross and looks like a border to the webpopup, so it will look like it is all part of one group.

Do you get what I am saying?

+---------------(x)-+ | | | +--------------+ | | | | | | | | | | | Web-Popup | | | | | | | | | | | +--------------+ | | | +-------------------+ [import]uid: 3826 topic_id: 16217 reply_id: 60355[/import]

I get your first statement. Perhaps it could be introduced in the future as an optional parameter for the WebPopUp for a close button to be put in place?

Do you mean place the image away from the WebPopUp? So if it’s a 20x20 image make sure the webPopUp is 20pixels lower and to the left? Essentially remove the overlap [import]uid: 61422 topic_id: 16217 reply_id: 60356[/import]