Josh Sager Media: Creative Technologies Blog

Josh Sager Media: Creative Technologies Blog
Creative Technologies Blog
Home | Portfolio |Blog | Presentations | music | About

Actionscript 3.0: TextField in a MovieClip Target Issue

The Problem
Targeting a MovieClip when a dynamic text box is the only thing in the movie clip.

  1. trace(e.target.name);
  2. //outputs the text box name and not the movie clip name

The Solution
Target the parent. Technically the dynamic text box is a child of the MovieClip.

  1. trace(e.target.parent.name)
  2. // outputs the movie clip name

In Action

download the source file

Tags: , , , ,

Leave a Reply