Load atlas and add it to another node as texture

Hello, I wan to load the atlas with many frames, get specific frame and add this specific frame to another node as texture. Can anyone help me? 
Has invited:

eric

Favor from:

For creating atlas see below link chapterhttp://docs.qiciengine.com/manual/Atlas/index.html 
 
For loading asset see below
http://docs.qiciengine.com/manual/AssetsLoad/index.html
self.game.assets.load('Assets/texture/texture.bin', function(r) {
// Find the UIImage object to set texture asset
self.game.world.find('UIRoot/background').texture = r;
});
For changing frame dynamicly see the example below
https://github.com/qiciengine/qiciengine-examples/blob/7e01856674ef7123b8d3b1e707dbfe6bda83cb8b/projects/Button/action-on-click/Scripts/UI.js
var UI = qc.defineBehaviour('qc.demo.UI', qc.Behaviour, function() {
}, {
background: qc.Serializer.NODE
});

UI.prototype.awake = function() {
var self = this;
this.addListener(self.gameObject.onEnter, function() {
self._isEnter = true;
self.gameObject.frame = 'button_sprite_sheet_03.png';
});
this.addListener(self.gameObject.onExit, function() {
self._isEnter = false;
self.gameObject.frame = 'button_sprite_sheet_02.png';
});
};

UI.prototype.onDown = function() {
this.gameObject.frame = 'button_sprite_sheet_01.png';
};

UI.prototype.onUp = function() {
if (this._isEnter) {
this.gameObject.frame = 'button_sprite_sheet_03.png';
}
else {
this.gameObject.frame = 'button_sprite_sheet_02.png';
}
};

UI.prototype.onClick = function() {
this.background.visible = !this.background.visible;
};

To reply to a question, please Login or registered