2011-08-29 48 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编码???? ...我怎样才能动态地将文字艺术应用于文字??? ......在此先感谢。 –