CodeThatScroller User Guide 

The following "10 steps" instruction will guide you step by step through the CodeThatScroller configuration process.

  Download package with CodeThatScroller script and unarchive it.

For free version (STD) download use this link.

If you'd like to buy full version (PRO) use this link.

Please bear in mind that CodeThat scripts come in two editions STANDARD and PRO. Editions differ by the features set and license type.

Standard version is given for free and comes with the inscription representing our company's name. Upon registration you will get rid of that text.

 Read Standard vs PRO to know the differences between CodeThatScroller Standard and PRO.

  Create the basic HTML file.

Your file may look as following:

<HTML>
<HEAD>
<link href="common.css" rel="stylesheet" type="text/css">
<script language="javascript1.2" src="codethatsdk.js"></script>
<script language="javascript1.2" src="codethatscrollerstd.js"></script>
</HEAD>
<BODY>
<p>&nbsp;HELLO WORD!
</BODY>
</HTML>

  Now lets create your first CodeThatScroller.

For this purpose you can both create separate config *.js file or write the config construction right to your *.html file. Here we will view second variant.

To describe new scroller create an object with following structure:

var ScrollerDef = {
        "mode" : "",
	"style" : {},
	"position" : {},
	"scroll" : {},
   	"itemstyle" : {},
        "effect" : "",
        "preload" : boolean,
	"preload_num" :Int,
	"items" : [ ]
}; 

  Now we describe scroller style, position and configuration properties:

var DemoDef = {
	"style": {
		"width": 300,
		"height": 230,
		"bgimg":"img/bg3.gif",
		"view": { "width": 225, "height":150, 
                          "offset": { "x":38, "y":20 } 
                        }
	},

	"position": { "absolute":false, "x":0, "y":0 },

	"scroll": {
		"type":"auto",
		"step":5,
		"timer":30,
		"dir":"e",
		"pause":1500,
		"cycle":true,
		"ctrlstyle": { "width":70, "height":30, 
                               "align":"center" 
                             },
		"ctrlpos": { "x":10, "y":180 },
		"control": [
			{ "type":"button", "act":"stop", "text":"[ Stop ]" },
			{ "type":"button", "act":"pause", "text":"[Pause]" },
			{ "type":"button", "act":"start", "text":"[Start]" },
			{ "type":"button", "act":"rew", "text":"[ Rew ]" }
		]
	}
};

Hint - if parameters description isn't clearly understanding please have a look to CodeThat Scroller User Manual

  To add new object to the scroller use the following structure:

"items": 
[
	{
	"type":"",                              
	"src":"",   
	"style": {},                                                                                     
	"comment":"",         
	"act": {}, 
	"effect":""
	}
]          

For our example items's definition looks like this:

"items": 
[
	{
		"type":"HTML",
		"src":"<p>Scrolling type is AUTO",
		"style": {
			"bgcolor":"#EEEEEE",
			"color":"#696969"
                    	 }
	},
	{
		"type":"IMG",
		"src":"img/frog.gif",
                "effect":"revealTrans(duration=3, transition=23)"
	},
	{
		"type":"IMG",
		"src":"img/lake.gif"
	}
]

  Now lets try to open our HTML file in the browser:

CodeThatScroller

 

Lets describe scroller mode and scroller objects' effects:

var DemoDef = {
        "mode" : "slide",

	"itemeffect":"revealTrans(duration=1, transition=23)",

	"items": [
		{
			"type":"IMG",
			"src":"img/frog.gif",
	                "effect":"revealTrans(duration=3, transition=23)"
		}
	]
};

  So... a complete code for this example you can see here:

var DemoDef = {
        "mode" : "slide",
	"style": {
		"width": 300,
		"height": 230,
		"bgimg":"img/bg3.gif",
		"view": { "width": 225, "height":150, 
                          "offset": { "x":38, "y":20 } 
                        }
	},

	"itemeffect":"revealTrans(duration=1, transition=23)",

	"position": { "absolute":false, "x":0, "y":0 },
	"scroll": {
		"type":"auto",
		"step":5,
		"timer":30,
		"dir":"e",
		"pause":1500,
		"cycle":true,
		"ctrlstyle": { "width":70, "height":30, "align":"center" },
		"ctrlpos": { "x":10, "y":180 },
		"control": [
			{ "type":"button", "act":"stop", "text":"[ Stop ]" },
			{ "type":"button", "act":"pause", "text":"[Pause]" },
			{ "type":"button", "act":"start", "text":"[Start]" },
			{ "type":"button", "act":"rew", "text":"[ Rew ]" }
		]
	},
	"items": [
		{
			"type":"HTML",
			"src":"<p>Scrolling type is AUTO",
			"style": {
				"bgcolor":"#EEEEEE",
				"color":"#696969"
			}
		},
		{
			"type":"IMG",
			"src":"img/frog.gif",
	                "effect":"revealTrans(duration=3, transition=23)"
		},
		{
			"type":"IMG",
			"src":"img/lake.gif"
		}
	]
};

  If you prefer to keep the scroller at the separate file you should paste scroller definition to *.js file. Your *.html file will look like the:

<HEAD>
<link href="common_codethat.css" rel="stylesheet" type="text/css">

<script language="javascript1.2" src="codethatsdk.js"></script>
<script language="javascript1.2" src="codethatscrollerstd.js"></script>
<script language="javascript1.2" src="effect_ex.js"></script>
<script language="javascript1.2">
<!--

var demo = new CScroller(DemoDef, 'demo');

//-->
</script>

</head>
<body>                

<script>demo.create();
demo.run();
</script>

</body>

Hint - for using CodeThat Scripts you aren't limited only by html files. For example, you can build it in the *.php files. We've made it at this site :)

  Congratulations! You have just created your first CodeThatScroller enhanced web page.

To make your life easier we do plan to supply you with on and off line scroller builders in the nearest time.

Try an Example >>