Corona Comics refresh

Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0

The Corona Comics Reader code has been a bit neglected lately and needed a little freshening up—some re-factoring there, a sample project there. It also needed to get out and meet more people, especially all the newer Corona users who might have missed its initial unveiling. So what’s new in this Corona Comics refresh?

  • The core Reader framework code has been re-factored into an external Lua file (Reader.lua)
  • The coordinate data has also been re-factored into an external file (coordinates.lua).
  • Added an option to save last page viewed on app exit and reload that page on next start.
  • Swipe to change pages (forward or backward) instead of tapping to view the next page.
  • New documentation to explain these changes.

For example, below is an example main.lua for a comic app using the re-factored framework and coordinate data files:

[cc lang=”lua”]
— main.lua
local reader = require (“Reader”)
local data = require (“coordinates”)
reader:initialize( “Page”, data)
Runtime:addEventListener( “orientation”, reader )
display.setStatusBar( display.HiddenStatusBar)

The coordinates.lua file declares and returns the panel coordinates for each page in your comic:

[cc lang=”lua”]
local data = {
[0] = {
{ 145, 19, 614, 301},
{ 210, 311, 451, 524},
[1] = {
{ 0, 0, 494, 210},
{ 368, 185, 400, 156},
{ 368, 369, 386, 208},
{ 0, 432, 506, 288},
{ 224, 730, 538, 276},
[2] = {
{ 0, 0, 538, 288},
{ 515, 0, 253, 288},
{ 9, 298, 395, 318},
{ 405, 298, 355, 293},
return data

For more information, and to download updated documentation and completed sample comic, visit the Corona Comics page.

Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0

This entry has 2 replies

  1. Ian Chia says:

    I’m an active member of the @momswithapps developers group. There are a *lot* of #bookapp developers there, and we’ve been keeping an eye on Corona. Since the NOOKcolor launch recently where B&N publicly stated in the room that Corona content “should” work on the NOOKcolor – there’s been a bunch of MWA developers more interested in Corona as a possible rapid development IDE for content. This is a ping to say: if Ansca’s interested … we (MWA members collectively) and Ansca should talk.

    It’s interesting for us (MWA members) to note that Ted Patrick has moved from Adobe to be chief dev evangelist for the NOOKcolor platform. We’re interested in tools that make MVP strategies possible. Let’s take this conversation further.

    (Carlos: still interested in Corona as a viable “pro” solution rather than “prosumer”, but it’s not quite all there for me yet. Would love to chat re: roadmap etc.)


    – Ian