I have a few flash errors on my website. I started playing around with AS3 and created a list that expands when mouse is over and goes down when mouse is out. Kind of like a drop down menu. Problem is sometimes it acts really spastic. Anyone have any solutions?
Here is my website…
http://www.allencoded.com
Below it my code..
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
import flash.events.Event;
import flash.ui.Mouse;
import flash.net.URLRequest;
stop();
FeedBox.mouseChildren=false;
ProjectBox.mouseChildren=false;
//FeedBox Tween Stuff----------------------
var feedup:Tween = new Tween(FeedBox, "y", Strong.easeOut, 560, 290, 2, true);
var feeddown:Tween = new Tween(FeedBox, "y", Strong.easeOut, 290, 560, 2, true);
FeedBox.addEventListener(MouseEvent.MOUSE_OVER, mouseyOnFeed);
FeedBox.addEventListener(MouseEvent.MOUSE_OUT, mouseyOutBox);
function mouseyOnFeed(e:Event){
feedup.start();
}
function mouseyOutBox(e:Event){
feeddown.start();
}
//ProjectBox Tween stuff------------------------
var projectleft:Tween = new Tween(ProjectBox, "x", Strong.easeOut, 920, 565, 2, true);
var projectright:Tween = new Tween(ProjectBox, "x", Strong.easeOut, 565, 920, 2, true);
ProjectBox.addEventListener(MouseEvent.MOUSE_OVER, mouseyOnProj);
ProjectBox.addEventListener(MouseEvent.MOUSE_OUT, mouseyOutProj);
function mouseyOnProj(e:Event){
projectleft.start();
}
function mouseyOutProj(e:Event){
projectright.start();
}
//BLOG BUTTON
Blog.addEventListener(MouseEvent.CLICK, toBlog);
function toBlog(e:Event){
var blogaddy:URLRequest = new URLRequest("http://www.allencoded.com/blog");
navigateToURL(blogaddy);
}
i would prefer to remove events while tweening and onCompletes addEventListeners back. Btw out source tweeners performes better for tweenings.
Ask again if you need more information.