# Class files and accessing functions in them

**URL:** https://forum.kirupa.com/t/class-files-and-accessing-functions-in-them/319041
**Category:** flash
**Created:** [February 7, 2011, 2:30pm UTC](https://forum.kirupa.com/t/class-files-and-accessing-functions-in-them/319041 "2011-02-07T14:30:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ArildRP](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@ArildRP](https://forum.kirupa.com/u/ArildRP)
#### Post date: [February 7, 2011, 2:30pm UTC](https://forum.kirupa.com/t/class-files-and-accessing-functions-in-them/319041/1 "2011-02-07T14:30:48Z")

</div>

Hi all this is my first post here, relly exited if i can get the help I need 🙂

Short description of my project:  
I’m making a “flash-car-damage-registration-program” where a user can click on a part of a car, make two choices (from two comboboxes) that describes the damage, and then save it in a datagrid withing flash.

I have split up the code in different class files:  
I have a damage.as class file that describes the damage and its properties.  
I have a carPart.as class file that extends the Movieclip class. This sets all the properties of each carpart and where the roll-over/out eventlisteners are, pluss som descriptive text to each carpart. This works the way I want it to. This is just to quickly give you an idea of what I’m working on.  
So to the real question or problem: I have a LoadMyXmlData.as class file where I load some xml data, this works fine. A function in this class takes a combobox and a xmllist as parameters. I want to populate the mentioned comboboxes from the xml data. Both comboboxes are on the stage within another movieclip, but I can seem to access them. (yes, they have instancenames etc) I get error 1120: ‘Access of undefined property’. I have tried ways like: ‘containingMc.comboboxMc’ and so forth but no luck. I have been searching the web for days for a solution to my problem, but nothing so far.

Am I doing this totally the wrong way? Isn’t this possible at all without ‘hacks’ or what I call workarounds?
