creator load加载图片如何保存到内存中

如题,
我尝试使用
`
properties: {

    m_List:[cc.SpriteFrame]

},

start:function(){
window.SpriteFra = {};
SpriteFra.Sprites = null;
var url = ‘https://profile.csdnimg.cn/5/D/7/1_magic_code_’;
var self = this;
cc.loader.load(url,cc.SpriteFrame, function (err, t) {
let _sprite = new cc.SpriteFrame(t);
self.m_List = _sprite;
cc.log(self.m_List);
},this);
cc.log(this.m_List + ‘/////////////////////////’);
this.node.getComponent(cc.Sprite).spriteFrame = this.m_List;
}`
这段代码无法加载Sprite,但是如果把node.getCompon…放在load里面就可以进行读取,self.m_List同上,也是无效,请问各位大佬,我切换数据难道要每帧都去load?

cc.loader.load( 是异步 你放在 cc.loader.load( 里面

我是有很多图片 我是想在加载界面的时候先下载保存起来 进入游戏可以直接进行使用 请问大佬 这个应该怎么办呢
我把代码修改成这样
start: function () { this.loadSuccess = 1; var url = 'https://profile.csdnimg.cn/5/D/7/1_magic_code_'; var self = this; cc.loader.load(url, cc.SpriteFrame, function (err, t) { cc.log('4654564666666666666666666'); let _sprite = new cc.SpriteFrame(t); cc.log('4654564666666666666666666'); self.m_List = _sprite; cc.log('4654564666666666666666666'); self.loadSuccess = 2; cc.log('4654564666666666666666666'); }, this); }, update: function () { cc.log(this.loadSuccess); if (this.loadSuccess == 2) { this.node.getComponent(cc.Sprite).spriteFrame = this.m_List; } }
,虽然不出错,但是依然没有加载出来 = = 请问这个有办法解决没

好像要加.png后缀

cc.loader.load(url, cc.SpriteFrame, function (err, t) {
}
这里的t 已经是 spriteFrame了,不应该带上 cc.spriteFrame这个资源类型参数
let _sprite = new cc.SpriteFrame(texture);