|
-
tweenEvent / mouseEnabled error 1046 problems
I'm having a problem enabling a series of buttons by creating a function that occurs after a mouse/tween event and I keep getting 1046 errors as a result and can't find a proper solution. Here's my event:
function slide_right(e:MouseEvent):void
{
// Tween out the active slide
var galleryXTweenOut:Tween = new Tween(slides[showingIndex], "x", Strong.easeInOut, endX, -beginX, tweenDuration, true);
// Increment counter
showingIndex++;
// If the counter reaches the end of the slides then reset it to 0
if(showingIndex >= slides.length) navigateToURL(new URLRequest("packaging.html"), '_self');
// Tween in the next slide
var galleryXTweenIn:Tween = new Tween(slides[showingIndex], "x", Strong.easeInOut, beginX, endX, tweenDuration, true);
// Disable Buttons from working
rightArrow.mouseEnabled = false;
leftArrow.mouseEnabled = false;
}
OK, that function works. So now once this is all complete, I want to enable the buttons again so they work. My function is:
function enableButtons(e:TweenEvent):void {
rightArrow.mouseEnabled = true;
leftArrow.mouseEnabled = true;
}
galleryXTweenOut.addEventListener(TweenEvent.MOTIO N_FINISH, enableButtons);
And that brings up the 1046 error. Since there's no such thing as MouseEvent.COMPLETE, is there a proper fix to this?
Adam Bell
[email protected]
--
Over 90% of all websites
suck......
Join the minority.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|