INSTALLATION
This is a flash object that can be embedded into a an HTML, php or asp page. The application is scalable. You can specify any size in html document the application will scale without any distortion.
To add it to your page:
Add this:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" width="100%" height="100%" hspace="0" vspace="0" title="datagraph">
<param name="movie" value="datagraph.swf" />
<param name="FlashVars" value="cfile=f1/countries.xml&headerText=Header text from html&selection1=1Adelaide1&selection2=Improving wellbeing&selection3=Low birth weight">
<param name="quality" value="high" />
<embed src="datagraph.swf" width="100%" height="100%" FlashVars="cfile=f1/countries.xml&headerText=Header text from html&selection1=1Adelaide1&selection2=Improving wellbeing&selection3=Low birth weight"hspace="0" vspace="0" quality="high" pluginspage=" type="application/x-shockwave-flash"</embed>
</object>
Inside <body</body> tag where you want to put the swf on the page .
Where:
FlashVars: this is to send file address of the countries.xml file relative to html file. Use FlashVars" value="cfile=f1/countries.xml” if the countries file for this swf file is in ‘f1’ folder.
headerText=Header text from html this is the text displayed as the header in the flash file.
selection1=1Adelaide1&selection2=Improving wellbeing&selection3=Low birth weightthis sets the combo(drop down) boxes to these selections. The names should exactly match the names in the combo (drop down) boxes
width: Width of the swf file(any sizein pixels) or in percent(100%).
height: Height of the swf file(any size in pixels) or in percent(100%).
Src=”datagraph.swf”: Name of the flash (Swf) file.
About size of application in the document.
Auto Size:
Width= 100%. and Height = 100%. Means the application will scale to 100 percent of the container it. Resizing the container will resize the application automatically.
Fixed Size:
Width = 600px,Height=300px. Would mean the application will have this fixed size and will not resize with the size of its container.
Note- Width = 600px,Height=300px is the default size of the applicationbut you can put any size preferably in this ratio only 600:300 (2:1);
About using one or more application instances on one page
To use three instances on one html page that take data from their own xml files:
- Put the xml files in separate folders.Eg f1, f2 and f3 are three folders that will contain all folders with xml files.
- Put the swf file in the same folder as html file. Put the three folders in the same folder as the html file.
Now for each instance of main swf file in the html page change the value of FlashVars" value="cfile=f1/countries.xml” in both places(see green color text in To add it to your page: section )to give the location of the ‘countries.xml’ file relative to html file. Eg in this case :
FlashVars" value="cfile=f1/countries.xml” for first instance
FlashVars" value="cfile=f2/countries.xml” for second instance
FlashVars" value="cfile=f3/countries.xml” for third instance
And edit the countries.xml files to target the other sub folders having xml files.
File placement on the server
For single instance in html page:
1.Graph folder will contain: ‘main.html’ ‘datagraph.swf’, ‘countries.xml’, and folders ’australia’,’newsouthwhales’…….. for countries according to the their name as in ‘countries.xml’ file.
2. Create a subfolder in this folder named’files’ and place the pixel.php in it.
For multiple instances in a single html page:
1.Graph folder will contain: ‘main.html’ ‘datagraph.swf’. single file will be used for each instance but different address for ‘countries.xml’ file will be passed from the code that embeds each instance (see About using one or more application instances on one page ----FlashVars" value="cfile=f1/countries.xml” ).
2.Create subfolders for xml files for each instance ( for example f1,f2,f3 ) and put ‘countries.xml’, folders ’australia’,’newsouthwhales’…….. for countries according to the their name as in ‘countries.xml’ file.