Advertisement

09.04.2008 at 11:07AM PDT, ID: 23703689 | Points: 500
[x]
Attachment Details

x position for first button

Asked by IDEASDesign in ActionScript, Macromedia Flash

Tags: , , ,

this is loading the buttons from right to left.  but the starting _x isn't using the first button, it's using the last.
my posBut needs to start the first button at something like "Stage.width - 20" so that i can always keep my first button there.  right now when i try it, it is using the last button to measure from, so you can't even see the other buttons since they are off screen.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
posBut = Math.round(Stage.width/2);
function init():Void {
    for (i=0; i<_parent.headerbar.menuArray.length; i++) {
        _parent.headerbar.mcButton.duplicateMovieClip("mcBut"+i, i);
        //_parent.headerbar["mcBut"+i]._x = Math.ceil(_parent.headerbar.posBut);
        _parent.headerbar["mcBut"+i]._x = Math.ceil(_parent.headerbar.posBut);
 
        _parent.headerbar["mcBut"+i].nr =(_parent.headerbar.menuArray.length-i)-1;
        _parent.headerbar["mcBut"+i].mcTxt.txt.htmlText = _parent.headerbar.menuArray[(_parent.headerbar.menuArray.length-i)-1].getMenuName;
 
 
        _parent.headerbar["mcBut"+i].mcTxt.setColor(_parent.headerbar.menuTextColor);
        val = 10*(_parent.headerbar["mcBut"+i].mcTxt.txt.textWidth+_parent.headerbar.butWidth);
        _parent.headerbar["mcBut"+i].mcBut._xscale = val;
        _parent.headerbar["mcBut"+i].mcBut._width = Math.ceil(_parent.headerbar["mcBut"+i].mcBut._width);
        //
        _parent.headerbar["mcBut"+i].mcTxt._x = Math.ceil((_parent.headerbar["mcBut"+i].mcBut._width-_parent.headerbar["mcBut"+i].mcTxt.txt.textWidth-10)/2);
        _parent.headerbar.posBut += Math.ceil(_parent.headerbar["mcBut"+i]._width);
        }
}//
[+][-]09.04.2008 at 03:09PM PDT, ID: 22393237

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.04.2008 at 03:23PM PDT, ID: 22393340

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.04.2008 at 03:31PM PDT, ID: 22393381

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.10.2008 at 11:54AM PDT, ID: 22441644

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.10.2008 at 02:13PM PDT, ID: 22443116

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.10.2008 at 11:15PM PDT, ID: 22446762

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 07:57AM PDT, ID: 22450603

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.15.2008 at 03:12PM PDT, ID: 22483407

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.15.2008 at 10:13PM PDT, ID: 22485091

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.16.2008 at 07:28AM PDT, ID: 22488722

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 12:52AM PDT, ID: 22496381

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628