Hi,
I have the
following method in a class that extends mx.containers.Canvas. Shouldn't
this work? I don't see any of the lines...However, if I remove the
"emptyClip" altogether, & just draw directly on the Canvas of the local
object, the lines appear. But I want the rectangle to be an
individual child of the myClass Canvas. Any thoughts on where
I'm goning wrong?
class myClass
extends mx.containers.Canvas
{
...
/*
Draws a "hard-cornered" rectangle.
TODO: Add support for fill color.
*/
function rectangle (boxWidth:Number, boxHeight:Number):Void
{
var L_INDENT = 3;
var TOP_INDENT = 3;
var R_INDENT = 2;
var BOT_INDENT = 2;
Draws a "hard-cornered" rectangle.
TODO: Add support for fill color.
*/
function rectangle (boxWidth:Number, boxHeight:Number):Void
{
var L_INDENT = 3;
var TOP_INDENT = 3;
var R_INDENT = 2;
var BOT_INDENT = 2;
var emptyClip =
createEmptyMovieClip("rectangleInNode", getNextHighestDepth());
emptyClip.beginFill(0xFFFFFF); //Currently harcoding a white
fill...
emptyClip.lineStyle (2, 0x000000);
emptyClip.moveTo(L_INDENT, TOP_INDENT);
emptyClip.lineTo(width - R_INDENT, TOP_INDENT);
emptyClip.lineTo(width - R_INDENT, height - BOT_INDENT);
emptyClip.lineTo(L_INDENT, boxHeight - BOT_INDENT);
emptyClip.lineTo(L_INDENT, TOP_INDENT);
emptyClip.endFill();
}
emptyClip.lineStyle (2, 0x000000);
emptyClip.moveTo(L_INDENT, TOP_INDENT);
emptyClip.lineTo(width - R_INDENT, TOP_INDENT);
emptyClip.lineTo(width - R_INDENT, height - BOT_INDENT);
emptyClip.lineTo(L_INDENT, boxHeight - BOT_INDENT);
emptyClip.lineTo(L_INDENT, TOP_INDENT);
emptyClip.endFill();
}
...
}
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Software design and development | Macromedia flex |
| Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

