Made to Order Software Corporation Logo

determine

SWF Button (swf_button)

SWF Structure Info
Tag Flash Version: 
1
SWF Structure: 
struct swf_button {
	char align;
	unsigned		f_button_reserved : 2;
	if(version >= 8) {
		unsigned		f_button_blend_mode : 1;
		unsigned		f_button_filter_list : 1;
	}
	else {
		unsigned		f_button_reserved : 2;
	}
	unsigned		f_button_state_hit_test : 1;
	unsigned		f_button_state_down : 1;
	unsigned		f_button_state_over : 1;
	unsigned		f_button_state_up : 1;
	if(any f_button_state_... != 0) {
		unsigned short		f_button_id_ref;
		unsigned short		f_button_layer;
		swf_matrix		f_matrix;
		if(f_tag == DefineButton2) {
			swf_color_transform		f_color_transform;
		}
		if(f_button_filter_list) {
			unsigned char		f_filter_count;
			swf_any_filter		f_filter;
		}
		if(f_button_blend_mode) {
			unsigned char		f_blend_mode;
		}
	}
};

A button structure defines a state and a corresponding shape reference. The shape will be affected by the specified matrix whenever used.

There are many acceptable combinations. The object which is referenced is drawn when its state matches the current state of the button. If only the f_button_state_hit_test is set, then the shape is always displayed.

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

DefineSound

Tag Info
Tag Number: 
14
Tag Type: 
Define
Tag Flash Version: 
2
Brief Description: 

Declare a sound effect. This tag defines sound samples that can later be played back using either a StartSound or a DefineButtonSound. Note that the same DefineSound block can actually include multiple sound files and only part of the entire sound can be played back as required.

Tag Structure: 
struct swf_definesound {
	swf_tag			f_tag;		/* 14 */
	unsigned short		f_sound_id;
	unsigned		f_sound_format : 4;
	unsigned		f_sound_rate : 2;
	unsigned		f_sound_is_16bits : 1;
	unsigned		f_sound_is_stereo : 1;
	unsigned long		f_sound_samples_count;
	unsigned char		f_sound_data[<variable size>];
};

A DefineSound tag declares a set of samples of a sound effect or a music.

The sound samples can be compressed or not, stereo or not and 8 or 16 bits. The different modes are not all available in version 2, although the same tag is used in newer versions with additional capabilities.

The f_sound_is_16bits is always set to 1 (16bits samples) if the samples are compressed (neither Rawnor Uncompressed).

The f_sound_rate represents the rate at which the samples are defined. The rate at which it will be played on the target computers may differ. The following equation can be used to determine the ...

File Header

Tag Info
Tag Number: 
-1
Tag Type: 
Format
Tag Flash Version: 
1
Brief Description: 

Although it isn't a tag per say, we consider the file header as being a tag because it represents a block in the flash file. Since version 8, it can be complemented by the FileAttributes tag.

Tag Structure: 
struct swf_header {1
	unsigned char		f_magic[3];	/* 'FWS' or 'CWS' */
	unsigned char		f_version;
	unsigned long		f_file_length;
}

struct swf_header_movie {2
	swf_rect		f_frame_size;
	unsigned short fixed	f_frame_rate;
	unsigned short		f_frame_count;
};
  • 1. This part is never compressed
  • 2. Although considered part of the header, this part is compressed in the 'CWS' format.

The file header is found at the very beginning of the file. It should be used to determine whether a file is an SWF file or not. Also, it contains information about the frame size, the speed at which is should be played and the version (determining the tags and actions possibly used in the file).

The f_magic[3] array is defined as the characters: 'FWS' (it is going backward probably because it was supposed to be read in a little endian as a long word). A movie can be compressed when the version is set to 6 or more. In this case, the magic characters are: 'CWS'.

The f_version ...

Terms & Conditions

Made to Order Software Corporation
Terms and Conditions for the Online Services
offered by Made to Order Software Corporation

This Agreement ("Agreement") is by and between Made to Order Software Corporation ("m2osw") a Californian Corporation and You, your heirs, your agents, successors and assigns ("You" and "Your"), and is made effective as of the date of electronic execution, which is when you register for an electronic account to use the Web site of m2osw. This Agreement sets forth the terms and conditions of Your use of the Online Services ...

Your cell phone is hackable...

This is a quite interesting article which I thought I should share and keep a copy of!

Most of us, even if we can determine whether a piece of software (or hardware!) can be hacked, we just do not have the time to spend on testing each device we use to ensure that no hackers will be able to get it. We rely on the manufacturer to do that work for us.

This article shows that even though all manufacturers have protections, all are vulnerable! And that means your data is vulnerable on your cell phones... Hope this does not scare you too much!

Note by the way that those people who have plenty of ...

Software Consulting Services

Robot arm by Schilling RoboticsMade to Order Software Corporation offers software consulting, analysis, and development services at any stage of a project. Our analysts can provide you well-defined and thorough user and developer documentation for your project in a timely manner. We can determine the skill set necessary to accomplish the goals of the project, and maximize the number of workers on the project to shorten the development period.

From simple applications to complex e-Business solutions through realtime software and complex database systems, our people work at your convenience—in your office or ours.

ScreenWRITER television system ...