Aqui esta la clase:
Código AS3:
Ver original
package { import flash.display.MovieClip; import flash.display.Sprite; import flash.display.Graphics; import flash.display.GradientType; import flash.display.SpreadMethod; import flash.display.InterpolationMethod; import flash.geom.Matrix; import fl.transitions.*; import fl.transitions.easing.*; import flash.text.*; import flash.net.URLLoader; import flash.net.URLRequest; import flash.display.Loader; import flash.events.*; public class classPagina extends Sprite { private var ldr:Loader; private var logo:MovieClip; public function classPagina() { crearFondo(); mostrarLogo(); crearPie(); } private function crearFondo():void { var fondo:MovieClip = new MovieClip(); var typeGradient:String = GradientType.LINEAR; var colors:Array = [0x000000, 0xCC0066]; var alphas:Array = [1, 1]; var ratios:Array = [0x00, 0xFF]; var mtr:Matrix = new Matrix(); var sm:String = SpreadMethod.PAD; mtr.createGradientBox(700, 250, 0, 0, 0); mtr.rotate(Math.PI / 2); fondo.graphics.beginGradientFill(typeGradient, colors, alphas, ratios, mtr, sm); fondo.graphics.drawRect(0, 0, 980, 500); fondo.graphics.endFill(); addChild(fondo); } private function crearPie():void { var pie:MovieClip = new MovieClip(); var textoPie:TextField = new TextField(); var formato:TextFormat = new TextFormat(); pie.graphics.beginFill(0xFFFFFF, 0.5); pie.graphics.drawRect(0, 470, 980, 30); pie.graphics.endFill(); addChild(pie); var myTween:Tween = new Tween(pie, "y", Strong.easeInOut, pie.y - 30, pie.y, 1, true); var myTweenAlpha:Tween = new Tween(pie, "alpha", None.easeNone, 0, 1, 1, true); formato.font = "Trebuchet MS"; formato.size = "13"; formato.color = 0xFFFFFF; formato.bold = true; textoPie.x = 30; textoPie.y = 473; textoPie.width = 400; textoPie.defaultTextFormat = formato; textoPie.text = "Mi Empresa © Todos los derechos reservados"; addChild(textoPie); new Tween(textoPie, "y", Strong.easeInOut, textoPie.y - 30, textoPie.y, 1, true); new Tween(textoPie, "alpha", None.easeNone, 0, 1, 1, true); } private function mostrarLogo():void { logo = new MovieClip(); logo.width = 327; logo.height = 228; logo.x = 327; logo.y = 111; addChild(logo); verLogo(); } private function verLogo():void { ldr = new Loader(); ldr.load(new URLRequest("./logo.png")); logo.addChild(ldr); } } }
Espero que puedan ayudarme. Gracias