# Returning scaleX on movieclip

**URL:** <https://forum.kirupa.com/t/returning-scalex-on-movieclip/258581>\
**Category:** flash\
**Created:** [April 25, 2008, 1:04pm UTC](https://forum.kirupa.com/t/returning-scalex-on-movieclip/258581 "2008-04-25T13:04:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivaretro](https://avatars.discourse-cdn.com/v4/letter/v/a3d4f5/32.png) [@vivaretro](https://forum.kirupa.com/u/vivaretro)\
**Post date:** [April 25, 2008, 1:04pm UTC](https://forum.kirupa.com/t/returning-scalex-on-movieclip/258581/1 "2008-04-25T13:04:02Z")

</div>

I have a fla file with movieClips representing state counties. I have it so if you click  
on a county it will trace that countie’s name. Problem is I also want to trace it’s current  
scale but I get the following error instead:

County selected is Umatilla  
ReferenceError: Error #1069: Property scaleX not found on String and there is no default value.  
at County/selectedCounty()

Here is the code:

// main county

package  
{  
import fl.transitions.Tween;  
import fl.transitions.TweenEvent;  
import fl.transitions.easing._;  
import flash.text.TextField;  
import flash.text.TextFormat;  
import flash.text.Font;  
import flash.display.Sprite;  
import flash.utils._;  
import flash.display.MovieClip;  
import flash.events.MouseEvent;  
import flash.events.Event;

```
public class County extends MovieClip // what extends means is that in addition to all the below properties and methods you're also 
                                       // adding the methods of movieclips
                                       // County adds the properties of movieclips plus a mouseclick listener and a return of the name of the selected county?
{

    // this event listener had to be within its own function to work
    // this is a constructor
    // this is a method too
    // this is a constructor because its named after the class
    public function County()
    {
        addEventListener(MouseEvent.CLICK , selectedCounty); // if the mouuse is clicked it calls the next function below which returns the name of the 
                                                             // selected movieclip county.
                                                         
                                                             
                                                             
    }
   
   // this is also a method
    private function selectedCounty(event:MouseEvent):void
    {
        trace("County selected is " + this.Name()); // this calls upon the next function which gets the qualified class name of the movieclip
        var currentCounty = this.Name(); 
        trace (currentCounty.scaleX);
        
        
    }
    
    // another method of course
    // this function returns name of the county 
    public function Name()
    {
        
        return getQualifiedClassName(this); // puts the countie's name in the Name variable?
      
    }
    
    
    
}

```

}

// you can put functions and call such functions here as well
