He probado como me has dicho y no funciona, he de decirte que el archivo .fla va acompañado de un .as cuya programación es la de abajo nose si te servira para poder ayudarme.
Gracias
Código :
import mx.transitions.Tween;
class RollButton extends MovieClip {
private static var ASBDependancy = _global.AsBroadcaster.initialize(RollButton.prototype);
private var broadcastMessage:Function;
public var addListener:Function;
public var removeListener:Function;
private var frontLabel:TextField;
private var backLabel:TextField;
private var frontLabelTween:Tween;
private var backLabelTween:Tween;
private var textMask:MovieClip;
private var hitAreaRec:MovieClip;
private var autoSize:Boolean = true;
private var duration:Number = 15;
private function RollButton() {
this.frontLabelTween = new Tween(this.frontLabel, "_y", null, this.frontLabel._y, this.frontLabel._y, 1, false);
this.backLabelTween = new Tween(this.backLabel, "_y", null, this.backLabel._y, this.backLabel._y, 1, false);
this.frontLabel.autoSize = this.backLabel.autoSize = true;
this.frontLabel.embedFonts = this.backLabel.embedFonts = true;
}
public function setText(text:String, frontFormat:TextFormat, backFormat:TextFormat):Void {
if (text) {
this.frontLabel.text = this.backLabel.text = text;
}
if (frontFormat) {
this.frontLabel.setTextFormat(frontFormat);
}
if (backFormat) {
this.backLabel.setTextFormat(backFormat);
}
if (this.autoSize) {
this.setSize(this.frontLabel._width, this.frontLabel._height);
}
}
public function setSize(w:Object, h:Number):Void {
if (w.toLowerCase() == "auto") {
this.autoSize = true;
this.setSize(this.frontLabel._width, this.frontLabel._height);
return;
}
this.hitAreaRec._width = this.textMask._width = Number(w);
this.hitAreaRec._height = this.textMask._height = h;
}
public function setTween(easeType:Function, duration:Number):Void {
if (duration) {
this.duration = duration;
}
if (easeType) {
this.frontLabelTween.func = this.backLabelTween.func = easeType;
}
}
private function onRollOver():Void {
this.frontLabelTween.continueTo(this.textMask._height, this.duration);
this.backLabelTween.continueTo(0, this.duration);
this.broadcastMessage("onRollOver");
}
private function onRollOut():Void {
this.frontLabelTween.continueTo(0, this.duration);
this.backLabelTween.continueTo(-this.textMask._height, this.duration);
this.broadcastMessage("onRollOut");
}
}