egretEui基础-图片加载与更改纹理
class ball extends eui.Component implements eui.UIComponent {
//按钮
public btn_start:eui.Button;
//足球图片
public img_ball:eui.Image;
public constructor() {
super();
this.skinName = “resource/gameSkins/ball.exml”;
}
protected partAdded(partName:string,instance:any):void
{
super.partAdded(partName,instance);
}
protected childrenCreated():void
{
super.childrenCreated();
this.startLoad();
}
private startLoad(){
//ImageLoader用于加载图片(jpg,png,gif),通过load()方法来启动加载,被加载的图片对象存储在ImageLoader.data属性上
var loader:egret.ImageLoader = new egret.ImageLoader();
//图片加载完成调用this.loadComplate函数
loader.addEventListener(egret.Event.COMPLETE,this.loadComplate,this)
//想要加载的图片地址
var url:string = ‘resource/assets/ballImgs.png’
//放入加载函数
loader.load(url)
}
private loadComplate() {
console.log(‘预加载图片完成’)
this.btn_start.addEventListener(egret.TouchEvent.TOUCH_TAP,
this.onButtonClick,this);
}
//点击按钮,图片更改纹理
private onButtonClick(e:egret.TouchEvent){
//更改eui的source属性
this.img_ball.source = ‘resource/assets/ballImgs.png’
}
}
Jizz movie xxxEscorts in stevenageNude amanda beard picturesBusty models 2007 torrentBodyslide adult videosSexy thong swimwear customersX-men sex comic wolverine cyclopsCheerleader spankHentai bonerPussy appreciation xnxx Booty
tits ass pussy grinding lesbiansDaddy fucking daughter free videos-xxx pornoVintage lace shawlGabrielle anwar nude scenesRate gay porn web sitesLil-girls swallow cumPsycology men threesomesVintage video wagon trainCarina
a tau nude https://mob.indoxvideos.com/ Man max penis erection pillsSmall dick niggersHand saw
pussyFan of sex and the cityCock guy picWeb
based erotica fictionBbw big tits solo xnxx The cobb family comic stripSwallow jizz
thumbHandball sexTips on looking sexyJapanese upload pornStrip
clubs in russiaMeet madden’s pussy picsHentai windowgirlIs a duck’s ass water tightActor chris graham erotic seductions