En fait ca vient de la (c'est le script d'un petit jeu de role (dofus) que j'ai récupéré sur le net..;) enfin bon voila... :
#initclip
if (!_global.dofus) {
_global.dofus = new Object ()
}
_Pop Item1 (nil)
if (!_global.dofus.graphics) {
_global.dofus.graphics = new Object ()
}
_Pop Item1 (nil)
if (!_global.dofus.graphics.gapi) {
_global.dofus.graphics.gapi = new Object ()
}
_Pop Item1 (nil)
if (!_global.dofus.graphics.gapi.controls) {
_global.dofus.graphics.gapi.controls = new Object ()
}
_Pop Item1 (nil)
if (!_global.dofus.graphics.gapi.controls.guildboostsviewer) {
_global.dofus.graphics.gapi.controls.guildboostsviewer = new Object ()
}
_Pop Item1 (nil)
if (!_global.dofus.graphics.gapi.controls.guildboostsviewer.GuildBoostsViewerSpell) {
dofus.graphics.gapi.controls.guildboostsviewer.GuildBoostsViewerSpell extends ank.gapi.core.UIBasicComponent
var _local2 = dofus.graphics.gapi.controls.guildboostsviewer.GuildBoostsViewerSpell = function () {
super[undefined]()
}.prototype
public function __set__list (mcList) {
this._mcList = mcList
return this.__get__list()
_Pop Item1 (nil)
}
public function setValue (bUsed, sSuggested, oItem) {
if (bUsed) {
this._oItem = oItem
this._lblName.__set__text(oItem.name)
if (oItem.level == 0) {
} else {
this._lblLevel.__set__text(oItem.level)
}
this._ldrIcon.__set__contentPath(oItem.iconFile)
var
_local3 = this._mcList.gapi.api.datacenter.Player.guildInfos
if (oItem.level == 0) {
this.setMovieClipTransform(this._ldrIcon,dofus.graphics.gapi.controls.guildboostsviewer.GuildBoostsViewerSpell.COLOR_TRANSFORM)
} else {
}
this.setMovieClipTransform(this._ldrIcon,dofus.graphics.gapi.controls.guildboostsviewer.GuildBoostsViewerSpell.NO_COLOR_TRANSFORM)
} else {
this._lblName.__set__text("")
this._lblLevel.__set__text("")
this._ldrIcon.__set__contentPath("")
this.setMovieClipTransform(this._ldrIcon,dofus.graphics.gapi.controls.guildboostsviewer.GuildBoostsViewerSpell.NO_COLOR_TRANSFORM)
}
}
public function init () {
super.init(false)
}
public function createChildren () {
this.addToQueue({object: this,method: this.addListeners})
}
public function addListeners () {
this._btnBoost.addEventListener("click",this)
this._btnBoost.addEventListener("over",this)
this._btnBoost.addEventListener("out",this)
}
public function click (oEvent) {
this._mcList.gapi.api.network.Guild.boostSpell(this._oItem.ID)
}
public function over (oEvent) {
var _local2 = this._mcList.gapi.api
var _local3 =
_local2.datacenter.Player.guildInfos.getBoostCostAndCountForCharacteristic("s",this._oItem.ID)
this._mcList.gapi.showTooltip(_local2.lang.getText("COST") + " : " +
_local3.cost,oEvent.target,-20)
}
public function out (oEvent) {
this._mcList.gapi.hideTooltip()
}
dofus.graphics.gapi.controls.guildboostsviewer.GuildBoostsViewerSpell = function () {
super[undefined]()
}.COLOR_TRANSFORM = {ra: 60,rb: 0,ga: 60,gb: 0,ba: 60,bb: 0}
dofus.graphics.gapi.controls.guildboostsviewer.GuildBoostsViewerSpell = function () {
super[undefined]()
}.NO_COLOR_TRANSFORM = {ra: 100,rb: 0,ga: 100,gb: 0,ba: 100,bb: 0}
ASSetPropFlags (dofus.graphics.gapi.controls.guildboostsviewer.GuildBoostsViewerSpell.prototype,null,1)
}
#endinitclip
|