Troubleshooting - MACROMEDIA FLEX - DEVELOPING COMPONENTS AND THEMES Manual

Developing flex components and themes in flash authoring
Table of Contents

Advertisement

bTextChanged = true;
invalidate();
}
function get text():String
{
if (bTextChanged)
return __text;
return text_mc.text;
}
// Handle events that are dispatched by the children.
function handleEvent(evt:Object):Void
{
if (evt.type == "change")
{
dispatchEvent({ type: "change" });
}
else if (evt.type == "focusOut")
{
text_mc.editable = false;
}
else if (evt.type = "click")
{
text_mc.editable = !text_mc.editable;
}
}
}
The following is an example MXML file that instantiates the ModalText control and sets the
labelPlacement
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"
width="800" height="400">
<ModalText labelPlacement="left"/>
</mx:Application>

Troubleshooting

This section describes some common problems and their solutions when creating components for
Flex in Flash.
I get an error "don't know how to parse ..." when I try to use the component from MXML.
This means that the compiler could not find the SWC file, or the contents of the SWC file did
not list the component. The MXML tag must match the
ensure that the SWC file is in a directory that Flex searches, and ensure that your
is pointing to the right place. Try moving the SWC file to the same directory as the MXML file
and setting the namespace to "*" as the following example shows:
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*">
For more information, see
76
Chapter 3: Creating Advanced Components in Flash MX 2004
property to
:
"left"
"Using SWC files" on page
for the component. Also,
symbolName
18.
property
xmlns

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX - DEVELOPING COMPONENTS AND THEMES and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents