[]Sprite.loadImage();问题

Sprite.loadImage();后  通过 Sprite.clear()方法清空不了绘制命令,  还是显示loadImage时的图片,还有什么方法可以清空加载的资源?
已邀请:

Monica - 知识达人

赞同来自:

应该是sp.graphics.clear();

laya21126

赞同来自:

        /**
         * 初始化 地图
         */
        public function initMap(texture:Texture, bgID:int):void{
            if(this.oldBgID != bgID){
                oldBgID = bgID;
                if(oldTexture){
                    oldTexture.destroy(true);
                    oldTexture = null;
                }
                oldTexture = texture;
            }
            
            if(texture){
                this.mapImg.source = texture;
                this.width = texture.width;
                this.height = texture.height;
                this.pos((Laya.stage.width - this.width)/2, (Laya.stage.height - this.height)/2);
            }
        }

要回复问题请先

商务合作
商务合作