# My first component

**URL:** <https://forum.kirupa.com/t/my-first-component/25039>\
**Category:** flash\
**Created:** [July 8, 2003, 8:10pm UTC](https://forum.kirupa.com/t/my-first-component/25039 "2003-07-08T20:10:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![h88](https://avatars.discourse-cdn.com/v4/letter/h/e9bcb4/32.png) [@h88](https://forum.kirupa.com/u/h88)\
**Post date:** [July 8, 2003, 8:10pm UTC](https://forum.kirupa.com/t/my-first-component/25039/1 "2003-07-08T20:10:51Z")

</div>

Been playing with components lately, and that was my first attempt, a component that draws a rectangle with specific arguments that a user supply (I know it will never be used, but made it for the sake of curiosity what components are and how can they be created), quite dirty coding tho, but my first attempt to do it, please tell me the pros and cons of my coding. And please do not hesitate to ask me about any part of my coding.

And if you’re also curious about them as I was, then check out Macromedia DevNet’s Tutorials, here is the one that got me started:

[[link]](http://www.macromedia.com/support/flash/applications/creating_comps)

Seeking your comments as well as your suggestions. :nerd:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 8, 2003, 8:18pm UTC](https://forum.kirupa.com/t/my-first-component/25039/2 "2003-07-08T20:18:32Z")

</div>

Very sweet h88, good job! :thumb:

Will have to use this one one day for interfaces and such!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 8, 2003, 8:34pm UTC](https://forum.kirupa.com/t/my-first-component/25039/3 "2003-07-08T20:34:56Z")

</div>

Thanks for your complement, Sintax, 🙂 tho I don’t think it’s quite a good idea to use components to draw shapes and such, because you simply can make a MovieClip method that returns exactly the same thing and gain more stability. Nevertheless, components will come in handy if you try to create guestbooks, forms, or even buttons! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 8, 2003, 8:42pm UTC](https://forum.kirupa.com/t/my-first-component/25039/4 "2003-07-08T20:42:47Z")

</div>

Clever 🙂 Finally a component where I actually understand what is going on. Nice and simple, good job man 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 8, 2003, 9:07pm UTC](https://forum.kirupa.com/t/my-first-component/25039/5 "2003-07-08T21:07:53Z")

</div>

Thank you Lost, Glad you understanded what’s going on mine, I had exactly the same feeling when I tried once to view the code of one of the Flash UI components. :skull:

I think my code wasn’t exactly a good OOP practice, but it was my first try after all, can’t wait to make other applications using components, though I think It’s not that easy, but not that hard at the same time. :beam:

Hoping to see your component done as well as others comments and suggestions about my code. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 8, 2003, 9:11pm UTC](https://forum.kirupa.com/t/my-first-component/25039/6 "2003-07-08T21:11:24Z")

</div>

Yeah, I have view a few components myself and my jaw hit the floor. I am horrible at OOP coding, I try and try, but it just never seems to want to click. Raydred was explaining some of it to me in simple terms, and I got it and still do, but overall I am just no good at OOP.

I tried my hand at making a component before, and failed… miserably 😛

In the future I may give it another shot though :bad:

I don’t know whether or not you code was good OOP practice, all I know is it works and it your coding looks clean to me 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 8, 2003, 10:39pm UTC](https://forum.kirupa.com/t/my-first-component/25039/7 "2003-07-08T22:39:43Z")

</div>

> \*Originally posted by lostinbeta \*  
> \*\*Clever 🙂 Finally a component where I actually understand what is going on. Nice and simple, good job man 🙂 \*\*  
> 😉

[edit]

oh, and i don’t see the ‘dirty coding’ you’re talking about, it’s pretty clear =)
