TinyCatalog(int ID, string name);
Tells the function which publication to display in the tinymag component
var mag = new TinyCatalog(ID, "demo publication");
Parameters:
{Integer} ID
Type numeric Identifier of the publication.
{String} Name
A unique idenifier if more than one tinymag needs to go on the same page
setBackgroundColor(string color)
Sets the background color of the component
mag.setBackgroundColor("#ffffff");
Parameters:
{String} color
Sets the background color to display in the component
setLaunchURL(string url)
Sets a different URL to open instead of the publication once the reader has clicked the component.
mag.setLaunchURL("http://www.domain.com");
Parameters:
{String} URL
The designated URL to direct the user to once they have clicked the component
setPages(int pages)
Select how many pages to display while flipping through the tiny magazine.
mag.setPages(5);
Parameters:
{Integer} pages
The number of pages to display in the component
setTarget(string target)
Sets the target frame or window to load the URL
mag.setTarget("_top");
Parameters:
{String} target
The ID of the publication to close.
setSize(int width, int height)
Sets the size of the component on the page in pixels
mag.setSize(300,200);
Parameters:
{Integer} width
The width of the displayed area in pixels.
{Integer} height
The height of the displayed area in pixels.
setEmbedSize(int width, int height)
Sets the size of the embedded flash object in HTML
mag.setEmbedSize(300,200);
Parameters:
{Integer} width
The width of the displayed area in pixels.
{Integer} height
The height of the displayed area in pixels.
setAlwaysOpened(string alwaysOpened)
Sets the publication to shift the cover page to the left hand side thereby creating a double page spread
mag.setAlwaysOpened("true");
Parameters:
{string} alwaysOpened
Either "True" or "False"
setWmode(string wmode)
Sets the wmode setting of the flash component on the page for transparency purposes
See http://kb2.adobe.com/cps/142/tn_14201.html
mag.setWmode("opaque");
Parameters:
{string} wmode
Either "Transparent" or "Opaque"
useAlternateIDAlgorithm(boolean bool)
Use a different algorithm for assigning ID's to container elements. May be required in Microsoft CMS.
Use of this method requires a container element, with the ID of the container element being provided as a parameter to the draw() method
mag.useAlternateIDAlgorithm(true);
Parameters:
{Boolean} bool
Either True or False
draw()
Draws the tinymag component on the page
mag.draw();
Example Code
<head> <title>TinyMag Demo</title> <script type="text/javascript" src="http://viewer.zmags.com/js/tinyCatalog.js"></script> </head> <body> <script> var mag = new TinyCatalog(341807, "demo"); mag.setSize(200, 150); mag.draw(); </script> </body>