# Attaching Objects & Error Messages

**URL:** <https://forum.kirupa.com/t/attaching-objects-error-messages/254777>\
**Category:** flash\
**Created:** [March 15, 2008, 6:46am UTC](https://forum.kirupa.com/t/attaching-objects-error-messages/254777 "2008-03-15T06:46:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![The1nternet](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@The1nternet](https://forum.kirupa.com/u/The1nternet)\
**Post date:** [March 15, 2008, 6:46am UTC](https://forum.kirupa.com/t/attaching-objects-error-messages/254777/1 "2008-03-15T06:46:51Z")

</div>

Hi,

I’m very new to AS3 and I had a couple of questions.

1. Is there a way to attach an object of the :Object() class to a MovieClip? In AS2, if you used the attachMovie method, you could attach an init Object to a movie clip and I’m wondering if there’s any way to store an object of the Object class inside of a MovieClip so that I can store data associated with that movie clip, inside of the movie clip itself. The only way I can figure out to do anything similar to this right now is to create an array of all the objects and give each of the movieclips an indexable name that I can associate with the items of the array, so the objects aren’t actually contained in the movie clip itself, but in a seperate array. You cannot use the addChild method to a non-display object and the Object class is not a display object so I cannot attach it to a movieclip using this method.

2. How do you get detailed error messages in the Flash IDE? Right now, everytime I get an error, it will just say something like “A property is undefined” or “cannot access properties of a null object reference” but it does not give me any line numbers to let me know what line of code the program is having trouble with. How do I get line numbers or anything more detailed in the error messages?

If anyone could please provide me some help with either of these issues, I’d be very thankful.

Thanks,

TheInternet.
