views:

117

answers:

3

So i have a flash site i am doing in as2, even if the solution can only be done in as3, I still want it.

I am trying to accomplish lines through the background image like on this site http://larc-paris.com/#/fr/club

I tried just putting the patten on the image itself, but when i scale my site, its all distorted and the lines does not look as crisp anymore, like theirs do, so I am assuming they did the lines themself in flash...

any clue?

I have the image just need the lines, dont need a slideshow.

A: 

They probably did that on Photoshop, or any other image editing program and exported the bitmap.

Jorge
unlikely. the lines would be distorted if you scale the site.
back2dos
+1  A: 

What you'll need to do is put a pixel overlay on top of your image. You can do this the following way in ActionScript 2 if you're using Flash CS4 to compile and targeting Flash Player 8 or above.

import flash.display.*;
import flash.geom.*;

var bmpd:BitmapData = new BitmapData(3,3);
var rect1:Rectangle = new Rectangle(0,0,1,1);
var rect2:Rectangle = new Rectangle(1, 1, 1, 1);
var rect3:Rectangle = new Rectangle(2, 2, 1, 1);
bmpd.fillRect(rect1, 0x99000000);
bmpd.fillRect(rect2, 0x99000000);
bmpd.fillRect(rect3, 0x99000000);

this.createEmptyMovieClip("bmp_fill_mc", this.getNextHighestDepth());
with (bmp_fill_mc) {
    matrix = new Matrix(); 
    repeat = true;
    beginBitmapFill(bmpd, matrix, repeat, smoothing);
    moveTo(0, 0);
    lineTo(0, 440);
    lineTo(550, 400);
    lineTo(550, 0);
    lineTo(0, 0);
    endFill();
}

Two more things:

  1. Adjust the fillRect() calls with different uint values to get the color and opacity you desire.

  2. Adjust the lineTo() calls with different x and y coordinates to match the width and height of your image.

Refer to this documentation for more information: http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001279.html

Matt W
A: 

These methods are simple.

AS2 'This will create a fine white line around a bitmap symbol'

import flash.filters.GlowFilter;
//color, alpha, blurX, blurY, strength, quality, inner, knockout
var gf:GlowFilter = new GlowFilter(0xFFFFFF, 100, .03, .03, 255, 15, false, false);
gf.blurX++;
gf.blurY++;
this.filters = [gf];

AS3 'This will create a fine white line around a bitmap symbol'

var outline:GlowFilter = new GlowFilter();
outline.alpha = 1;
outline.color = 0xFFFFFF;
outline.blurX = 1;
outline.blurY = 1;
outline.inner = true;
outline.quality = BitmapFilterQuality.HIGH;
outline.strength = 255;
p.filters = [outline];

Since bitmaps don't work with vector methods, we'll use a glowFilter to make the lines. Strength is set to a max of 255 creates a crisp edge, and makes the blur appear as a line. Changing blurX and blurY to 1 for a fine line. Enjoy!

VideoDnd
Is that not just putting a line around the image? I think this person is looking to put the pixel pattern thats on top of the image?
Matt W