Adobe 65011817 - Fireworks CS4 - Mac Extended User Manual page 317

Extending guide
Hide thumbs Also See for 65011817 - Fireworks CS4 - Mac:
Table of Contents

Advertisement

Last updated 12/8/2009
textOnly
String. If defined, this represents the entire MXML output to be used for the export. If this is defined, no other
properties need to be set within the definition. Any properties set are ignored.
Example
textOnly = "<mx:ColorPicker id=\"cp\" selectedColor=\"#FFFFFF\"/>";
ignored
Boolean. If true, the object is completely ignored during export; no MXML is created and no image is exported. If this
is set to true, no other properties need to be set within the definition. Any properties set are ignored.
Note: The
property has precedence over
ignored
Example
ignored = true;
Example script
The following is an example of a custom symbol script using a custom definition object to determine the output created
by the Fireworks MXML and Images export.
function setDefaultValues() {
var currValues = new Array();
currValues.push({ name:"name",
currValues.push({ name:"label",
currValues.push({ name:"color",
currValues.push({ name:"enabled", type:"Boolean", value:"true"
Widget.elem.customData["currentValues"] = currValues;
Widget.elem.customData["flexClassName"] = "Star";
var classDef = new Object();
classDef.margin = {top:0, right:3, bottom:10, left:3};
classDef.padding = {top:30, right:10, bottom:10, left:10};
classDef.sizeOffset = {width:10, height:0};
classDef.customValues = {staticValue:"static"};
classDef.attributeProperties = ["staticValue", "name"];
classDef.styleProperties = ["color"];
classDef.defaultProperties = ["x","y","width","height"];
classDef.namespace = {ns:"http://www.example.com/2007/mxml"};
Widget.elem.customData["flexClassDefinition"] = classDef;
}
function applyCurrentValues() {
var vals = Widget.elem.customData["currentValues"];
Widget.GetObjectByName("label").textChars = vals[1].value;
Widget.GetObjectByName("label").pathAttributes.fillColor = vals[2].value;
Widget.GetObjectByName("disabled").visible = !vals[3].value;
}
switch (Widget.opCode) {
case 1: setDefaultValues();
case 2: applyCurrentValues(); break;
}
A document containing this rich symbol that is exported using the MXML and Images export would result in the
following MXML document.
.
textOnly
type:"Text",
value:"star name" });
type:"Text",
value:"Star"
type:"Color",
value:"#FFFFFF"
break;
EXTENDING FIREWORKS
Rich symbols
});
});
});
313

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fireworks cs4

Table of Contents