# Strange tweener troubles

**URL:** <https://forum.kirupa.com/t/strange-tweener-troubles/315964>\
**Category:** Uncategorized\
**Created:** [November 8, 2010, 10:35pm UTC](https://forum.kirupa.com/t/strange-tweener-troubles/315964 "2010-11-08T22:35:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![songsforsilence](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@songsforsilence](https://forum.kirupa.com/u/songsforsilence)\
**Post date:** [November 8, 2010, 10:35pm UTC](https://forum.kirupa.com/t/strange-tweener-troubles/315964/1 "2010-11-08T22:35:08Z")

</div>

Hi all! Great forums here, really have helped me out of a few jams -and more I am hoping.

I am trying to create a hidden, rollover menu, in a gallery type setting. Once triggered, the ‘thumbnail’ menu, animates up and exposes said thumbnails that I will have wired up using XML. I have a few external .As files going on as well but the error didn’t reference those files. They are too large to upload with this post.

I have hit a roadblock and fairly new to AS3. I’m pretty sure I’m doing something simple wrong, but I can’t for the life of me figure it out.

I’m thinking the problem is with my addThumbs(); function, since that’s what the output window is telling me. Before this new batch of errors, my Sprite was the source of several, strange errors. The plan was to create a ‘container’ to hold all of my thumbnails, then manipulate that containers alpha or presence vs several individual thumbnails. I’m getting lost!

My frame 1 fla code:  
import caurina.transitions.Tweener;  
import caurina.transitions.properties.DisplayShortcuts;  
DisplayShortcuts.init();  
nav\_button.buttonMode=true;

nav\_button.addEventListener(MouseEvent.ROLL\_OVER,portRollOver);  
nav\_button.addEventListener(MouseEvent.ROLL\_OUT,portRollOut);

function portRollOut(e:MouseEvent):void {  
Tweener.addTween(nav\_button.menuArea,{height:0,alpha:0,delay:2,time:0 .75,transition:‘linear’});  
Tweener.addTween(nav\_button.ball,{y:0,delay:2,time:0.75,transition:‘l inear’});  
Tweener.addTween(nav\_button.menuMask, {height:15, delay:2, time:0.75, transition:‘linear’});  
}  
function portRollOver(e:MouseEvent):void {  
/_if (e.type == MouseEvent.MOUSE\_OVER) {  
}  
else {}_/  
Tweener.addTween(nav\_button.menuArea,{height:60,alpha:1,time:1,transi tion:‘linear’,onComplete:addThumbs});  
Tweener.addTween(nav\_button.menuMask, {height:nav\_button.menuMask.height +=60, time:.25, transition:‘linear’});  
Tweener.addTween(nav\_button.ball, {y:60, time:1, transition:‘linear’});  
}

function addThumbs():void {  
var thumbHolder = new Sprite();  
thumbHolder.graphics.lineStyle(0,0x00ff00);  
thumbHolder.graphics.beginFill(0x0000FF);  
thumbHolder.graphics.drawRect(5,595,860,50);  
thumbHolder.graphics.endFill();  
thumbHolder.alpha = 0;  
addChild(thumbHolder);

```
var thumb:MasterThumb = new MasterThumb();// tied to a library item with 2 frames
thumb.x = 10;
thumb.y = 550;
thumb.alpha=0;
nav_button.menuArea.thumbHolder.addChild(thumb);
Tweener.addTween(nav_button.menuArea.thumbHolder.thumb, {alpha:1, time:0.5});

```

}

–A friend of mine who codes suggested adding a required parameter to the addThumbs and see if that fixed my problem. So, it changed to:function addThumbs(val = 1):void {…}. I then altered the tweener line referencing the function to addThumbs(1). That threw me a new set of errors:  
TypeError: Error #1010: A term is undefined and has no properties.  
at GrassRoots/addThumbs()[GrassRoots::frame1:36]  
at GrassRoots/portRollOver()[GrassRoots::frame1:18]

I removed the “patch” code and left it as it originally appears.–

Output:## [Tweener] Error: [object ThumbMenuBG\_4] raised an error while executing the 'onComplete’handler.  
TypeError: Error #1010: A term is undefined and has no properties.  
at GrassRoots/addThumbs()  
at Function/[http://adobe.com/AS3/2006/builtin::apply()](http://adobe.com/AS3/2006/builtin::apply())  
at caurina.transitions::Tweener$/updateTweenByIndex()  
at caurina.transitions::Tweener$/updateTweens()  
at caurina.transitions::Tweener$/onEnterFrame()

Can anyone shed some light? I feel like there needs to be a course just in flash output errors!

Jess
