Skip to Content »

FlashApe » random notes about components

 random notes about components

  • March 12th, 2006
  • 4:24 pm

getting into component dev in flash, so I just wanted to jot some notes down:

1. mx.core.View is better to extend from if your component has children it needs to lay out.
2. When you are extending from mx.core.View, calls to myComponent.size() are handled by the doLayout() method resize the border_mc (which is the RectBorder for the component that is set up in View) and then call the doLayout() method, which you overrisde in your class. Also, you don’t need the init() method, though (i think) you can still use it.
3. The Flash Help documentation, though it seems to be pretty well improved over mx04, still needs some work.

more to come, im sure.

5 People had this to say...

Gravatar

#2: Need it? Nope. There if you want it? Hell yeah.

More mx.core.View 411:

mx.core.View Love

Using a TextField in mx.core.View

Gravatar
  • rich
  • March 12th, 2006
  • 6:32 pm

yeah, i’ve actually referenced those links a few times already. you mean the init method is there if i need it, right?

Gravatar

Yeah buddy. Sometimes there is stuff you need inited before createChildren is run, or pre-set to a specific value… or a getter/setter needs to run… whatever. Just ensure you call super.init, and you good to go like the funky coma-deena!

Gravatar
  • Matt Bennett
  • April 3rd, 2006
  • 12:05 pm

Do you have to initialize border_mc somehow in order for it to show up? My component extends mx.core.View and I sort of expected it would just render with a border around it.

Thanks,
Matt.

Gravatar
  • rich
  • April 3rd, 2006
  • 1:34 pm

well i think the rectangular border is used for tab focus, when you tab to the component. im not sure about any initializing of it.

Want your say?

* Required fields. Your e-mail address will not be published on this site


You can use the following XHTML tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>