Knowledge Base |
Accordion (Tree) Menu V3
(views: 20450)
Accordion Menu V3 and Accordion Tree Menu V3 are xml flash accordion menus featuring customized states, customized transitions and tweens. Here are all known issues for Accordion Menu V3 and Accordion Tree Menu V3, they should be similar, since basically it is the same component. If you have any questions that you think we should discuss here please let us know.
Keep the Accordion (Tree) Menu V3 vertically aligned
(2007-10-11 - views: 5597)
Q: Can I keep the Accordion Tree Menu V3 vertically aligned on my stage?
A: Yes you can. Below is the actionscrip that is doing the job.
var lis={}
lis.onDraw=function(){
arrange()
}
lis.onChange=function(item){
arrange()
}
acc.addEventListener("onChange",lis)
acc.addEventListener("onDraw",lis)
//function for arranging the accordion's position
function arrange(){
var finV=Stage.height/2-acc.height/2
moveMe(acc,finV,20)
}
function moveMe(a, param, t):Void {
var tween = new mx.transitions.Tween(a, "prop", mx.transitions.easing.Strong.easeOut, a._y, param, t, false);
//we make the tween onMotionChange so we cand round the tween's values for a smooth tween
tween.onMotionChanged=function(){
a._y=Math.round(tween.position)
}
}
Files: verticalAlign.zip
var lis={}
lis.onDraw=function(){
arrange()
}
lis.onChange=function(item){
arrange()
}
acc.addEventListener("onChange",lis)
acc.addEventListener("onDraw",lis)
//function for arranging the accordion's position
function arrange(){
var finV=Stage.height/2-acc.height/2
moveMe(acc,finV,20)
}
function moveMe(a, param, t):Void {
var tween = new mx.transitions.Tween(a, "prop", mx.transitions.easing.Strong.easeOut, a._y, param, t, false);
//we make the tween onMotionChange so we cand round the tween's values for a smooth tween
tween.onMotionChanged=function(){
a._y=Math.round(tween.position)
}
}
Files: verticalAlign.zip
Login to post your comment



