[Laszlo-user] bug playing swf?

Martin Allchin mallchin at blueyonder.co.uk
Sun Jun 25 19:42:48 EDT 2006


The following code loads an swf file (a video) into a view using a datapath:

    code:
    ------------------------------------------------------------------------
    <view id="videoviewer2" y="22" width="200" height="150" stretches="both" play="false" align="center" resource="$path{'video/text()'}">
      <method event="onlastframe">
        this.stop(1);
      </method>
    </view>

    <!-- Play button -->
    <basebutton x="5" y="22" resource="viewProfile_btn">
      <method event="onclick">
        videoviewer2.play();
      </method>
    </basebutton>
    ------------------------------------------------------------------------



As you can see it has play="false" to stop it from playing the video, 
and a button with an onclick event to trigger play().

Clicking the button causes the video's audio to play, but the view is 
black, there is no visual. Removing play="false" causes the video to 
play correctly with both visual and audio, but I need it on an onclick.

Am I doing something wrong or is this a bug? I have tried setting an 
oninit event to stop() the video instead of setting the play attribute 
but I get the same error, no visual.

Please help.

Mallchin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20060625/0aed487b/attachment.html


More information about the Laszlo-user mailing list