1

以下のコードを使用して、ファイルから変数をループ取得していxmlます。私のxmlファイルには画像パス(http://www.mydomain.com/images/image.jpg)が含まれていますが、幅と高さが少し大きいです。

currentLoaderを設定しているとき.widthに、親指が表示されなくなります。.height

私はとを試しましたが、私の親指はすべて同じでは.scaleYありません。.scaleXwidthheight

誰かが私がこれを解決するのを手伝ってくれる可能性はありますか?

private function xmlLoaded(evt:Event):void
{

var currentPosY:Number = 0;
imagesXML = new XML(evt.target.data);
for (var i:uint = 0; i < imagesXML.article.length(); i++)
{

listItem=new itemList();
listItem.x = 25;
listItem.y = currentPosY;
listItem.num=i;
listContainer.loaderMc.addChild(listItem);
currentPosY +=  125;
trace(imagesXML.article[i].photo.toString());
listItem.labelTxt.text = imagesXML.article[i].name.toString();
loadThumbsFromXml(listItem,imagesXML.article[i].photo.toString());
listItem.buttonMode=true;
listItem.mouseChildren=false;
listItem.addEventListener(MouseEvent.CLICK,openPreview);

}

boundsScroll = new flash.geom.Rectangle(480,0,0,455);
setScroll();

}


private function loadThumbsFromXml(target:MovieClip,path:String)
 {          
var currentLoader:Loader=new Loader();
currentLoader.load(new URLRequest(path));           
//currentLoader.width = 115;
//currentLoader.height = 95;
target.thumbLoader.addChild(currentLoader);

}
4

1 に答える 1