Home / Uncategorized / Kwik4 template for comic

Kwik4 template for comic

Template Customization for Comic Reader

It is experimental how to customize the template files of Kwik4 for a comic reader.

David Fox at Electric Eggplant introduced Corona Comic SDK 2.0 in 2011. It is used in the Middle School Confidential Series

Here is the comic project I made up

unzip and run build4/main.lua with corona simulator


The actual page images are proprietary. Excerpted from Be Confident in Who You Are by Annie Fox, M.Ed., © 2008. Used with permission of Free Spirit Publishing Inc., Minneapolis, MN; 800-735-7323; www.freespirit.com. All rights reserved.

Images are from the app, “Middle School Confidential 1: Be Confident in Who You Are” from Electric Eggplant


Page 1

page1 consists of the following layers:

  • “Auto” layer is a button to start the transition of panels and frames
  • “Tap” layer is also a button to move forward the transition one by one immediately
  • “Whole image” button to show the whole page1 image
  • “-panels” is a layer group and panel coordinates are specified with each rectangle
  • “ballons” group has the ballon images with text
  • “background” is the art layer

if you want to set an animation to panel, panel’s name must follow the layer naming rule of Kwik. If you don’t use animation to panel or ballon, number digit is allowed

the layer group of “-panels” defines each panel. A panel can have two frames. the layer group of “ballon” defines each ballon.

Each ballon name must have substring of panel’s name or frame’s name. For instance, the panel name is “1”, the ballon name “1” is dispayed.

When a panel have the two frames “11” and “12”, the ballon “bl11” has “11” , so frame “11” with “bl11” are matched. “bl11” has the prefix “bl” for animation naming

the frame “12” and the ballon “12” are paired. the ballon “21-31” are displayed across the frame 21 and the frame 31

Button “Auto”


local panels = require(“components.”..UI.page..”.page_meta_panels”)
panels:start(1, false)

Button “Tap”


local panels = require(“components.”..UI.page..”.page_meta_panels”)
return true

Button “Whole Image”


local panels = require(“components.”..UI.page..”.page_meta_panels”)

panel “pn1” animation

ballon “bl11” animation

Modified Tmplt files

Modified template files are under components/pageXXX. Replace all the codes in layer_anim.lua with the codes in layer_anim_comic.lua .

  • layer_anim_comic.lua for layer_anim.lua
  • layer_image_set.lua for layer_image.lua
  • page_meta_comic.lua for layer_meta.lua
  • page_swipe_comic.lua for page_swipe.lua

  • Alternatively you can check out the comic branch from gitHub https://github.com/kwiksher/kwik4tmplt/tree/comic

  • page_meta_comic.lua

    • The default transition duration is 3 secounds at line 10(_Duration).
    • Your background image’s width and height must be set at line 11(_SheetWidth) and line 12(_SheetHeight)

  • page_swipe_comic.lua

    Your background image’s width and height must be set at line 12(bgW, bgH) devided by 4

Before publish, let preload disabled for page curl


Animation supported for panel and ballon but not supporte to frames

Supported * Linear * Rotation * Pulse * Bounce * Blink *Shake are supported

Not supported * Path * Switch * Filer animation

Please check on child component enabled from Setting > Genaral in order to set an animation to a panel or a ballon.


thank you for using Kwik


Leave a Reply

Your email address will not be published. Required fields are marked *