# Rookie question... get the name of an Object

**URL:** <https://forum.kirupa.com/t/rookie-question-get-the-name-of-an-object/305255>\
**Category:** Uncategorized\
**Created:** [February 22, 2010, 1:08pm UTC](https://forum.kirupa.com/t/rookie-question-get-the-name-of-an-object/305255 "2010-02-22T13:08:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo75](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@Leo75](https://forum.kirupa.com/u/Leo75)\
**Post date:** [February 22, 2010, 1:08pm UTC](https://forum.kirupa.com/t/rookie-question-get-the-name-of-an-object/305255/1 "2010-02-22T13:08:34Z")

</div>

[FONT=Times New Roman][SIZE=3]Hi there![/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3]I am VERY new to AS3 so i guess this is quite a rookie question.[/SIZE][/FONT]

[FONT=Times New Roman][SIZE=3]I am trying to display using a trace statement the name of the object that I have my mouse over.[/SIZE][/FONT]

[FONT=Times New Roman][SIZE=3]Tried several approaches but no success so far.[/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3]Just check the code, the line where there is a HERE.[/SIZE][/FONT]

[FONT=Times New Roman][SIZE=3]Thanks.[/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3]Cheers.[/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3]Leo.[/SIZE][/FONT]

```auto

[FONT=Times New Roman][SIZE=3]package {[/SIZE][/FONT]
 
[FONT=Times New Roman][SIZE=3] import flash.display.MovieClip;[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] import flash.events.MouseEvent;[/SIZE][/FONT]
 
[FONT=Times New Roman][SIZE=3] public class My_test extends MovieClip {[/SIZE][/FONT]
 
[FONT=Times New Roman][SIZE=3] public function My_test() [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] {[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] mc_the_mcs.addEventListener(MouseEvent.MOUSE_OVER, onOver);[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] mc_the_mcs.addEventListener(MouseEvent.MOUSE_OUT, onOut);[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] //folder_group.mouseChildren = false;[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] }[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] private function onOver(evt:MouseEvent):void [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] {[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] trace("over now");[/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman] trace(this.Object._name); [/FONT][FONT=Wingdings][FONT=Wingdings]ß [/FONT][/FONT][FONT=Times New Roman]Here.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] evt.target.alpha = 0.5;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] }[/FONT][/SIZE]
 
[SIZE=3][FONT=Times New Roman] private function onOut(evt:MouseEvent):void [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] evt.target.alpha = 1;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] }[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] }[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]}[/FONT][/SIZE]
 

```
