dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Aligning text in the Text Button

  1. #1
    Senior Member
    Join Date
    Apr 2004
    Location
    Los Angeles
    Posts
    198

    Aligning text in the Text Button

    I would like to align text within a text button to align left. Can this be done - and if so how? Also I would like to make each text button the same size.

    Regards,

    Rick
    Last edited by rblanc; 03-21-2005 at 04:45 PM.

  2. #2
    Ride 'em FISHY! neederofhelp's Avatar
    Join Date
    Oct 2003
    Location
    I Forgot!
    Posts
    217

    menu

    I'm not completely sure I understand you problem, but let me see if I can help anyway.

    Alright, instead of creating text button, try creating a "Menu." The interface is pretty much the same and it will align you buttons so they are all horizontal or vertical from each other and the same size.

    Maybe, you can have the button insert an html tag
    PHP Code:
    <p align="left">something</p
    to align the text left. I'll work on this more to see if I can figure out a better way.
    Dan

    Oops. I broke it.... again.

  3. #3
    Senior Member
    Join Date
    Apr 2004
    Location
    Los Angeles
    Posts
    198
    Hi Dan,

    Topic: Text Button

    The problem lies within the text inside of the text button. By default it is align= center. Buttons also grow automatcally with the text.

    From your answer I can say that "Text Button" only allows for alignment= center and the button automatically grows with the amount of text.

    However the "Menu" object allows for alignment adjustment.

    I am curious, if the Text Button and Menu object are similar - why do they seem to duplicate each other? The Menu object seems to have more control features than that of the Text Button.

    Thank you for replying Dan,

    Rick
    Last edited by rblanc; 03-22-2005 at 04:54 PM.

  4. #4
    Ride 'em FISHY! neederofhelp's Avatar
    Join Date
    Oct 2003
    Location
    I Forgot!
    Posts
    217

    A little confused now...

    I'm still a little confused about your question...

    Are you trying to get all the text in the menu to be aligned to the left? There's a formatting option in the menu editor that allows you to do so:



    It will change the alignment of the text. (You can also change font, size, color, style of text here.)

    Basically, the menu is just a series of text buttons but it is a quick and easy way make the buttons all look the exact same and be nicely aligned with each other.

    Did I get it that time?
    Dan

    Oops. I broke it.... again.

  5. #5
    Senior Member
    Join Date
    Apr 2004
    Location
    Los Angeles
    Posts
    198
    Hi Dan,

    Yes you've got it this time, I was trying to understand why is there a "Text Button" object where the Menu object is a better choice. The Text Button seems less powerful than the Menu object.

    Thank you again for ********ing things and creating those screen captures.

    Rick

  6. #6
    Ride 'em FISHY! neederofhelp's Avatar
    Join Date
    Oct 2003
    Location
    I Forgot!
    Posts
    217
    Rick,

    No problem. As for your question, my theory on the subject is this:

    3DFA created the Text Button which is pretty much the same thing as the menu if you wanted to create one button really quickly. I find it extremely useful when I am just testing scripts or events. I don't have to design a button, it justs throws one together for me.
    Dan

    Oops. I broke it.... again.

  7. #7
    Senior Member
    Join Date
    Apr 2004
    Location
    Los Angeles
    Posts
    198
    Dan,

    My experiments show that the Menu object also serves the same function - quick and easy button production. Knowing this, I will never go to the Text Button object again. If you use the Text Button object, you are stuck with no ablility to re-configure. Now why would anyone want to use the Text Button object after knowing this?

    Rick
    Last edited by rblanc; 03-22-2005 at 11:04 PM.

  8. #8
    Ride 'em FISHY! neederofhelp's Avatar
    Join Date
    Oct 2003
    Location
    I Forgot!
    Posts
    217
    Yes you are right. Perhaps it is merely a mental option. If a person doesn't want a menu, they just want one button. But I totally agree with you.
    Dan

    Oops. I broke it.... again.

  9. #9
    Senior Member
    Join Date
    Nov 2003
    Location
    Coimbra - Portugal
    Posts
    139

    my way

    Hi
    If help someone
    A)
    1 - i'm not an expert
    2 - this is based only in my experience
    3 - create a button element
    4 - edit button
    5 - create a rectangle element
    6 - create a edit box
    7 - edit edit box and put align left
    8 - if you want copy for other states
    9 - change names, btn_1, paint_1, edt_1
    10 - copy button element and paste
    11 - rename, btn_2, paint_2, edt_2
    12 - the same routine for other buttons
    (see attached file)
    B)
    1 - points 1 to 8 of A)
    2 - clone button and position clones dinamically, as well asign them caption and variables, if you want.
    (see tree menu zip file on forum)
    Cheers
    Rui
    Last edited by rui_eduardo; 09-29-2008 at 11:30 AM.

  10. #10
    Senior Member
    Join Date
    Apr 2004
    Location
    Los Angeles
    Posts
    198

    Great help - thanks

    Hi Rui,

    Wonderful!

    Thank you for all of your work and providing a mini tutorial. I now understand that using the Button and Text Box objects together you can get uniform text alignment and button size results.

    The download link does not work.

    Best regards,

    Rick

  11. #11
    Senior Member
    Join Date
    Nov 2003
    Location
    Coimbra - Portugal
    Posts
    139

    tree menu zip

    Hi Rick

    I have no more time today, but next days i'll attach the tree menu zip file.

    Cheers
    Rui

  12. #12
    Senior Member
    Join Date
    Apr 2004
    Location
    Los Angeles
    Posts
    198
    Thanks Rui

    Great, I will be waiting for that. Can we create an new thread for this? Call it "Creating a tree menu tutorial" When I learn how to create this tree menu, I can create a movie like Brit.

    Rick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center