In getPath function,i will recieve fontname parameter,using that first
i have to check whether fontname exists in assets folder or not.If
exists then i have to return fontnamepath as string.if not i have to
return another path as string.Here is my code..I dont know how to
return path in getPath function becoz with my code it will return
null,After that only it will go to load complete function.But what i
need is..after going 2 loadcomplete function only it should return
path..Can anyone plz tell me how 2 do this..

   public var languagecode:String;
         public var Defaultlanguagecode:String;
         [Bindable]public var urlpath:String = null;
         [Bindable]public var loadcomplete:Boolean = false;

    private function getPath(fontname:String):String{
         languagecode = "assets/"+fontname+"_en.swf";
         Defaultlanguagecode = "assets/"+fontname"+"_default.swf";
         var request:URLRequest = new URLRequest(languagecode);
         var xmlURLLoader:URLLoader = new URLLoader(request);
         xmlURLLoader.addEventListener(Event.COMPLETE,loadcompletefun);
         xmlURLLoader.addEventListener(IOErrorEvent.IO_ERROR,ioerrorFun);
         xmlURLLoader.load(request);
         return urlpath;
        }
    private function loadcompletefun(e:Event):void{
        loadcomplete = true;
        urlpath = languagecode;
    }

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to