First hello to everybody in this forum,
I am starting to learn actionscript 3 and finally Im satrting to understand OOP structure and classes. But now Im having a problem, I want to extend the Tweener class adding some functions I use very often, like a tween on the x axis combined with an x blur… the thing works very well :
package com{
import caurina.transitions.Tweener;
import flash.filters.*;
public class Animador extends Tweener{
public function Animador(){
}
public static function animBlurX(obj:Object,dx:Number, _time:int, blur:Number,_delay:Number,ecuacionEasing:String):void{
//mover ALGO
trace("Mover ...."+obj.name +" // "+obj);
Tweener.addTween(obj,{x:dx,time:_time,delay:_delay,transition:ecuacionEasing});
Tweener.addTween(obj,{_Blur_blurX:blur,time:0,transition:ecuacionEasing});
Tweener.addTween(obj,{_Blur_blurX:0,time:_time,delay:_delay+_time/2,transition:ecuacionEasing});
}
}
The I just call it this way from the flash timeline:
import com.Animador;
Animador.animBlurX(centro_mc.logo_mc,-2.6,1,30,0,"easeOutQuint");
But If I want to use the Tweener class I have to include it by importing it into flash and then refer to it using Tweener.addTween, Isnt there a way to include it in my extended class so that I just import the extended class and then I can use my function and all the tweener functions?
tahnk you very much!