Functions / opacity
opacity(x)
opacity( )
opacity(float x)

opacity( )
return: value of object opacity
Code
<script type="text/javascript">	
	function start_1(idCanvas)	
	{	
		alert(jc('#myCircle_1').opacity());
	}
	function stop_1(idCanvas)
	{
		var opacity=Math.random();
		jc('#myCircle_1')
			.opacity(opacity);
	}	
	function onload_1(idCanvas)
	{
		jc.start(idCanvas,true);
		jc.circle(125,120,50,'#ff0000',true);
		jc.circle(100,120,50,true)
			.opacity(0.2)
			.id('myCircle_1');
	}
</script>
<canvas id="canvas_1" width="250px" height="265px"></canvas>
View
opacity(float x)
return: object
Code
<script type="text/javascript">	
	function onload_2(idCanvas)
	{
		jc.start(idCanvas,true);
		var x=40;
		var y=40;
		for(var i=0;i<=1;i+=0.1)
		{
			if(i>0.5)
			{
				y=60;
				x-=(1-i)*100;
			}
			else x+=i*100;
			jc.circle(x,y,40,'#ff0000',true)
				.opacity(i)
				.id('myCircle_2');
		}
	}
	function start_2(idCanvas)	
	{	
		onload_2(idCanvas);
	}
	function stop_2(idCanvas)
	{
		jc.clear(idCanvas);
	}	
</script>
<canvas id="canvas_2" width="250px" height="265px"></canvas>
View