oops.  The file I sent earlier didn't actually have the library object
in it.  Apparently I needed to place it on the stage for it to be
included in the movie.

I compiled swfdump and got the following output (from the enclosed SWF).
I included the hex output, if that helps:
[HEADER]        File version: 6
[HEADER]        File size: 86
[HEADER]        Frame rate: 12.000000
[HEADER]        Frame count: 1
[HEADER]        Movie width: 550.00
[HEADER]        Movie height: 400.00
[009]         3 SETBACKGROUNDCOLOR (ff/ff/ff)
                 -=> ff ff ff
ÿÿÿ
[03c]        10 DEFINEVIDEOSTREAM defines id 0001 (0 frames, 160x120
codec 0x00)

                 -=> 01 00 00 00 a0 00 78 00 00 00
.... .x.
..
[027]         4 DEFINESPRITE defines id 0002
                          -=> 02 00 01 00
  ....
[01a]         7          PLACEOBJECT2 places id 0001 at depth 0001
                           | Matrix
                           | 1.000 0.000   0.35
                           | 0.000 1.000   0.00
                          -=> 06 01 00 01 00 08 e0
  ......à
[001]         0          SHOWFRAME 0 (00:00:00,000)
[000]         0          END
[01a]        11 PLACEOBJECT2 places id 0002 at depth 0001 name "_vc"
                  | Matrix
                  | 1.000 0.000  -0.35
                  | 0.000 1.000   0.00
                 -=> 26 01 00 02 00 09 20 5f 76 63 00
&..... _
vc.
[001]         0 SHOWFRAME 0 (00:00:00,000)
[000]         0 END




On Tue, Feb 28, 2006 at  4:47 PM, Sarah Allen wrote:

Didn't we have some tools that would decode SWF files?  The SWF I sent
earlier should have the opcodes in it.  I exported as SWF6.


On Tue, Feb 28, 2006 at  4:37 PM, Henry Minsky wrote:

I can try to help out adding a new object to JGenerator. Do you have the
tag opcode and parameters it needs?


On 2/28/06, Sarah Allen < [EMAIL PROTECTED]
<javascript:lzSetCanvasAttribute('js_mailto',
'[EMAIL PROTECTED]')> > wrote:
As a matter of fact, I am.  It look like we need a Video object for
.attachVideo which can only be created from the Flash authoring tool (or
at least neither the flashcoders nor I know how to create using
ActionScript alone: http://pattern.junlu.com/msg/851.html)

We should be able to tweak the compiler to add in a video object wrapped
in a moveClip for runtime instantiation.  I whipped one up in Flash
(enclosed for the curious).

Anyone know how to decompile the SWF and add the byte code into a Laszlo
app?  I've mucked around in SWFFile.java before, but I would guess
JGenerator doesn't have any calls for adding in the Video object.

Sarah


On Mon, Feb 27, 2006 at  5:31 PM, Don Hopkins wrote:

From: Sarah Allen Subject: [Laszlo-dev] getting at the moveClip of a view So, I wanted to get at the movieClip of a view (prototyping something before actually diving into the LFC), and I couldn't figure it out. I swear I've done this before. [...]

Are you trying to do the same thing I want to do? I've been noodling around with trying to get Laszlo to play streaming flv files, but so far have only been able to get their audio streams to play, without any video displayed. I think the reason you're not finding an __LZmovieClipRef is that they're only created under certain circumstances, like the view having a resource or background color, or containing other views. There's a method called makeContainerResource that seems to make a __LZmovieClipRef, which I think gets called when you dynamically set the resource or add sub-views. Setting the background color of a view also creates its __LZmovieClipRef. Here's a snippet from my latest attempt, for a top secret "SimCheney" project I'm working on, big time. Don't leak the source or I'll blast you in the face with a shotgun! (No actually, feel free to leak the source! Just please let me know if you get it to work!) It just plays the audio from the flv, but doesn't show the video. The resource="gofuckyourself_res" causes the __LZmovieClipRef to be defined, otherwise it's undefined, which causes warnings, but the audio plays anyway for some reason. -Don

<view name="movieplayer" id="gMP" x="${canvas.leftEdge}" y="${canvas.topEdge}" width="${parent.width - ( canvas.leftEdge + canvas.rightEdge)}" height="${parent.height - (canvas.topEdge + canvas.bottomEdge)}" stretches="both" resource="gofuckyourself_res"


<attribute name="connection" value="null"/> <attribute name="stream" value="null"/> <method event="oninit"><![CDATA[ var ref = this.__LZmovieClipRef; Debug.write("oninit", this, this.__LZmovieClipRef); this.connection = new NetConnection(); Debug.write("connection", connection); this.connection.connect(null); this.stream = new NetStream(this.connection); Debug.write("stream", stream); this.stream.onStatus = function(info) { Debug.write("status", this, info, info.level, info.code); } ref.attachVideo(this.stream); this.stream.setBufferTime(5); this.stream.play("MaherCheney.flv"); ]]> </method>
    </view>
Here's the debugger output (I also clicked on the interesting objects to show them, with "Debug.showInternalProperties = true" of course): oninit #gMP<MovieClip#1| _level0.$m0.$m0.$m0> connection <object#2| {contentType: application/x-fcs}> stream <object#3| {}> status <object#3| {}>{level: status, code: NetStream.Play.Start} status NetStream.Play.Start status <object#3| {}>{level: status, code: NetStream.Buffer.Full} status NetStream.Buffer.Full status <object#3| {}>{level: status, code: NetStream.Buffer.Flush} status NetStream.Buffer.Flush status <object#3| {}>{level: status, code: NetStream.Buffer.Flush} status NetStream.Buffer.Flush status <object#3| {}>{level: status, code: NetStream.Play.Stop} status NetStream.Play.Stop status <object#3| {}>{level: status, code: NetStream.Buffer.Empty} status NetStream.Buffer.Empty <MovieClip#1| _level0.$m0.$m0.$m0> { __proto__: <Object#10| MovieClip.prototype> _currentframe: 1 _opacity: <undefined> _rotation: 0 _visible: true _x: 40 _xscale: 1102 _y: 40 _yscale: 874 constructor: MovieClip } <MovieClip#1| _level0.$m0.$m0.$m0> <object#2| {contentType: application/x-fcs}> { __constructor__: <Function#12> __proto__: <Object#13| undefined#12.prototype> contentType: application/x-fcs isConnected: true uri: null } <undefined#12#12#2| {contentType: application/x-fcs}> <object#3| {}> { __constructor__: <Function#14> __proto__: <Object#15| undefined#14.prototype> _bytesTotal: 2949922 audiocodec: 2 bufferLength: 0 bufferTime: 5 bytesLoaded: 2949922 bytesTotal: 2949922 currentFps: 0 decodedFrames: 0 liveDelay: 0 onStatus: <Function#16| this.stream.onStatus> time: 49.52 videocodec: 0 } <undefined#14#14#3| {}>

-----Original Message----- From: [EMAIL PROTECTED] <javascript:lzSetCanvasAttribute('js_mailto', '[EMAIL PROTECTED]')> [mailto: [EMAIL PROTECTED] <javascript:lzSetCanvasAttribute('js_mailto', '[EMAIL PROTECTED]')> ] On Behalf Of Sarah Allen Sent: Monday, February 27, 2006 12:46 PM To: OpenLaszlo development development Subject: [Laszlo-dev] getting at the moveClip of a view

So, I wanted to get at the movieClip of a view (prototyping something before actually diving into the LFC), and I couldn't figure it out. I swear I've done this before. Simple test case: <canvas> <view id="v" oninit="Debug.write(this.__LZmovieClipRef)"/> </canvas> shows in the debugger: WARNING: test.lzx:2: reference to undefined property '__LZmovieClipRef' <undefined> Adding width, height and bgcolor to the view didn't help. If I set Debug.showInternalProperties = true, I see __LZbgRef:, but no __LZmovieClipRef
What's up?
Thanks, Sarah



_______________________________________________
Laszlo-dev mailing list
[email protected] <javascript:lzSetCanvasAttribute('js_mailto',
'[email protected]')>
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev



<http://www.openlaszlo.org/mailman/listinfo/laszlo-dev>



--
Henry Minsky
Software Architect
[EMAIL PROTECTED] <javascript:lzSetCanvasAttribute('js_mailto',
'[EMAIL PROTECTED]')>



------------------------------

_______________________________________________
Laszlo-dev mailing list
[EMAIL PROTECTED]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev 

Attachment: video-on-stage.swf
Description: application/shockwave-flash

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to