Flash Essential

Adobe Flash CS4 Icon in ActionScript 3

Oct 8th 2008
4 Comments
respond
trackback

I've been playing around in the graphics class with gradients and matrix's ect and decided I would try and create some of the Adobe logo's. Below is my attempt at creating the Adobe Flash CS4 logo and the Photoshop CS3 Logo.

I must add that I created the Photoshop CS3 text inside Photoshop and then imported it into Flash. The Flash logo is purely ActionScript 3.0 code.

Here's the code in full;

var txtFmt:TextFormat = new TextFormat();
txtFmt.font = "Trebuchet ms";
txtFmt.size = 70;
txtFmt.bold = true;

var txtFld:TextField = new TextField();
txtFld.text = "Fl";
txtFld.y = 20;
txtFld.x = 25;
txtFld.defaultTextFormat = txtFmt;
txtFld.setTextFormat(txtFmt);

var myFont:Font = new Font1();
txtFmt.font = myFont.fontName;
txtFld.embedFonts = true;
txtFld.antiAliasType = AntiAliasType.ADVANCED;

var flashGrad:String = GradientType.LINEAR;
var flashMatrix:Matrix = new Matrix();
flashMatrix.createGradientBox(120,120,45);
var flashColors:Array = [0xb61322, 0x580408];
var flashAlphas:Array = [1, 1];
var flashRatios:Array = [0, 255];
var flashCS4 = new Sprite();
flashCS4.graphics.beginGradientFill(flashGrad, flashColors, flashAlphas, flashRatios,flashMatrix)
flashCS4.graphics.drawRect(0, 0, 120, 120);
flashCS4.x = 50;
flashCS4.y = 50;
addChild(flashCS4);

var flashShadow:DropShadowFilter = new DropShadowFilter();
flashShadow.distance = 3;
flashShadow.angle = 90;
flashShadow.alpha = 0.6;
flashShadow.blurX = 8;
flashShadow.blurY = 8;
blendMode = BlendMode.MULTIPLY;
flashCS4.filters = [flashShadow];
flashCS4.addChild(txtFld);

var gradType:String = GradientType.LINEAR;
var matrix:Matrix = new Matrix();
matrix.createGradientBox(120,120,45);
var colors:Array = [0x3174d0, 0x15396f];
var alphas:Array = [1, 1];
var ratios:Array = [0, 255];
var psdLogo = new Sprite();
psdLogo.graphics.beginGradientFill(gradType, colors, alphas, ratios,matrix)
psdLogo.graphics.drawRect(0, 0, 120, 120);
psdLogo.x = 300;
psdLogo.y = 50;
addChild(psdLogo);

var shadow:DropShadowFilter = new DropShadowFilter();
shadow.distance = 3;
shadow.angle = 90;
shadow.alpha = 0.6;
shadow.blurX = 8;
shadow.blurY = 8;
blendMode = BlendMode.MULTIPLY;
psdLogo.filters = [shadow];

var ps = new MyMovieClip();
ps.x = (psdLogo.width / 3.5);
ps.y = (psdLogo.height / 3.5);
psdLogo.addChild(ps);

Remember to Embed Your Flash Font for the Flash CS4 logo or else it wont work.


This post is tagged ,



Sponsors

Explore Recent





Monthly Archives



Friends and Affiliates



4 Comments

  1. i'm looking for Waving flag script
    Why this site isn't contain it

  2. איתי

    מה זה החרא הזה?

  3. The Flash logo is purely ActionScript 3.0 code.

  4. I must admit that, besides academic, I don't see any purpose of drawing complex images by code. I'm sure it results in smaller file size, but you limit your creativity this way…

Incoming Links

Leave a Reply