Expand my Community achievements bar.

call a remote object in custom preloader class

Avatar

Level 1
Hi All,



I am new to flex. i am trying to call a remote object in

custom preloader class.. is it possible to call a "remote
object"

inside custom preloader class?. and is it compulsory to write
remoteobject inside <mx:Application> tag only?



can anyone explain me how to call remote object in custom

preloader class.



Here is my code



<mx:Application preloader="###.###.Preloader">



public class Preloader extends DownloadProgressBar

{

public function Preloader()

{

super();

init();

}



private function initVars():void {

myRemoteObject = new RemoteObject();

myRemoteObject.destination = "searchService";



myRemoteObject.addEventListener(ResultEvent.RESULT,
resultHandler);



myRemoteObject.addEventListener(FaultEvent.FAULT,
faultHandler);

myRemoteObject.getPreferences("123");

}



}



thanks

uday
0 Replies