Adobe 38039927 - Fireworks CS3 - PC Extended User Manual page 293

Extending fireworks
Hide thumbs Also See for 38039927 - Fireworks CS3 - PC:
Table of Contents

Advertisement

Flex Component Definitions for MXML and Images Export
When exporting a Fireworks document with the MXML and Image export, Fireworks checks each element's
property for definitions that dictate how that element should appear in the resulting MXML. If no
customData
MXML-related definitions are found, the element is exported as an image. Each Flex component found in the
Fireworks common library already has unique
wish to have elements within your document export as their own custom MXML tags you can do so with the
following
definitions.
customData
flexClassName
Flex component symbols are associated as being Flex Components by the MXML and Images import through a
property called
customData
Format
flexClassName = "WhichClass";
When this property is present in a Fireworks element, the MXML and Images export process exports the element
as a specific MXML tag and not as an image. Its value indicates the tag name of the MXML class generated.
Example
element.customData["flexClassName"] = "ComboBox";
The above line indicates that the element object is a Flex component whose MXML class is ComboBox. For rich
symbols this code should be placed within the
initially defines the rich symbol.
Example
function setDefaultValues() {
Widget.elem.customData["flexClassName"] = "ComboBox";
// additional code...
}
switch (Widget.opCode) {
case 1: setDefaultValues();
// additional code...
}
All Flex widgets provided with Fireworks already have this property defined. The class name used determines the
behavior of each of those components as determined internally within the MXML and Images export.
When you create a custom rich symbol, you must define the
Images export to treat the rich symbol as an MXML tag and not an exported image. The class name you decide to
use will be used in the resulting MXML tag. For example, if you defined
MXML tag is
<mx:Foo ... />
flexClassDefinition
In addition to the
flexClassName
, which can be used to further influence the resulting MXML export.
inition
Format
flexClassDefinition = classDefinitionObject;
customData
.
flexClassName
setDefaultValues
break;
.
property, there is an additional, optional
definitions that allow it to be exported as MXML. If you
block of code (
Widget.opCode == 1
property if you want the MXML and
flexClassName
flexClassName
customData
ADOBE FIREWORKS CS3
Extending Guide
) that
as "Foo" the resulting
property
flexClassDef-
289

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fireworks cs3

Table of Contents