I'm no expert, but I believe you will need to set a variable in your cfc
equal to the recordcount and then reference it that way. so something
like
In your cfc:
<cfset WhichPic= serviceAddress.Recordcount>
Please, anyone feel free to correct me if I'm wrong.
Candace K. Cottrell, Web Developer
The Children's Medical Center
One Children's Plaza
Dayton, OH 45404
937-641-4293
http://www.childrensdayton.org
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 3/28/2003 1:36:19 PM >>>
I just started messing with the flash remoting photo gallery example.
Im a little confused about action script. How do I tell it the
recordcount of the query to dynamically set the amount of images in
the
photogalley?
Here is the action script provided by the example. I'd like to
replace
the 5 where it says "if (whichPic<5)" with the recordcount from my
query. Any suggestions?
Emmet
// load NetServices lib
#include "NetServices.as"
#include "NetDebug.as"
// initialize variables and properties
whichPic = 1;
bload = true;
// upon clicking 'next', increment pic and set bLoad
next.onPress = function() {
if (whichPic<5) {
bLoad = true;
whichpic++;
}
}
// upon clicking 'prev', decrement pic and set bLoad
back.onPress = function() {
if (whichPic>1) {
bLoad = true;
whichpic--;
}
};
_root.onEnterFrame = function() {
if (bLoad) {
input = whichPic;
// make call to CF method, passing it dynamically
generated image number
directoryService.getSlide(whichPic);
bLoad = false;
}
};
// --------------------------------------------------
// Handlers for data coming in from server
// --------------------------------------------------
function getSlide_Result(resultRecordset) {
// pass "slidePath" variable returned by CF to loadMovie
function
loadMovie(resultRecordSet.slidePath, "square");
descriptionField = resultRecordSet.description;
// interface.text = resultRecordSet.description;
bLoaded = true;
}
// --------------------------------------------------
// Start up the application
// --------------------------------------------------
if (inited == null) {
// do this code only once
inited = true;
// set the default gateway URL (for use in authoring)
NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/ga
teway");
// connect to the gateway
gateway_conn = NetServices.createGatewayConnection();
// get a reference to the service
var serviceAddress = "users.frontiertown";
directoryService = gateway_conn.getService(serviceAddress,
this);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4