# Action Script Error Expected a field name after '.' operator. Please Help!

**URL:** <https://forum.kirupa.com/t/action-script-error-expected-a-field-name-after-operator-please-help/634196>\
**Category:** flash\
**Created:** [January 28, 2016, 4:11am UTC](https://forum.kirupa.com/t/action-script-error-expected-a-field-name-after-operator-please-help/634196 "2016-01-28T04:11:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![whipid20](https://avatars.discourse-cdn.com/v4/letter/w/e19adc/32.png) [@whipid20](https://forum.kirupa.com/u/whipid20)\
**Post date:** [January 28, 2016, 4:11am UTC](https://forum.kirupa.com/t/action-script-error-expected-a-field-name-after-operator-please-help/634196/1 "2016-01-28T04:11:26Z")

</div>

I’m close to getting this done, but there are two errors, and I don’t know very much about Flash Action Script coding tbh. I’ve been watching tutorials and such. Anyways, I have two lines of error in my code here.

importfl.transitions.Tween;  
importfl.transitions.easing;

function animateme (event:MouseEvent) {

highlight.visible=true;  
highlight.gotoAndPlay(1)  
//Function that reports mouse coordinates  
function reportStageMouse(event:MouseEvent) {

```
var myStageX:Number=Math.round(event.stageX);
var myStageY:Number=Math.round(event.stageY);

var xTween:Tween=new Tween(highlight."x",Strong.easeOut,highlight.x,myStageX,1,true);
var yTween:Tween=new Tween(highlight."y",Strong.easeOut,highlight.y,myStageY,1,true);

```

stage.addEventListener(MouseEvent.MOUSE\_MOVE,reportStageMouse);

highlight.addEventListener(MouseEvent.ROLL\_OVER,animateme);

ERRORS!

Scene=Scene 1, Layer=Actions 3.0, Frame=1: Line 14: Expected a field name after ‘.’ operator.  
var xTween:Tween=new Tween(highlight.“x”,Strong.easeOut,highlight.x,myStageX,1,true);

Scene=Scene 1, Layer=Actions 3.0, Frame=1: Line 15: Expected a field name after ‘.’ operator.  
var yTween:Tween=new Tween(highlight.“y”,Strong.easeOut,highlight.y,myStageY,1,true);

Any help would be appreciated, thanks a lot!

---

<div class="post-metadata">

**Author:** ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)\
**Post date:** [January 28, 2016, 5:05am UTC](https://forum.kirupa.com/t/action-script-error-expected-a-field-name-after-operator-please-help/634196/2 "2016-01-28T05:05:54Z")

</div>

You want `highlight, "y"` not `highlight."y"`.

---

<div class="post-metadata">

**Author:** ![whipid20](https://avatars.discourse-cdn.com/v4/letter/w/e19adc/32.png) [@whipid20](https://forum.kirupa.com/u/whipid20)\
**Post date:** [January 28, 2016, 5:53am UTC](https://forum.kirupa.com/t/action-script-error-expected-a-field-name-after-operator-please-help/634196/3 "2016-01-28T05:53:12Z")

</div>

Hey, thanks. That seemed to take care of the one error. I added these voids in because a bunch more came up if I didn’t. Just what the tutorial said to do, but now I get a couple more errors here.

Scene=Scene 1, Layer=Actions 3.0, Frame=1: Line 4: ‘{’ expected  
function animateme (event:MouseEvent):void {

Scene=Scene 1, Layer=Actions 3.0, Frame=1: Line 9: ‘{’ expected  
function reportStageMouse(event:MouseEvent):void {

Not sure if I understand this. W/o the :void on each line, it brings up like 4 or 5 different errors. The tutorial says to put the :void in each line, but with it I get that ☹ Thanks for helping!
