2017-02-15 73 views
0

我有一個字符串全網絡鏈接的圖像(23個鏈接):具有多行網頁鏈接圖像的字符串。如何顯示它們?

listItem.text = String(item.movieimage); 

如果我做跟蹤(字符串(item.movi​​eimage));輸出是:

http://www.thewebsite.nc/Content/images/AFFICHES/xxx_3.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/vaiana.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/tous_scene.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/fits.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/boyfriend.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/sahara2017.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/resident_evil_final.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/raid_dingue.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/passengers2017.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/lego_batman.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/grande_muraille.jpg 
http://www.thewebsite.nc/Content/images/AFFICHES/fille_brest.jpg 

知道,我的舞臺上有9個UILoader。

所以我想這樣做

uiloader1.source = item.movieimage[1]; 
uiloader2.source = item.movieimage[2]; 
uiloader3.source = item.movieimage[3]; 

...等...

我怎麼能這樣做?

感謝

+0

分開你有這樣的「網絡鏈接圖像」的一個例子嗎?谷歌搜索結果的[**首頁**](https://www.google.co.uk/search?q=as3+load+image)有什麼問題?手冊的[**示例**](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Loader.html#contentLoaderInfo)有什麼問題?...您需要**顯示你已經嘗試過的代碼**,所以我們可以幫你修復它。否則,通過網絡搜索在線查找教程。 –

+0

我編輯了我的帖子,更多解釋。你說得對,它不是很清楚。對不起。 – Steph

回答

0

假設他們被縮進

//Put all the links in an array 
var myItems:Array = listItem_txt.text.split("\n"); 

//You say you only have nine, so only iterate until the 9th 
for (var i:int = 0; i < 9; i++) 
{ 
    //Also assuming your "uiloader" is a custom class you made with a .source property 
    this.getChildByName("uiloader" + i).source = myItems[i]; 
} 
相關問題