] Custom DrawRectangle Question
I am creating a custom Class that draws a simple rectangle for an
application. Here is the class
DrawRectangle.as
public class DrawRectangle extends MovieClip {
public var _w:Number;
public var _h:Number;
public var _x:Number;
public var
otherwise it isn't visible.
Cor
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Omar Fouad
Verzonden: maandag 24 maart 2008 22:01
Aan: Flash Coders List
Onderwerp: [Flashcoders] Custom DrawRectangle Question
I am creating a custom Class
] Custom DrawRectangle Question
I am creating a custom Class that draws a simple rectangle for an
application. Here is the class
DrawRectangle.as
public class DrawRectangle extends MovieClip {
public var _w:Number;
public var _h:Number;
public var _x:Number;
public var
] Namens Omar Fouad
Verzonden: maandag 24 maart 2008 22:01
Aan: Flash Coders List
Onderwerp: [Flashcoders] Custom DrawRectangle Question
I am creating a custom Class that draws a simple rectangle for an
application. Here is the class
DrawRectangle.as
public class DrawRectangle extends
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Omar Fouad
Verzonden: maandag 24 maart 2008 22:01
Aan: Flash Coders List
Onderwerp: [Flashcoders] Custom DrawRectangle Question
I am creating a custom Class that draws a simple rectangle for an
application
I am creating a custom Class that draws a simple rectangle for an
application. Here is the class
DrawRectangle.as
public class DrawRectangle extends MovieClip {
public var _w:Number;
public var _h:Number;
public var _x:Number;
public var _y:Number;
and technologies?
Check out our internal GTO Innovative Learning Blog subscribe.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Omar Fouad
Sent: Monday, March 24, 2008 5:01 PM
To: Flash Coders List
Subject: [Flashcoders] Custom DrawRectangle
To clarify Jason's response:
You're adding two different things. In the first case, you're adding a
child movieclip (with a rectangle drawn inside it) to the empty
DrawRectangle instance. In the second case, you're adding the
DrawRectangle instance to the screen.
You should rewrite your init
Aha I get it... But can I make a work out in order not to put addChild() in
the main Class? I mean that once I Make an Instance of the class it adds it
on the stage by itself.
Thanks
On Mon, Mar 24, 2008 at 11:27 PM, Cory Petosky [EMAIL PROTECTED]
wrote:
To clarify Jason's response:
You're
You could just draw the rectangle directly on the graphics of the
DrawRectangle:
graphics.lineStyle(1, 0xFF);
graphics.beginFill(0xFF, .3);
graphics.drawRect(_x,_y,_w,_h);
Because it extends MovieClip (or Sprite, hopefully, as Steven suggests, it
has its
Nothing Changed..The Code is the same and it is not autoadding...
By the way I Know that There is allready drawRect() but I will be adding
some more functionalities to the class that drawRect has not.
On Tue, Mar 25, 2008 at 1:36 AM, jonathan howe [EMAIL PROTECTED]
wrote:
You could just draw
11 matches
Mail list logo