A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Dynamically expand flash using text tree menu

  1. #1
    Junior Member
    Join Date
    Jun 2010
    Posts
    7

    Dynamically expand flash using text tree menu

    Hi everyone! I'm creating my 2nd flash interface. It will display the graphic below:

    Focal-Review-Web-Diagram.gif

    When someone clicks a phase in the cycle, the graphic with fade out and a new window displays.

    Focal-Review---Web-Diagram_Ribbons.png

    I know how to do that much in flash. What I don't know is how to best organize the text in the pop-up. Specifically, when someone clicks the plus sign (look closely in the 2nd image to see an example of an expanded section), I want the space below the text to expand, showing more text and/or an image. When the user is done, they click the "X" to close the expanded section.

    It's basically a tree menu format. However, instead of just expanding a small phrase, it will expand to show an entire paragraph and/or images.

    Questions:
    1. What code should I use to do this? I'm guessing I can't just insert CSS / Javascript into flash, lol.
    2. Do I need to make my flash player window big enough to fit all the items, in case the user expands all sections and wants to see it all from a bird's-eye view?Or is there a way to dynamically increase the vertical size of the flash player to fit the expanded text? I like how HTML allows you to dynamically expand the vertical cell height, as more text is added.

    My due date is September 24th. If I can't have the ability to expand / hide sections, I'll just show the window with everything already expanded...or I'll just show it in a separate window inside the player.

  2. #2

  3. #3
    Member
    Join Date
    Aug 2012
    Posts
    55

  4. #4
    Junior Member
    Join Date
    Jun 2010
    Posts
    7
    Thanks for the quick reply. The ehow example isn't exactly what I'm looking for. When the item expands, i'd like it to move the text beneath it down and also expand the size of the background box color.

    I'll try the 2nd solution. I'm putting it here to keep it centralized:

    Yes, using autosize property:

    Try this sequence:





    var titleFormat:TextFormat = new TextFormat();
    titleFormat.bold = true;
    titleFormat.color = 0xFFFFFF;
    titleFormat.size = 14;

    var titleLabel:TextField = new TextField();
    titleLabel.defaultTextFormat = titleFormat;
    titleLabel.autosize = "left";
    titleLabel.label = data;
    addChild( titleLabel );

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