Made to Order Software Corporation Logo

easy

Appendix A — The geometry in SWF

This appendix describes different aspects of the geometry in Flash. Note that some of the description uses 3D matrices. It is rather easy to simplify them and use just and only 2D matrices. The simplifications can usually be such that only 2 or 3 operations are required to get the proper coordinates used to render objects.

Remember that Flash uses TWIPs and thus you certainly will want to use floating points to make it easy on you.

SWF Any Filter (swf_any_filter)

SWF Structure Info
Tag Flash Version: 
8
SWF Structure: 
/* the filter type */
struct swf_filter_type {
	unsigned char	f_type;
};

struct swf_filter_glow {
	swf_filter_type	f_type;		/* 0, 2, 3, 4 or 7 */
	if(f_type == GradientGlow || f_type == GradientBevel) {
		unsigned char		f_count;
	}
	else {
		f_count = 1;
	}
	swf_rgba		f_rgba[f_count];
	if(f_type == Bevel) {
		swf_rgba		f_highlight_rgba[f_count];
	}
	if(f_type == GradientGlow || f_type == GradientBevel) {
		unsigned char		f_position[f_count];
	}
	signed long fixed	f_blur_horizontal;
	signed long fixed	f_blur_vertical;
	if(f_type != Glow) {
		signed long fixed	f_radian_angle;
		signed long fixed	f_distance;
	}
	signed short fixed	f_strength;
	unsigned		f_inner_shadow : 1;
	unsigned		f_knock_out : 1;
	unsigned		f_composite_source : 1;
	if(f_type == Bevel) {
		unsigned		f_on_top : 1;
	}
	else {
		unsigned		f_reserved : 1;
	}
	if(f_type == GradientGlow || f_type == GradientBevel) {
		unsigned		f_passes : 4;
	}
	else {
		unsigned		f_reserved : 4;
	}
};

struct swf_filter_blur {
	swf_filter_type		f_type;	/* 1 */
	unsigned long fixed	f_blur_horizontal;
	unsigned long fixed	f_blur_vertical;
	unsigned		f_passes : 5;
	unsigned		f_reserved : 3;
};

struct swf_filter_convolution {
	swf_filter_type	f_type;		/* 5 */
	unsigned char	f_columns;
	unsigned char	f_rows;
	long float	f_divisor;
	long float	f_bias;
	long float	f_weights[f_columns × f_rows];
	swf_rgba	f_default_color;
	unsigned	f_reserved : 6;
	unsigned	f_clamp : 1;
	unsigned	f_preserve_alpha : 1;
};

struct swf_filter_colormatrix {
	swf_filter_type	f_type;		/* 6 */
	long float	f_matrix[20];
};

struct swf_any_filter {
	swf_filter_type			f_fitler_type;
	swf_filter_blur			f_filter_blur;
	swf_filter_colormatrix		f_filter_colormatrix;
	swf_filter_convolution		f_filter_convolution;
	swf_filter_glow			f_filter_glow;
};

A filter defines how to transform the objects it is attached to. The first byte is the filter type. The data following depend on the type. Because each filter is much different, they are defined in separate structures. You can attach a filter to an object using an ActionScript or the PlaceObject3 tag.

The following describes the different filters available since version 8.

...
Value Name Version
0 Drop Shadow 8

We have completely switched to Drupal!

Made to Order Software is proud to announce a complete switch-over of our main site to Drupal! With this switch we are introducing new features which we hope will make your visit to our site more enjoyable. cool

GoldMoney.com

Watching the spiraling price of gold (the spot price as of this writing is $1,213.40/oz) has been a humbling experience for me. There are all kinds of marketing forces happening to cause this, but if you follow what the Austrian School folks are saying, this is not a surprising trend at all. Central banks around the world are dumping their U.S. dollars and buying up gold, which is driving the price up. But I think this is different than just another commodity bubble, because the way gold is perceived--as a store of wealth. Traditionally investors who feel the currency they are in is threatened ...

Adobe Flash Animation by Made to Order Software

Making a great thing even better!

The letters SSWF in a curly font with dots on the ends.

Using our robust open-source C++ library and scripting language, ScriptSWF (SSWF), you can create Adobe Flash animations on the fly.

Since it's initial release in 2002, SSWF has been extremely popular. Despite never being advertised, it has been downloaded more than 77,250 times just on SourceForge.net, has been converted to work on several Unix platforms not initially ...

Commercial license for odbcpp

In June 2008, Made to Order Software created a new software library called odbcpp. This library is an Open Source C++ wrapper of the Open Database Connectivity (ODBC) library started by Microsoft in 1988.

ODBC hides the details of back-end database systems. In other words, if you support ODBC, you can effortlessly connect to a very large number of database systems such as MS-SQL, Access, Oracle, MySQL and PostgreSQL.

odbcpp is an extension for C++ programmers. It is easy to use and it is a great solution to avoid many bugs as it will automatically handle all the possible ODBC errors for ...

A new concept: Throwaway Software.

More and more, people are learning new software as they go. A few will stick to one software for a long time simply because it is easier, but changing is easy too, especially if the new system is easy to use.

But how do you produce throwaway software? And is it worth the trouble?

As we see things evolving, more and more, people want to use software anywhere they go. This means software that runs on the Internet in some ways. For instance, you can use Google Map anywhere you go, as long as you have a computer to access the Internet.

Training at Made to Order Software

Made to Order Software is commited in making its products easy to use and ensure maximum performance from its customers' engineers.

All of our products are documented in fine detail, ensuring that your engineers can quickly find the information they need to move forward.

In order to make sure your engineers can make full use of our tools and be able to hit the ground running, we offer tailored on-site training with a Made to Order Software certified instructor for all of our professional products.

Internet Explorer “Save As …”

Today, I found a good one. Internet Explorer has a “Save As …” feature that let you save a page that you are visiting.

The page I have includes a table with a cell that has the align and valign attributes set to center and middle respectively. Once saved with Internet Explorer, these change to vAlign and align and center and middle respectively. Yes. Meaning that the values are swapped. Now the valign says center instead of middle, which will work with most browsers, but the worst is the align that is set to middle. That should never happen.

LinuxWorld Conference & Expo 2008

This year, 2008, I decided to register and go to LinuxWorld. It is in August and my kids are not at school so it was easy to manage. Also, I had to go to the French consulate to get a birth certificate for my daughter. In other words, I had the chance to do two things at once!

I found it quite interesting to hear that many people were not too excited about the event. Many of the people walking around are like me: they themselves sell their own Linux solution. In other words, they are not going to be customers. I had the chance to talk with Roger Levi, the Vice President of the Open Platform ...