This content has been marked as final. Show 5 replies
I am not sure what you are getting at. What are you getting and what are you expecting with this code?
in other words I want to do this...all these items are sprites. But I want to place <newRec> and <newRecControl> within the <new RecArea> sprite. Does that make sense?
The code previously was just the internals of a function that I had. What it does is output three rectangles of various sizes. What I want to do is to store two of those rectangle sprites within one 'holding sprite'.
"Protoculture" <firstname.lastname@example.org> wrote in message
> in other words I want to do this...all these items are sprites. But I want
> place <newRec> and <newRecControl> within the <new RecArea> sprite. Does
> make sense?
This is all declared in AS, right? So, what is not working? That all seems reasonable to me. You will have to forgive me a couple things though. I am not sure about the "new rectangle_area()", "new rectangle()", or the "new rectangle_controller()". Are these components meant to do something or do you just need to draw some rectangles. If you are just looking to draw then:
var recs : UIComponent = new UIComponent();
var recGrph : Graphics = recs.graphics;
recGrph.beginFill( 0x00FF00 );
recGrph.drawRect( 0, 0, width, height );
recGrph.beginFill( 0x0000FF );
recGrph.drawRect( 10, 10, width - 10, height - 10 );
addChild( recGrph );
Whats not working is the two rectangles are not being encased in the first one that was declared.
Another way of wording this : say I have three shapes. A circle, square and Area. When I move the Area around manually I want the circle and the square to move as well. As if the Area contains the circle and square.