SWFObject wrappers

39 views
Skip to first unread message

charlie

unread,
Feb 6, 2010, 6:54:44 PM2/6/10
to Google-We...@googlegroups.com
Anyone have a GWT wrapper for SWFObject  http://code.google.com/p/swfobject/ ?

Cristiano

unread,
Feb 6, 2010, 8:08:27 PM2/6/10
to Google Web Toolkit
Here comes again the false myth of the complexity of embedding
flash... ;-)
it is hard only if you need compatibility with very old browsers...

if you don't have that requirement, I would encourage you to use just
a simple <object> like this:

<object type="application/x-shockwave-flash" data="movie.swf"
width='300' height='200' id="VideoPlayback">
<param name="movie" value="movie.swf" />
<param name="allowScriptAcess" value="sameDomain" />
<param name="quality" value="best" />
</object>

which is also compliant to W3C and, returning to the subject of GWT,
should be easily implementable with UiBinder.
It works for sure on IE8, Firefox 3.6, Safari 4, Chrome 4. These are
the browser I have installed on my computers. The flash player I have
is version 10.

Here you can find all the reference of more available parameter to add
to the object: http://kb2.adobe.com/cps/127/tn_12701.html

Please tell anyone that embedding flash is not so hard and does not
require a complex javascript wrapper object!

(sorry all for the polemic tone ;-) )

Bye!
Cristiano

Chris.Pollard

unread,
Feb 8, 2010, 6:32:01 AM2/8/10
to Google Web Toolkit
Hi

Flash and GWT is an area I've had great fun with...

Whilst incorporating Flash into parts of our product, we've not found
it to be a simple exercise :(
Alas our EmNOC product has to cover browsers of all ages.

I'm unable to pass on the wrapper I have as it's very product
specific, but here's some of the issues I created it to cover.

So I used SWFObject, and around that my own JS "class". This wrapper
is then exercised by a GWT "Flash" wrapper class.
This handles:
- the possible delay waiting for Flash to load whilst the GWT is
already up and running
- simplifies the interface between GWT and the Flash components used
- handles case where Flash Player is not available
- within our EmNOC product, Flash is placed within a Deck and we also
have a few tabs per page. With non-IE browsers, the Flash content gets
unloaded when hidden and this causes state loss for the view which had
to be handled so state could be reasserted when the Flash content was
viewed again


Chris

Reply all
Reply to author
Forward
0 new messages