hi guys
I'm trying to loader pdf file using XML to retrieve the URL and I have
CombBox to list all the files ,and I need to load another file every time I
change the silder for the CombBox
the problem is the pdf file load only first time and dosent change if I
select another one from the list, I dont know what the the probelm I tried
manything like removeChild and I tried to use container but no change, only
first time the file load
this is Adobe air application
this is the code
cb_list.addEventListener(SliderEvent.CHANGE,changehandler);
function changehandler(e:Event):void {
var sort1:String=cb_list.value;
var id:String = myXML.tip.(title == sort1)[email protected]();
//trace(id)
var slectedtip = myXML.tip.(title == sort1).fulltip.text();
tit_label.text=myXML.tip.(@ID == id).title .text();
date_label.text=myXML.tip.(@ID == id).date.text();
full_tip.text=myXML.tip.(@ID == id).fulltip.text();
var flashfileURL = myXML.tip.(@ID == id).picURL.text();
swfURL.text=flashfileURL;
var url:String = new String();
url= myXML.tip.(@ID == id).picURL.text().toXMLString();
var requestpdf:URLRequest=new URLRequest(url);
var container:Sprite = new Sprite();
var pdf = new HTMLLoader();
pdf.height=stage.stageHeight-150;
pdf.width=stage.stageWidth-270;
pdf.y=100;
pdf.x=260;
pdf.load(requestpdf);
pdf.addEventListener(Event.COMPLETE, completeHandler);
function completeHandler(event:Event):void {
addChild(pdf);
}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders