Dynamic Pixelate Background Flash CS3/CS4 Component

January 15, 2010 by fMajakovskij

Dynamic Pixelate Background allow you to have a gorgeous pixel-style dynamic background in seconds.
Now available on ActiveDen!

This movie requires Flash Player 9
.

Feature:

  1. You can fade to any color you want
  2. It is resizable, so you can use it at any size, fullscreen included
  3. You can control it with its simple ActionScript API

How To Use

Open the Flash file included.
You can see the Component on the Stage and in Library. Copy it from Library to another Library if you want to use in other projects.

To change and control in run-time the effect you can use the following simple API; remember to give an instance name to the component once it is on the Stage, through the Properties Panel.

API

Open the ActionScript Panel to write the code you need.
Once you’ve given an instance name to the component, use the following code to run it:

// 'pix' is the instance name of the component on the Stage

// optional parameter relative to the pixes size, default = 8 (set this before init() )
pix.pixel_size = 8

// optional parameter relative to the space between pixels, default = 1 (set this before init() )
pix.pixel_space = 1

// initialize the component with the size of the Stage and the initial colors (background and pixel color)
pix.init(stage.stageWidth, stage.stageHeight, 0x222222, 0xffffff)

// this is the function to trig the fade transition of the component
// pass the color and the time in seconds for the fadeInOut
pix.fadeToColor( 0xff0000, 5 )

// this will pause the pixels continuous animation
pix.core.pause()

// this will restore it
pix.core.restore()

// this will regenerate the grid based on new dimensions
pix.core.resize(stage.stageWidth, stage.stageHeight)

// use the following code to update the background on window browser resize action
this.stage.addEventListener(Event.RESIZE, update)
function update(e:Event)
{
	pix.core.resize(stage.stageWidth, stage.stageHeight)
}

// TIP:
// you should use the following stage setting to make the component to work properly.
stage.align = StageAlign.TOP_LEFT
stage.scaleMode = StageScaleMode.NO_SCALE

Compatibility

Dynamic Pixelate Background is written in ActionScript 3.0. It is compatible from the Flash Player 9.0 or newer. You can use it within Adobe Flash CS3/CS4 and Flex SDK as well.
The core of the Component is a compiled clip so you don’t have to handle any ActionScript code. This keep easy the support process since there won’t any issue related to edited code.

Versions History

Current release: 1.1

Availability

You can get it here.

7 thoughts on “Dynamic Pixelate Background Flash CS3/CS4 Component

  1. Lukas says:

    Dear.

    I have found your fog-steam component on activeden recently. But today is this page unavaliable.
    http://activeden.net/item/fog-steam-mouse-effect/76531

    Is there any way how to purchase this component?

    Thank you
    Lukas

  2. Lukas says:

    And is there ANY way how to purchase it directly from you? Please!

    Lukas

  3. gaguka says:

    i cant seem to work using API, what code should i place to use sky blue as the default color? and where to place the code?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>