Adobe 65011817 Extended User Guide - Page 314
AflexClassDefinition
UPC - 883919157368
View all Adobe 65011817 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 314 highlights
Last updated 12/8/2009 EXTENDING FIREWORKS 310 Rich symbols 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 setDefaultValues block of code (Widget.opCode == 1) that initially defines the rich symbol. Example function setDefaultValues() { Widget.elem.customData["flexClassName"] = "ComboBox"; // additional code... } switch (Widget.opCode) { case 1: setDefaultValues(); break; // 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 flexClassName property if you want the MXML and 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 flexClassName as "Foo" the resulting MXML tag is . flexClassDefinition In addition to the flexClassName property, there is an additional, optional customData property flexClassDefinition, which can be used to further influence the resulting MXML export. Format flexClassDefinition = classDefinitionObject; Example classDefinition = new Object(); element.customData["flexClassDefinition"] = classDefinition; A flexClassDefinition object includes any number of the following properties, all of which are themselves optional. margin Rectangle. Defines the area around the element that is not part of the Flex component shape but takes up space in Fireworks (for example, the Panel component in Flex has a drop shadow that is not included as part of the panel's size in Flex but is included when recreated in Fireworks). It consists of four integer properties measured in pixels: top, right, bottom, and left.