Home > other >  Use the correct addImageAsync http://localhost:63343/hello/http://www.co...
Use the correct addImageAsync http://localhost:63343/hello/http://www.co...

Time:09-23


Var url="http://www.cocos2d-x.org/images/logo.png";
Cc. TextureCache. AddImageAsync (url, enclosing texFirstLoaded, this);

TexFirstLoaded: function (texture) {
if (! Texture)
{
This. _labelFirst. SetString (" texFirstLoaded fail ");
The console. The log (" texFirstLoaded fail ")
return;
}

If (this. Sprite) {
This. RemoveChild (this Sprite);
}
This. The Sprite=new cc. Sprite (texture);
This. The Sprite. X=cc. WinSize. Width/2;
This. The Sprite. Y=cc. WinSize. Height/2;
Enclosing addChild (this Sprite);

This. _labelFirst. SetString (" texFirstLoaded successful ");
},

Why are there http://localhost:63343/hello, how to get rid of

CodePudding user response:

Can describe the problem clearly, what is why there will be a hello?
  • Related