PDA

View Full Version : need input on multiple server hits


tg
05-01-2002, 04:31 PM
ok, all you php,asp,cfml and other server gurus can help. don't run off just cause im talkin cfml here.

i have a cfml page that is passed a number and goes and and embeds a flash file 30 (inside a loop) times into the page.
the flash file goes out to the server, grabs some data based on the team number/measure number. (teamnbr is passed to cfml, measure number is the index in the loop).
if no data is found in the flash call, the swf goes to the "nodatafound" frame. otherwise a graph is drawn.

here is the problem:
when i set the loop to say 5 (only 5 measures will show on the page) all the graphs a displayed perfectly. when i set it to 8 measures i get 7 out of the 8 graphs showing data and 1 showing data not found (this is usually the first graph not showing... data was shown for this graph when only 5 graphs were drawn). when i do 30 graphs all show up as data not found.

so i need suggestions/responses on why this may be giving me problems...

cold fusion 4.5
flash 5
sql server 7.0

//don't know specs on web server,

any response/help/suggestions would be greatly appreciated.

IFZen
05-06-2002, 08:27 PM
If you are using the loadVariable action, use the load event and indicates on your SWF if the data loading is complete or not.

May be you are launching too many requests. I had one day some troubles with multiple // loadings. Sometimes some requests were just lost in space.

I finally had to centralize the loading requests and to execute them one by one. Hope it won't be your case :(

Hope it helps,
BZen

tg
05-07-2002, 07:15 PM
ifzen,
thanks for the respsonse... i had just about given up on this post ever getting a response.
anyway.
i may have to do that, altho it is being loaded 1 at a time inside a loop on a cfml page.
i'm doing a little db optimization now to see if that will speed up the query/response time, and hopefully help me with my problem.
here is what my cfml looks like... any suggestions would be welcomed.


<cfinclude template="../Connections/connBST.cfm">
<cfparam name="mCount" default=30><!---number of measures to print --->
<cfparam name="mNbr" default=0>
<cfparam name="tNbr" default=#URLDecode(URL.tNbr)#>
<cfquery name="team" datasource=#MM_connBST_DSN# USERNAME=#MM_connBST_USERNAME# password=#MM_connBST_PASSWORD#>
SELECT team.team_name
FROM team
WHERE ((team.team_nbr)=#tNbr#);
</cfquery>
<HTML>
<HEAD>
<TITLE>Scorecard Trends for <cfoutput>#team.team_name#</cfoutput></TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" border=0 margin=0 topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<cfloop from="1" to=#mCount# index="i">
<cfoutput>
<cfif (i mod 2) is not 0>
<tr>
</cfif>
<td align=center width=50%>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=5,0,0,0"
WIDTH=400 HEIGHT=425>
<PARAM NAME=movie VALUE="l2g.swf#">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=##FFFFFF>
<EMBED src="l2g.swf#" quality=high bgcolor=##FFFFFF WIDTH=400 HEIGHT=425 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</td>
<cfif (i mod 2) is 0>
</tr>
</cfif>
</cfoutput>
</cfloop>
</table>
</BODY>
</HTML>


... hmmmm.... doesn't look like it pasted correctly... well, you get the general idea of whats going on... fo some reason my querystring parameters didn't paste correctly in the object tag, and i've got some extra # signs.

IFZen
05-07-2002, 08:56 PM
Well, well, well :confused:

I never used cold fusion so I can't really tell what's wrong. If I take account of your first message, I think you should pass your variables tNbr and i to your SWF file into your <OBJECT> and <EMBED> tags. That should be something like this :

"l2g.swf?tNbr=<cfoutput>#tNbr#</cfoutput>&i=<cfoutput>#i#</cfoutput>"

Not sure about the # syntax but I think that's the way. Like that you should publish all your 30 SWF with their own variables usable on the _root since the first frame.

Well, that's all I have to say about. Really hope it will give you good intuition. If not, keep us post, may be some coldfusioner will pass by there.

Wish you gook luck :cool:

IFZen

tg
05-08-2002, 03:25 PM
actually yes.(but cfml allows you to put your <cfoutput></cfoutput> tags way out... you can see them directly after the <cfloop>tag.
my embed/param tags actually look like:

"l2g.swf?tNbr=#tNbr#&i=#i#"

and yes, i know this doesn't look right, cause the #var# is 'inside' the string instead of concatenated to the string, but cfml works that way (took a while for me to get used to it).
the code i posted earlier, got garbled somehow inside of dreamweaver...
but like i said in the first post, the swfs are actually showing, sometimes with data, sometimes without... depends on how many loop iterations a run.

very frustrating... i don't think its to much server load either, the company i work for is pretty big, and i know they keep their servers up to par.