• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 138
  • Last Modified:

Creating MX2004 V2 Components - How do I access the width property in code?

I have created a MX2004 component which works really well.  

As a final touch, i would like to use the W (width) and H(height) properties from the component box in my code.  

How can I reference these properties in code?

This is a little urgent so i've put the points up a bit.
0
mt600
Asked:
mt600
  • 2
  • 2
1 Solution
 
negatyveCommented:
Is your component extending movieclip or UIObject?
0
 
mt600Author Commented:
it extends UIComponent
0
 
mt600Author Commented:
Thankyou

I believe I have spotted a glitch in v2 components.  Although I was using that coding, when i compiled my clip, the width variable then read as 0 (although in live preview and in my pre-compiled version, the width was read fine).  I'm not sure what I did, although i tidied a lot of code, but it's working now so thankyou.  

I needed someone to confirm it and an example so i knew i wasn't going mad.  Thanks again, just what the doctor ordered.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now