2011-08-29 32 views
0

目前,我的客戶要求我顯示彎曲的字體說謊藝術字,並使用此字體自定義一些文本字段。我們可以直接將藝術字加載到Fash Textfield中嗎?我們可以通過嵌入方式或任何技術(純粹與腳本)?as3的令人驚歎的字藝術風格

回答

0

不,在AS3中沒有這種東西。一個好的方法是創建一個文本字段並使用代碼在內部切換圖片

imgbtn1.onRelease = function() { 
infoField._visible = true; 
startLoading("picture1.jpg"); 
}; 
imgbtn2.onRelease = function() { 
infoField._visible = true; 
startLoading("picture2.jpg"); 
}; 
imgbtn3.onRelease = function() { 
infoField._visible = true; 
startLoading("picture3.jpg"); 
}; 
function startLoading(whichImage) { 
loadMovie(whichImage, "imageLoader"); 
_root.onEnterFrame = function() { 
infoLoaded = imageLoader.getBytesLoaded(); 
infoTotal = imageLoader.getBytesTotal(); 
percentage = Math.floor(infoLoaded/infoTotal*100); 
infoField.text = percentage+"%"; 
if (percentage>=100) { 
delete this.onEnterFrame; 
infoField._visible = false; 
} 
}; 
} 
+0

嗨,感謝您的回覆......但是您可以簡單解釋一下。 as3編碼???? ...我怎樣才能動態地將文字藝術應用於文字??? ......在此先感謝。 –