Archive for category AS 2.0 Classes

MTASC – MTASC compliant AS2 classes

Hello,

Some people on the pixlib mailing list ask me to give them the macromedia classes patched for mtasc ( for strict compiling ).
The patch are on the osflash.org website here, but you can download the classes already path below

MTASC Compliant classes Download the classes Unknown

And this post reminds me that I have to finish updating my website. I definitly need to go through some CSS :)

, , , ,

5 Comments

Hexa class – format correct hexa string

This class will help you to get correct hexa string to save in a file. eg, 10 in decimal is "A" in hexadecimal, but when creating an hexa string to save it in a file you need to give the byte like "0A".

Then you have word ( 2 bytes ) and DWord ( 4 bytes ). Lets say you want to save in hexa a width of your bitmap, saying 678. 678 in hexa is 2A6 and must be saved in a DWord ( 4 bytes ). The thing is that Words and DWords are read from right to left, but the bytes still from left to right. So you should have this to be correct: A6 02 00 00.

Anyway you don't need to know all of this. With the class to get your hexa string just do Hexa.DWord( "2A6" ) and you'll get the "A6020000" in result. Check the function in the class.
The getString will let you choose the length of the string, eg if you need to retreive the hexa for a pixel do like:

Actionscript:
  1. getString( _bmp.getPixel(0,0).toString( 16 ), 6 );

Read the rest of this entry »

, ,

2 Comments

Exporting BitmapData in hexa for file saving using swf2exe soft ( like mdm Zinc )

This class will help you to have a string in hexadecimal format to save it in a file. It creates the header of the file, the header of the bitmap and the data. This class require the Hexa class. Be sure you have it when compiling.

This class do its job, but I have to admit as soon as you are processing big bitmap, it's slow... very slow. This is due because of the string operation I'm doing to format it to a conform Hexa string.

So check it and give feedbacks if you find any way to improve it or if you have any request.
Read the rest of this entry »

, , ,

1 Comment

ColorMatrix or how to “paint” MovieClip

Today I have to finish an application I'm developing for my company.
This application is downloading external parts of a house (png files) and displaying them on top of the house image. Thus the user can see the different texture he could chose.

The thing is a feature is to be able to "paint" those external materials.
So I've look around a bit for tips / tricks. I've found two classes for flash, both named ColorMatrix, one made by Grant Skinner the other by Quasimondo

The one from Grant doesn't have any painting features, the one from Quasimondo has it but is not working the way I've wanted to.
What I've wanted is replacing "totally" a color by another one but still keeping the shadow, contrast, ...
Read the rest of this entry »

, ,

2 Comments

AS2 – Listening the event of a CLASS

This class has been made to be able to listen to the events of a CLASS not to the on of an instance.
Read the rest of this entry »

, ,

No Comments

AS2 – Vector Class

Today I check my rss feeder and I've seen that michael has posted a Vector class here. Which reminds me that I have done one as well. So I'm posting it here.

Hope you'll like it :)
Read the rest of this entry »

, ,

3 Comments