set maxheight dynamically for text layer maxing out at 300

  • Hello! I have a text layer that I'm creating dynamically. The layer's style has a maxheight of 200 which is respected but for certain types of text layers I would like to set the maxheight to 80% of the device height. When I try to do this dynamically, the max height I get is 300 not 900 in my case. How is it possible to change the maxheight to 900? I've also tried to set the maxheight in the style to 900 but the max it will go to is also 300. Am I missing something?


    Code
    <style type="text" name="textbox_style"  align="lefttop"    x="40"    y="0"    autowidth="false"    autoheight="true"    maxheight="900"    bgborder="0"    bgcolor="0x000000"    bgalpha=".75"    bgcapture="true"    handcursor="false"    alpha="0"    zorder="13"    interactivecontent="true"    visible="false"  />

    and here's the function:

    Code
    <!-- set up textboxes -->  <action name="setup_textbox" scope="local" args="hotspotname, parenttype">    <!-- assign layername -->    if (get(parenttype) == 'l',      txtadd(layername, 'tombstone_', get(hotspotname));    ,      txtadd(layername, get(hotspotname));    );
        if (layer[get(layername)].visible == true,      <!-- no need to create a new text box if it's already there -->    ,      <!-- remove all text boxes and create a new one -->      removeall_textboxes();      <!-- add text box with style -->      addlayer(get(layername));      assignstyle(layer[get(layername)],'textbox_style');      <!-- add text content -->      set(textlayer, get(layername));      set(textcontent, get(data[get(textlayer)].content));      txtadd(layer[get(layername)].onloaded, 'add_html_text("', get(textcontent),'")');            <!-- set up text box parent, width, placement -->      if(stagewidth LT 500,         set(layer[get(layername)].parent, );        set(layer[get(layername)].width, calc(stagewidth));        set(layer[get(layername)].x, 0);      ,         if (get(parenttype) == 'h',          txtadd(layer[get(layername)].parent, 'hotspot[', get(layername), ']');          change_align(get(layername));                    ,          txtreplace(tombstone_parent, layername, 'tombstone_', 'infoicon_');          txtadd(layer[get(layername)].parent, 'layer[', get(tombstone_parent), ']');          set(layer[get(layername)].maxheight, 900);                  );        set(layer[get(layername)].width, 400);        set(layer[get(layername)].x, 40);      );    );    <!-- show layer -->    tween_layer(get(layername));  </action>

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!