I have an application where I would like to take the basic adding thumbnail functionality and substitue loading the image reference location from my Dataset which is populated from a remoting call to a java application. The java application retrieves its data from a Db2 database and delievers it to the dataset in a rowset format.
I have been trying to substitue calling the dataset instead of an XML file, but no luck. Has anyone accomplished this action. outlined below is what I tried.
stop();
import mx.rpc.Responder;
import mx.remoting.Service;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;
import mx.remoting.RecordSet;
import mx.remoting.DataGlue;
import mx.styles.CSSStyleDeclaration;
//--------------< This is forms interactive basics for the frontpage search>----------\\
Search_btn.onRelease = function():Void {
getArtistPictures();
};
//--------------< \This is forms interactive basics for the frontpage search>----------\\
//--------------<Flash remoting>----------------\\
mx.remoting.debug.NetDebug.initialize(); // initialize the NetConnection Debugger
var myLogger:Log = new Log( Log.DEBUG, "logger" );
myLogger.onLog = function( message:String ):Void {
trace( "myLogger-->>>"+message );
}
//Create the service - Call to the J2EE server on this machine for frontpage search
artistThumbnails = new Service(
"http://localhost:8080/netinfo/gateway",
null,
"com.nm.dao.CatalogDAO",
null,
null);
function getArtistPictures():Void {
var pt_pc:PendingCall = artistThumbnails.getAllInfoByClub(435603);
pt_pc.responder = new RelayResponder(this, "ads_Result", "ads_Fault" );
trace("The get Ads method has request service from the server.");
};
//--------------<\Flash remoting>----------------\\
//------------------------<Scrolling Thumbnail functionality>-------------------\\
function ads_Result(re: ResultEvent):Void{
artistPicture_ds.dataProvider = re.result;
loadXML(loaded);
};
function loadXML(loaded) {
if (loaded) {
var thumbnails:Array = new Array();
for (var i:Number = 0; i < artistPicture_ds.length; i++) {
thumbnails[thumbnails.length]= new picture(remArray*);
thumbnails* = artistPicture_ds.items*.COVER_ART_PATH +"s.jpg";
trace(thumbnails*);
}
firstImage();
} else {
content = "file not loaded!";
}
};