A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: TypeError: Error #1010: A term is undefined and has no properties.

Threaded View

  1. #1
    Junior Member
    Join Date
    Dec 2008
    Posts
    5

    Unhappy TypeError: Error #1010: A term is undefined and has no properties.

    Please help, I'm an actionscript noob.

    I have been getting the following error message with my code:
    TypeError: Error #1010: A term is undefined and has no properties.

    When I rollover the movieclip one or two the error occurs. Here is my code:

    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import flash.display.DisplayObject;

    var StateArray:Array = [one, two];

    for (var i:int=0;i<2;i++)
    {
    StateArray[i].addEventListener( MouseEvent.ROLL_OUT, mouseCall );
    StateArray[i].addEventListener( MouseEvent.ROLL_OVER, mouseCall );
    StateArray[i].addEventListener( MouseEvent.CLICK, mouseCall );
    StateArray[i].buttonMode = true;

    trace(StateArray[i]);

    function mouseCall( event:MouseEvent ):void
    {

    switch( event.type )
    {
    case MouseEvent.ROLL_OVER:
    new Tween(StateArray[i], "scaleX", Strong.easeOut, StateArray[i].scaleX, 1.1, .50, true );
    new Tween(StateArray[i], "scaleY", Strong.easeOut, StateArray[i].scaleY, 1.1, .50, true );
    addChild(StateArray[i]);
    break;

    case MouseEvent.ROLL_OUT:
    new Tween(StateArray[i], "scaleX", Strong.easeOut, StateArray[i].scaleX, 1.0, .50, true );
    new Tween(StateArray[i], "scaleY", Strong.easeOut, StateArray[i].scaleY, 1.0, .50, true );
    break;

    case MouseEvent.CLICK :
    //targetFrame = event.target.name;
    removeChild(StateArray[i]);
    gotoAndStop(2);
    break;
    }
    }}

    Any help would be greatly appreciated
    Last edited by nordberg60; 09-04-2010 at 11:34 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center