I tracked down the underlying bug in http://jira.openlaszlo.org/jira/browse/LPP-4050. This is a swf-only bug in LzSprite.as with nested views (I think in attachBackgroundToChild). Do you have any ideas on this?

If you set bgcolor in oninit, the layout is incorrect. This example should show two 100x100 blocks next to each other. In swf the spacing is wrong:

<canvas debug="true" >
  <simplelayout axis="x" spacing="20" />

  <view name="foo" >
    <view width="100" height="100">
      <method event="oninit">
        this.setAttribute( "bgcolor", 0xaaaaaa );
      </method>
    </view>
  </view>

  <view width="100" height="100" bgcolor="red" />
</canvas>


If you modify the above example to set bgcolor in the view the layout is correct:


<canvas debug="true" >
  <simplelayout axis="x" spacing="20" />

  <view name="foo" >
    <view width="100" height="100" bgcolor="blue">
      <method event="oninit">
        this.setAttribute( "bgcolor", 0xaaaaaa );
      </method>
    </view>
  </view>

  <view width="100" height="100" bgcolor="red" />
</canvas>



Thanks!

Phil


Reply via email to