PDA

View Full Version : Metal



Knorcedger
January 31st, 2006, 02:29 AM
A simple metal dynamically created image :)


import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.filters.BlurFilter;
var pic = new BitmapData(500, 200, false, 0x00CCCCCC);
this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(pic, this.getNextHighestDepth());
pic.noise(128, 100, 200, 1, true);
blur = new BlurFilter(10, 0, 20);
mc.filters = [blur];
this.createTextField("mylabel", 1, 40, 50, 150, 30);
mylabel._alpha = 30
mylabel.autoSize = true
mylabel.multiline = false;
mylabel.text = "Kirupa.com";
mylabel.selectable = false;
var ft:TextFormat = new TextFormat();
ft.align = "center";
ft.color = 0xcccccc;
ft.size = 70;
ft.font = "Verdana";
mylabel.setTextFormat(ft);
import flash.filters.GlowFilter;
var filter:GlowFilter = new GlowFilter(0xcccccc, .9, 4, 4, 2, 15, false, false);
mylabel.filters = [filter];

kdd
January 31st, 2006, 02:42 AM
nice idea.

ElectricGrandpa
January 31st, 2006, 03:37 AM
Nice idea :) It looks pretty cool :D



import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.filters.BlurFilter;
import flash.filters.GlowFilter;


If you call the classes by their full paths, then you can save yourself these 4 lines... and then you'll be more in line with the rules.

hybrid101
January 31st, 2006, 06:07 AM
cool effect! looks a lot like metal too!

Knorcedger
January 31st, 2006, 08:39 AM
Thanx boys.

ElectricGrandpa, can u explain me how is this possible?

NiñoScript
January 31st, 2006, 09:26 AM
Really Cool :thumb:



Can you explain me how is this possible??
for example, here:

import flash.filters.GlowFilter;
var filter:GlowFilter = new GlowFilter(0xcccccc, .9, 4, 4, 2, 15, false, false);

you have to change it to:

var filter: flash.filters.GlowFilter = new flash.filters.GlowFilter(0xcccccc, .9, 4, 4, 2, 15, false, false);

JoshuaJonah
January 31st, 2006, 09:47 AM
sneaky.....very sneaky..

Of course this is completely useless in the real world, I find myself wondering why you guys know how to compact code so much? At the end of the day it just makes it harder to read.:D

Sammo
February 1st, 2006, 01:26 PM
At the end of the day it just makes it harder to read.:D
That's not always a bad thing :)