Jump to content

Recommended Posts

Hello all! I have a nifty little fusion chart.

 


<object id="Column2D" width="680" height="230" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param value="/modules/nutrition/Charts/Column2D.swf" name="movie"/>
<param value="&dataURL=/modules/team/average.php?league={$leagueid}" name="FlashVars"/>
<param value="high" name="quality"/>
<embed width="680" height="230" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="Column2D" quality="high" flashvars="&dataURL=/modules/team/average.php?league={$leagueid}" src="/modules/nutrition/Charts/Column2D.swf"/>
</object>

 

that is running off of this xml file

 


<? 
header ("content-type: text/xml");

echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";

include "../../includes/config.php";

include "../../classes/sql_class.php";

$sql = new sql();

$sql->connect();

$league=$_REQUEST['league'];

$label_num=date('t');

for($i=1,$j=0;$i<=$label_num;$i++){

	$time=time();		
	$year=date("Y",$time);
	$month=date("m",$time);
	if (strlen($i)==1){
		$day="0".$i;
		}else{
			$day=$i;
			}//end if

	$res3=$sql->query("SELECT * FROM teams WHERE `leagueid`='$league'");
		while($row3=$sql->getarray($res3)){

	$res2=$sql->query("SELECT * FROM users WHERE `teamid`='{$row3[0]}'");
		while($row2=$sql->getarray($res2)){

	$res=$sql->query("SELECT * FROM nutrition_steps WHERE `username`='{$row2[1]}' && `dateposted` LIKE '$year/$month/$day'");
		while($row=$sql->getarray($res)){

			$me[$i]+=$row[2];

			$j++;

			}//end while

			}//end while

			}//end while	

		$you[$i]=($me[$i]/$j);

	}//end for			


?>
<chart caption='Steps This Month' xAxisName='Day' yAxisName='Steps' showValues='0' connectNullData='1' labelDisplay='stagger'>

<?php
		for($i=1;$i<=$label_num;$i++){
	?>

	<set label='<?=$i;?>' value='<?=$you[$i];?>' />

<?php
	}//end for
?>
   
   <trendLines>
      <line startValue='300000' color='009933' displayvalue='Target' />
   </trendLines>

   <styles>

      <definition>
         <style name='CanvasAnim' type='animation' param='_xScale' start='0' duration='1' />
      </definition>

      <application>
         <apply toObject='Canvas' styles='CanvasAnim' />
      </application>   

   </styles>

</chart>

 

and my question is, (and may not even be relevant to the code above) is that the chart isnt interactive in any way so i really just need to load it and close the connection. Is this possible? I know the object is counting it as a movie, but it really doesn't need to be "transferring data from XXX.com" for 50 mins if the user is just looking at it.

 

Basically, is there a way to go get the xml data and close the transfer?

 

Thanks :) flash isn't my forte :D

Link to comment
https://forums.phpfreaks.com/topic/166975-close-connection/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.