URL parameters for My Coloring Book

You can pass parameters to My Coloring Book through the URL.

These can either be passed to the HTML Wrapper (mcb.html) or directly to the Flash file (mcb.swf). 

For the HTML Wrapper, the parameters come after a hash (#) and are separated by ampersands (&).

E.g. mcb.html#b=book1.xml&p=monkey.gif

For the Flash file, the parameters are included as part of the url, after a question mark (?) and separated by ampersands (&).

E.g. src="/mcb.swf?b=book1.xml&p=monkey.gif"


Here is a complete list of available parameters...


Page: The name of the .gif file for the coloring page.

E.g. p=monkey.gif


Overlay: The name of the OPTIONAL overlay file to use.

E.g. o=logo.png


Book: The current book file (or script1).

E.g. b=book1.xml


The tool to select2 (normally set in config.xml initially).

Can be one of "brush", "mbrush", "fill", "wash".


The color to select2 (normally set in config.xml initially).

An RGB color value.  E.g. For red the value would be 0xFF0000


Base Directory: The directory where My Coloring Book should look for files3.
(default = directory of current file / script)

E.g. base=../mcb


Alternate Config: An alternate directory for configuration files4 (relative to the base).

E.g. cfg=alt-config


  1. You can use a script (such as PHP) to generate your coloring book files.  This can be useful if you want to dynamically create the coloring book file, such as from a database, or to produce a random selection each time the user changes pages.
    If your script requires it's own parameters then you should URL-encode special characters, such as "?", "&", "=", "/", etc.  In PHP you would do this with the urlencode() function.
    For example if your script with parameters is "book.php?mode=rand&sub=xmas/all" then you would pass this as...
  2. Tool and Color are usually set in the config.xml file, but are also passed as part of the reloadUrl to allow the current tool and color to be kept when changing pages in reload mode.
  3. My Coloring Book looks for its coloring pages, configuration etc, relative to the base directory, which by default is the current directory.  You can change this using the Base Directory parameter.
  4. See the Alternate config files article.