Hello, I have been trying to solve this for a week now, sadly to no avail. I need to change the box format that this code puts my buttons into. I would like it just to be one line of buttons.
//////// Code:
fm_button.visible = false;
import caurina.transitions.Tweener;
var menu_label:Array = new Array(“Media”, “Shop”, “Team”, “Events”, “News”, “Contact” );
var total:Number = menu_label.length;
var i:Number = 0;
var j:Number = 0;
var page:Number;
var main_menu:MovieClip = new MovieClip();
var box_group:MovieClip = new MovieClip();
stage.addChild(main_menu);
stage.addChild(box_group);
for( i = 0; i < total; i++ )
{
var btn = new flashmo_button();
btn.name = “flashmo_btn” + i;
btn.x = -400; //Have tried to change to: btn.x = i * 100 + 15;
btn.flashmo_click_area.addEventListener( Event.ENTER_FRAME, btn_enter );
btn.flashmo_click_area.addEventListener( MouseEvent.ROLL_OVER, btn_over );
btn.flashmo_click_area.addEventListener( MouseEvent.ROLL_OUT, btn_out );
btn.flashmo_click_area.addEventListener( MouseEvent.CLICK, btn_click );
var each_substring:Array = menu_label*.split("|");
btn.flashmo_button_label.fm_label.text = each_substring[0];
btn.item_url = each_substring[1];
btn.item_no = i;
btn.flashmo_icon.gotoAndStop( i + 1 );
main_menu.addChild(btn);
}
function btn_over(e:MouseEvent):void
{
e.target.parent.over = true;
}
function btn_out(e:MouseEvent):void
{
e.target.parent.over = false;
}
function btn_click(e:MouseEvent):void
{
var mc = e.target.parent;
if( mc.item_url != undefined )
navigateToURL( new URLRequest( mc.item_url ), "_parent" );
else
change_page(mc.item_no);
}
function btn_enter(e:Event):void
{
var mc = e.target.parent;
if( mc.over == true )
mc.nextFrame();
else
mc.prevFrame();
}
function change_page(no:Number):void
{
page = no + 1;
play();
}
for( i = 0; i < 40; i++ )
{
var box = new flashmo_box();
box.name = “flashmo_box” + i;
box.alpha = 0;
box_group.addChild(box);
}
///////// End Code
I have tried to change the btn.x to btn.x = i * 100 + 15; which put a second menu up for 1 sec before it disappears and leaves me with the original. Any help would be greatly appreciated, Thanks for your time.