Warning: This message has had one
or more attachments removed (movietest.lzx.swf). Please read the "WarpOMatic-Attachment-Warning.txt"
attachment(s) for more information. Hurray, and thanks for the help!!!
I finally got it to work, by using swfmill to compile that xml file which makes a movie with just a video player, then dynamically loading the resulting tiny swf file into the resource of a view, then fishing out the videoObj inside the clip, then doing all that other stuff with it!
I compiled the movie-swfmill.xml into movie-swfmill.swf by downloading swfmill and running: swfmill xml2swf movie-swfmill.xml movie-swfmill.swf
(Both are included in this email so you don’t need to do that yourself.)
Put movie-swfmill.swf in the same directory as movietest.lzx, inside your laszlo directory, then open its url, with debug=true so you can see the status messages. It works fine as a solo app, too! That has one view, whose oninit dynamically loads the movie-swfmill.swf stub containing the magic DefineVideoStream instruction, which makes a video object called “videoObj”. The magic video object shows up on our view as this.__LZmovieClipRef.lmc.videoObj, and we can do the usual documented stuff with the NetConnection and the Stream to make it play a flv file, even from another server! Fiddler tells me it didn’t try to fetch the crossdomain.xml from huffingtonpost.com where I loaded the video from, so hopefully that isn’t an issue with flv files.
Yipee!!! Flash is confusing, but OpenLaszlo sure rocks!
Now, does anybody know how to dynamically generate an flv file on the server???!
-Don
<canvas width="100%" height="100%" proxied="false" >
<view id="gMP" width="${parent.width}" height="${parent.height}" stretches="both" >
<method event="oninit"><![CDATA[ Debug.write("oninit loading movie...", this); this.setSource("http:movie-swfmill.swf"); ]]> </method>
<method event="onload"><![CDATA[ Debug.write( "onload", this, this.__LZmovieClipRef, this.__LZmovieClipRef.lmc, this.__LZmovieClipRef.lmc.videoObj); this.connection = new NetConnection(); this.connection.connect(null); Debug.write("connection", this.connection); this.stream = new NetStream(this.connection); this.stream. { Debug.write("onstatus", this, info, info.level, info.code); } Debug.write("stream", this.connection); this.videoObj = this.__LZmovieClipRef.lmc.videoObj; Debug.write("videoObj", this.videoObj); this.videoObj.attachVideo(this.stream); this.stream.play("http://images.cf.huffingtonpost.com/video/MaherCheney.flv"); ]]> </method>
</view>
</canvas>
|
movie-swfmill.swf
Description: application/shockwave-flash
movietest.lzx
Description: Binary data
<?xml version="1.0"?>
<swf version="7" compressed="0">
<Header framerate="12" frames="1">
<size>
<Rectangle left="0" right="3200" top="0" bottom="2400"/>
</size>
<tags>
<SetBackgroundColor>
<color>
<Color red="255" green="255" blue="255"/>
</color>
</SetBackgroundColor>
<DefineVideoStream objectID="1" frames="0" width="160"
height="120" deblocking="0" smoothing="0" codec="0"/>
<PlaceObject2 replace="0" depth="1" objectID="1" name="videoObj">
<transform>
<Transform transX="0" transY="0"/>
</transform>
</PlaceObject2>
<ShowFrame/>
<End/>
</tags>
</Header>
</swf>
This is a message from the MailScanner E-Mail Virus Protection Service ---------------------------------------------------------------------- The original e-mail attachment "movietest.lzx.swf" is on the list of unacceptable attachments for this site and has been replaced by this warning message.
If you wish to receive a copy of the original attachment, please e-mail helpdesk and include the whole of this message in your request. Alternatively, you can call them, with the contents of this message to hand when you call. At Wed Mar 1 04:11:43 2006 the virus scanner said: MailScanner: Attempt to hide real filename extension (movietest.lzx.swf) Note to Help Desk: Look on WarpOMatic.com in /var/spool/MailScanner/quarantine/20060301 (message k21CBJaw011537). -- Postmaster MailScanner thanks transtec Computers for their support
_______________________________________________ Laszlo-dev mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
