# Actionscript Class & MXML Component

**URL:** https://forum.kirupa.com/t/actionscript-class-mxml-component/271004
**Category:** flash
**Created:** [September 17, 2008, 10:27am UTC](https://forum.kirupa.com/t/actionscript-class-mxml-component/271004 "2008-09-17T10:27:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![grandpaw\_broon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/grandpaw_broon/32/3985_2.png) [@grandpaw\_broon](https://forum.kirupa.com/u/grandpaw_broon)
#### Post date: [September 17, 2008, 10:27am UTC](https://forum.kirupa.com/t/actionscript-class-mxml-component/271004/1 "2008-09-17T10:27:16Z")

</div>

Hi all,

I was using AS3 projects in Flex for a year and started playing with Flex recently.

I am not infront of a Dec PC but i was wondering if someone can confirm this correct?

If i make an actionscript class called MyClass.

class MyClass  
{  
public var justaproperty:int = 0;

public function MyClass()  
{  
trace(“a new class was created”);  
}  
}

Does that mean that i can automatically use a flex component like this or is there more to it?

\<local:MyClass id=“myClass” justaproperty=“15” /\>

Thanks.
