PDA

View Full Version : Flash 8 - blending modes


Mortimer Jazz
08-03-2005, 10:28 AM
Just a quick play with some of the new blending modes in Flash 8.
You will need the beta player to view this file.

[edit: more further down the thread. Will add more links as I go]

http://www.nwebb.co.uk/nw_htmlsite/files/flash8_blend.html

Headshotz
08-03-2005, 12:02 PM
Wow, looks good ;)

Mortimer Jazz
08-04-2005, 02:47 PM
Flash 8 can also sample bitmaps and reproduce them. Sweet!
http://www.nwebb.co.uk/nw_htmlsite/files/flash8_bmap1.html

hangalot
08-04-2005, 03:07 PM
the second one is good. i imagine you are using getpixel? or are you using the bitmap data class?

Mortimer Jazz
08-04-2005, 03:32 PM
Hey Hangalot, how's it going.

I'm using both BitMapData and Rectangle (from the geom package) - which was something I saw protozoo do first (see comments on website) .
I'm sampling an area using flash.geom.Rectangle:

function sampleBMD()
{
for(var y=0; y<divY; ++y)
{
for(var x=0; x<divX; ++x)
{
var xPos = x*sqSize;
var yPos = y*sqSize;
this["rect" + x + "_" + y] = new flash.geom.Rectangle(xPos, yPos, sqSize, sqSize);
rectArr.push(this["rect" + x + "_" + y]);
}
}
}


and then using BitMapData.copyPixels to past it in the new BMD with some randomisation.

rrr = new flash.geom.Rectangle(xPos, yPos, sqSize, sqSize);
bmap2.copyPixels(bmap1, rectArr[randNumArr[0]], rrr);


I want to swap everything over to classes, then I'll post the source somewhere, as it will be in a more useful state. I'm currently using the F7 IDE, not MTASC, and the compiler obviously grumbles about the new packages. I found out that you can get around it in many cases by prefixing with "_global", but I couldn't get filters to work that way.

hangalot
08-04-2005, 03:40 PM
nice one, its good stuff. you coming over to mmug this month?

Mortimer Jazz
08-04-2005, 03:47 PM
Yeah may do. Depends if it clashes with my visit back to Bath or not.

As you can (probably) tell, I'm off work today - mad ear ache like you wouldn't believe. Trying to get as much F8 stuff looked at as I can inbetween bouts of intense head pain! Not to mention the pain of losing another days wages. *sniff*

ps see edit in above post.
pps How's the job going? ... oh and did you get my email last night?

hangalot
08-04-2005, 03:50 PM
just declare your classes as dynamic, that will get the compiler to shut up. no i did not get the mail last night...
and the job is great, much less money than contracting but really good/interesting. and i can have sickies and still get paid :)

Mortimer Jazz
08-04-2005, 04:07 PM
and i can have sickies and still get paid :)
*Grrrrr* ;)

Yeah of course. That sorted it - cheers.

Sent it to your gmail account l***el@gmail.com.

hangalot
08-05-2005, 02:05 PM
ain't getting no mail from ya.... weirdness.

Mortimer Jazz
08-06-2005, 09:39 AM
ain't getting no mail from ya.... weirdness.
Strange. Ah well, it was just hate-mail ;)