[Laszlo-dev] Bug loading resources dynamically with .lzx.swf file?

dhay at lexmark.com dhay at lexmark.com
Fri Nov 11 13:38:09 PST 2005


Hi,

I am stumped with a problem with displaying images dynamically with a
.lzx.swf file (it runs just fine as a .lzx file).

I'm using the example from the code from the guide (below), and the image
displays great before it is compiled ie running lzx file.

However, when I compile it and run either with lzproxied=false or bring up
the lzx.swf file, the request for the image times out.

Is this a bug?  We're VERY dependent on this feature being available.  Is
there a workaround, or am I missing something?

cheers,

David

reproducible code:

<canvas height="400">
  <font src="helmetr.ttf" name="helvet"/>
  <simplelayout spacing="3"/>

  <view>
    <simplelayout axis="x" spacing="2"/>
    <text valign="middle">Type url:</text>
    <edittext width="500" id="url">http:../resources/logo.gif</edittext>
  </view>
  <text>(also try resources/logo.swf)</text>

  <command onselect="butt.doit();"  key="['Enter']" active="true"/>

  <checkbox text="Cache in client" id="ccache"/>
  <checkbox text="Cache in server" id="scache"/>

  <button id="butt">Make request
    <method event="onclick">
      this.doit();
    </method>

    <method name="doit">
    <![CDATA[
      status.setText("Requesting: " + url.getText());

      // Determine caching from checkboxes
      var caching = 'none'
      if (ccache.getValue() && scache.getValue()) {
          caching = 'both';
      } else if (ccache.getValue()) {
          caching = 'clientonly';
      } else if (scache.getValue()) {
          caching = 'serveronly';
      }

      me.setSource(url.getText(), caching) ;
    ]]></method>
  </button>
  <button onclick="me.stop()"> Stop </button>
  <button onclick="me.play()"> Play </button>
  <text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/>
  <text multiline="true" width="200" height="100" id="status"/>
  <view id="me">
    <method event="onload" args="e">
      status.setText('loaded: ' + e);
    </method>
    <method event="onerror" args="e">
      status.setText('error: ' + e);
    </method>
    <method event="ontimeout" args="e">
      status.setText('timeout: ' + e);
    </method>
  </view>
</canvas>



More information about the Laszlo-dev mailing list