XML/SWF Charts| SlickBoard| Timeline Eons(New)

 < previousnext > 

 

Web Page

 

The download package comes with the sample.html web page that displays a chart. This however can be any web page document. To display a chart in your own web page:

 

1. Copy this code highlighted in red and paste it in your web document before the <body> tag:

<HTML>

<script language="javascript">AC_FL_RunContent = 0;</script>
<script language="javascript"> DetectFlashVer = 0; </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
var requiredMajorVersion = 10;
var requiredMinorVersion = 0;
var requiredRevision = 45;
-->
</script>

<BODY bgcolor="#FFFFFF">


<P>This is my web page.</p>


</BODY>
</HTML>

This code initiates the Javascript that detects the user's flash version. It should be added to each web page that displays the tool.

If the AC_RunActiveContent.js file that comes with the download package is not in the same directory as your web page, its URL must contain the appropriate relative or absolute file path. Example: <script src="../javascript/AC_RunActiveContent.js" language="javascript"></script>.

 


2. Copy this code highlighted in red and paste it in your web document anywhere between the <body> tags:

<HTML>

<script language="javascript">AC_FL_RunContent = 0;</script>
<script language="javascript"> DetectFlashVer = 0; </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
var requiredMajorVersion = 10;
var requiredMinorVersion = 0;
var requiredRevision = 45;
-->
</script>

<BODY bgcolor="#FFFFFF">

<P>This is my web page, and here's my chart:</p>

<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
	alert("This page requires AC_RunActiveContent.js.");
} else {
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(hasRightVersion) { 
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2',
			'width', '400',
			'height', '250',
			'scale', 'noscale',
			'salign', 'TL',
			'bgcolor', '#777788',
			'wmode', 'opaque',
			'movie', 'charts',
			'src', 'charts',
			'FlashVars', 'library_path=charts_library&xml_source=sample.xml', 
			'id', 'my_chart',
			'name', 'my_chart',
			'menu', 'true',
			'allowFullScreen', 'true',
			'allowScriptAccess','sameDomain',
			'quality', 'high',
			'align', 'middle',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'play', 'true',
			'devicefont', 'false'
			); 
	} else { 
		var alternateContent = 'This content requires the Adobe Flash Player. '
		+ '<u><a href=http://www.macromedia.com/go/getflash/>Get Flash</a></u>.';
		document.write(alternateContent); 
	}
}
// -->
</script>
<noscript>
	<P>This content requires JavaScript.</P>
</noscript>


</BODY>
</HTML>

Place this code anywhere in your document. You may place it inside a <Table> cell or any other design element to control the chart's position and alignment in the web page (exactly like a JPEG image).

 


3. The download package comes with charts.swf, charts_library, and sample.xml. They are included and highlighted in red in the following code.

Notice that charts is in two different places (after movie and src), and that it does not have the .swf file extension. If charts.swf is not in the same directory as your web page file, these must contain the appropriate relative or absolute file path, without the file extension. Example:
'movie', '../graphics/charts',
'src', '../graphics/charts',

If charts_library and sample.xml are not in the same directory as your web page file, their URLs must also contain the appropriate relative or absolute file paths. Example:
'FlashVars', 'library_path=/libraries/charts_library&xml_source=/xml/sample.xml'

The sample.xml can be any XML source. It can either be a static text file with an .xml extension, or a script file that generates XML code dynamically (see Scripting). If you use an XML source name other than sample.xml, update the web page. Example:
'FlashVars', 'library_path=charts_library&xml_source=my_XML.xml'

<HTML>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script language="javascript"> DetectFlashVer = 0; </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
var requiredMajorVersion = 10;
var requiredMinorVersion = 0;
var requiredRevision = 45;
-->
</script>
<BODY bgcolor="#FFFFFF">

<P>This is my web page, and here's my chart:</p>

<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
	alert("This page requires AC_RunActiveContent.js.");
} else {
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(hasRightVersion) { 
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2',
			'width', '400',
			'height', '250',
			'scale', 'noscale',
			'salign', 'TL',
			'bgcolor', '#777788',
			'wmode', 'opaque',
			'movie', 'charts',
			'src', 'charts',
			'FlashVars', 'library_path=charts_library&xml_source=sample.xml', 
			'id', 'my_chart',
			'name', 'my_chart',
			'menu', 'true',
			'allowFullScreen', 'true',
			'allowScriptAccess','sameDomain',
			'quality', 'high',
			'align', 'middle',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'play', 'true',
			'devicefont', 'false'
			); 
	} else { 
		var alternateContent = 'This content requires the Adobe Flash Player. '
		+ '<u><a href=http://www.macromedia.com/go/getflash/>Get Flash</a></u>.';
		document.write(alternateContent); 
	}
}
// -->
</script>
<noscript>
	<P>This content requires JavaScript.</P>
</noscript>

</BODY>
</HTML>

 

 

 < previousnext > 


Copyright 2003-2014, maani.us