[eluser]PaddyX[/eluser]
OK, making solid progress. I have the chart files in an assets/charts directory.
I had to make some tweaks to the Javascript script to point to the location of the src file, the library and the data. The changes I made are flagged.
Code:
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',
'width', '400',
'height', '250',
'scale', 'noscale',
'salign', 'TL',
'bgcolor', '#777788',
'wmode', 'opaque',
'movie', 'charts',
**'src', '<?php echo base_url(); ?>assets/charts/charts',
**'FlashVars', 'library_path=<?php echo base_url(); ?>assets/charts/charts_library&xml;_source=<?php echo base_url(); ?>assets/charts/data/data.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'
);
This script is currently sitting in the view. The next step is to move it into a javascript file or a helper and generate it from the controller. Suggestions as to the best way to do that anyone?
The data.xml file is generated by the following controller function:
Code:
function data() {
$data = '<chart><chart_type>pie</chart_type></chart>';
write_file('./assets/charts/data/data.xml', $data)) ;
}
This is a test function but it should be pretty easy to generate the rest of the XML using database queries.
I hope this helps somebody. Any comments or suggestions would be appreciated.