Image Popup or call scene

Im trying to do this:

I have a list of images, when tap (click) on image open a popup with details (description, more images, little bit of history about the image), i searched on the forums for guide of popup but couldnt find (I think its better this option, more clean and less work :stuck_out_tongue: )

This one is the objective but if is not possible, i’d like to open new scene (xxx.lua) when click on image.

I have this:

local archers = display.newImageRect( "cards/archers.png", 50, 50 ) archers.x = 30 archers.y = -18

I tryed this:

local function Archercall( event ) composer.gotoScene( "Archer" ) end local archers = display.newImageRect( "cards/archers.png", 50, 50, onPress=Archercall ) archers.x = 30 archers.y = -18

But i get this error:

e96uwy.jpg

Thanks.

This line is wrong:

display.newImageRect( "cards/archers.png", 50, 50, onPress=Archercall )

You could do this:

local function Archercall( self, event ) composer.gotoScene( "Archer" ) end local archers = display.newImageRect( "cards/archers.png", 50, 50 ) archers.tap = Archercall archers:addEventListener( "tap" )

Worked! Thanks

I have more questions but its embarassing to me open more threads  :unsure:  :unsure:

I dont use LUA like 9-10 years, since World of Warcraft scripts IA (AI) changed to C++, so im having some troubles on coding again with LUA   :lol:  :lol: but stills funny as i remember. 

Thanks again.

PD: Pop-up method is not possible?

@yusaney,

You’re welcome.  

Don’t be embarrassed.  It is actually better to open discrete posts for new topics (i.e. one topic per post).  This is better for all involved.

Just be sure to put some time into the question showing

  1. what you did,
  2. what you expected, and
  3. what you saw.

That will make it easier for me (and others) to help you.  Your post above was pretty good, so just keep it up.

Thanks,

Ed

Thanks for your answers,

I was looking on the forums, on external pages, overflow and more pages but i cant find what i am looking for:

on corona docs found this: https://docs.coronalabs.com/api/library/native/showPopup.html

the strings list i dont see what im looking for, example (when open popup, add image, or text on this popup)

"mail" — Displays a popup window for composing an email. "sms" — Displays a popup window for composing an SMS message. "appStore" — Displays a popup window from the app store that the application was downloaded from. It will display the app's details such as the summary, an option to purchase (if not already done), and an option to write a review. This can be used to display the details of the currently running app or another app that you wish to advertise to the user. Currently, these app stores are supported: iTunes App Store, Google Play, and Amazon App Store. If you pass in "appStore", the iTunes App Store requires the iOSAppId to be set in the options table. "requestAppPermission" — Displays a popup window for requesting an app permission. "activity" — This setting pertains to the Activity plugin. "social" — This setting pertains to the Social plugin. "addressbook" — This setting pertains to the Address Book plugin. "quickLook" — This setting pertains to the Quick Look plugin.

The most of those strings are for send something (via mail or sms).

Im trying do something like this: (Its only an example i recorded on my phone :D  :P ):

GIF;

http://imgur.com/a/1t1M4

(link to video if dont like .gif)

View My Video

Thanks

There are two ways to do this. One way, in particular if you’re using the Composer scene manager, is to use it’s support of Overlays. Or you can create your own object using display.newGroup() and add your own text/graphics and insert them in the group. You would have to build buttons etc.

The native.showPopup() is designed to show certain native dialog boxes that you can’t do on your own using Corona.

Rob

This line is wrong:

display.newImageRect( "cards/archers.png", 50, 50, onPress=Archercall )

You could do this:

local function Archercall( self, event ) composer.gotoScene( "Archer" ) end local archers = display.newImageRect( "cards/archers.png", 50, 50 ) archers.tap = Archercall archers:addEventListener( "tap" )

Worked! Thanks

I have more questions but its embarassing to me open more threads  :unsure:  :unsure:

I dont use LUA like 9-10 years, since World of Warcraft scripts IA (AI) changed to C++, so im having some troubles on coding again with LUA   :lol:  :lol: but stills funny as i remember. 

Thanks again.

PD: Pop-up method is not possible?

@yusaney,

You’re welcome.  

Don’t be embarrassed.  It is actually better to open discrete posts for new topics (i.e. one topic per post).  This is better for all involved.

Just be sure to put some time into the question showing

  1. what you did,
  2. what you expected, and
  3. what you saw.

That will make it easier for me (and others) to help you.  Your post above was pretty good, so just keep it up.

Thanks,

Ed

Thanks for your answers,

I was looking on the forums, on external pages, overflow and more pages but i cant find what i am looking for:

on corona docs found this: https://docs.coronalabs.com/api/library/native/showPopup.html

the strings list i dont see what im looking for, example (when open popup, add image, or text on this popup)

"mail" — Displays a popup window for composing an email. "sms" — Displays a popup window for composing an SMS message. "appStore" — Displays a popup window from the app store that the application was downloaded from. It will display the app's details such as the summary, an option to purchase (if not already done), and an option to write a review. This can be used to display the details of the currently running app or another app that you wish to advertise to the user. Currently, these app stores are supported: iTunes App Store, Google Play, and Amazon App Store. If you pass in "appStore", the iTunes App Store requires the iOSAppId to be set in the options table. "requestAppPermission" — Displays a popup window for requesting an app permission. "activity" — This setting pertains to the Activity plugin. "social" — This setting pertains to the Social plugin. "addressbook" — This setting pertains to the Address Book plugin. "quickLook" — This setting pertains to the Quick Look plugin.

The most of those strings are for send something (via mail or sms).

Im trying do something like this: (Its only an example i recorded on my phone :D  :P ):

GIF;

http://imgur.com/a/1t1M4

(link to video if dont like .gif)

View My Video

Thanks

There are two ways to do this. One way, in particular if you’re using the Composer scene manager, is to use it’s support of Overlays. Or you can create your own object using display.newGroup() and add your own text/graphics and insert them in the group. You would have to build buttons etc.

The native.showPopup() is designed to show certain native dialog boxes that you can’t do on your own using Corona.

Rob