Hi! If I have to set a simple onComplete event on a tween fx, from a
performance point of view, what's better?
set('tween',{ onComplete...})
or
elem.get('tween').start(..).chain(function(){..})?
For example:
// item.set('tween',{
// onStart:function(element){
// element.setStyle('display','block');
// }.bind(this),
//
// //vedi show_next()
// onComplete:function(element){
// if(element.getStyle('opacity') == 0){
//
element.setStyle('display','none');
// this.show_next();
// }
// else if(element.getStyle('opacity') ==
1){
// this.show_arrows();
// }
// }.bind(this)
// });
Could also be (since in fact they are triggered in 2 dinstinct methods
in my class):
item.setStyle('display','block').get('tween').start('opacity':
0).chain(function(){
element.setStyle('display','none');
this.show_next();
}.bind(this))
and
item.setStyle('display','block').get('tween').start('opacity':
1).chain(function(){
this.show_arrows();
}.bind(this))
SO, what's the best practice/approach?
Thank you