Hi,
I’m getting an Error #1009 and I’m not sure how to fix it:
// Importing classes from fl package must be done explicitly
stop();
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.filters.BlurFilter;
import fl.transitions.*;
import fl.motion.Color;
// Designate the home position of the sliding panel. This is the location on the stage when the panel is closed.
var ptPanelHome:Point = new Point(2, 254);
// Initially set the y position of the bottom bar to reflect that the panel is closed.
mcBottomBar.y = 254;
// Put the panel in its starting (closed) position.
mcBottomBar.x = ptPanelHome.x;
mcBottomBar.y = ptPanelHome.y;
/* This is an array of the five buttons that are within the movieclip mcBottomBar*/
var btnArray:Array = new Array(mcBottomBar.webSlideBar, mcBottomBar.threeSlideBar, mcBottomBar.photoSlideBar, mcBottomBar.aboutSlideBar, mcBottomBar.resumeSlideBar);
/* There are two variables declared for tweens on the top and bottom bars that will be animated. When the panels are closed
(or in the starting y position), a new tween is constructed moves the panel from their starting points.
mcBottomBar moves to a point 270 px down the stage, while mcTopBar moves to a point 140 px up the stage.
If the panel not in starting y position the actions are reversed.
*/
function onMouseClick (event:MouseEvent):void {
var twSlideBottom:Tween;
var twSlideTop:Tween;
if (mcBottomBar.y <= 254) {
twSlideBottom = new Tween(mcBottomBar, "y", Back.easeOut, ptPanelHome.y, ptPanelHome.y + 270, 20);
twSlideTop = new Tween(mcTopBar, "y", Back.easeOut, ptPanelHome.y, ptPanelHome.y - 140, 20);
}
if(parent != null)
{
trace("parent.parent is " + parent.parent);
}
if (event.target == mcBottomBar.webSlideBar){gotoAndStop(3);}
if (event.target == mcBottomBar.threeSlideBar){gotoAndStop(4);}
if (event.target == mcBottomBar.photoSlideBar){
gotoAndStop(5);
}
if (event.target == mcBottomBar.aboutSlideBar)
{
scrollbar.alpha = 1;
}
if (event.target == mcBottomBar.resumeSlideBar){gotoAndStop(7);}
if (woodAnime_mc.wood_mc001.x <= 0) {
var myTween:Tween = new Tween(woodAnime_mc.wood_mc001, "x", Bounce.easeOut, woodAnime_mc.wood_mc001.x, woodAnime_mc.wood_mc001.x + 617, 4, false);
var myTween2:Tween = new Tween(woodAnime_mc.wood_mc002, "x", Bounce.easeOut, woodAnime_mc.wood_mc002.x, woodAnime_mc.wood_mc002.x + 617, 5, false);
var myTween3:Tween = new Tween(woodAnime_mc.wood_mc003, "x", Bounce.easeOut, woodAnime_mc.wood_mc003.x, woodAnime_mc.wood_mc003.x + 617, 6, false);
var myTween4:Tween = new Tween(woodAnime_mc.wood_mc004, "x", Bounce.easeOut, woodAnime_mc.wood_mc004.x, woodAnime_mc.wood_mc004.x + 617, 7, false);
var myTween5:Tween = new Tween(woodAnime_mc.wood_mc005, "x", Bounce.easeOut, woodAnime_mc.wood_mc005.x, woodAnime_mc.wood_mc005.x + 617, 8, false);
var myTween6:Tween = new Tween(woodAnime_mc.wood_mc006, "x", Bounce.easeOut, woodAnime_mc.wood_mc006.x, woodAnime_mc.wood_mc006.x + 617, 9, false);
var myTween7:Tween = new Tween(woodAnime_mc.wood_mc007, "x", Bounce.easeOut, woodAnime_mc.wood_mc007.x, woodAnime_mc.wood_mc007.x + 617, 10, false);
var myTween8:Tween = new Tween(woodAnime_mc.wood_mc008, "x", Bounce.easeOut, woodAnime_mc.wood_mc008.x, woodAnime_mc.wood_mc008.x + 617, 11, false);
}
myTween8.addEventListener(TweenEvent.MOTION_FINISH, finishHandler);
}
var filterArr:Array = [new BlurFilter(4,4,BitmapFilterQuality.MEDIUM)];
//var grow:Tween;
function onMouseOver (event:MouseEvent):void {
event.target.filters = filterArr;
//trace("parent.parent is " + parent.parent);
//trace("It's a hover!");
}
function onMouseOut (event:MouseEvent):void {
event.target.filters = null;
}
/* This for-loop adds event listeners to every instance in the array. One event listener is for when the mouse is clicked on a button
The other event listener is for when the mouse is hovered over a button*/
for (var i: int = 0; i< btnArray.length; i++){
btnArray*.addEventListener(MouseEvent.CLICK, onMouseClick);
btnArray*.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
btnArray*.addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
btnArray*.buttonMode = true;
}
/* ---------------------------------------------------- */
//var woodArray:Array = [woodAnime_mc.wood_mc001, woodAnime_mc.wood_mc002, woodAnime_mc.wood_mc003, woodAnime_mc.wood_mc004, woodAnime_mc.wood_mc005, woodAnime_mc.wood_mc006, woodAnime_mc.wood_mc007, woodAnime_mc.wood_mc008];
function finishHandler(event:TweenEvent):void
{
// place blur here so that it only blurs after the motion
var blur:BlurFilter = new BlurFilter()
blur.blurX = 2
blur.blurY = 3.5
blur.quality = BitmapFilterQuality.LOW
woodAnime_mc.filters = [blur]
trace("MOTION_FINISH time = "+event.time);
}
Here’s the source code: http://www.landlmemories.com/portfolio001.fla
Any help would be appreciated!