Matt. Correct.
Aran On Tue, Jan 12, 2010 at 10:15 PM, Matt Bury <[email protected]> wrote: > Many thanks to everyone here for your help and sharing your insights > and knowledge with me. > > So, from what I understand from your replies, it would probably be > better for me to use a static embed method and call > swfobject.registerObject() in the head of the printed page, and this > also allows version detection and express install if JavaScript is > enabled. Is that right? > > All the best, > > Matt > > > On Jan 11, 7:55 pm, Vincent Polite <[email protected]> > wrote: > > Delurking from a long period of inactivity on this thread: > > > > All of the points the various folks have brought up are valid. As > someone > > who has experienced a great deal of pain and suffering in regards to > > dynamically generated Flash via PHP/js using SWFObject, I can > categorically > > and emphatically say that SWFObject, as a code base, is quite effective. > > Unfortunately, various iterations of web browser will cause all sorts of > > headache with very specific Flash parameters, especially if you are using > % > > with width/height and wmode=transparent. These issues have almost always > > been found to be browser specific and as a result, extremely difficult to > > track, and impossible to debug/troubleshoot unless you happen to have > some > > juice with either Adobe or Mozilla's dev teams. > > > > In order to really convince yourself that SWFObject is working, my > > suggestion to you is to simplify your Flash Embed. The best way to do > this > > is to create static pages that embed one or more .swf files on your web > > pages. The point of being specific about using either the static or > dynamic > > content method is key. This really is an either/or proposition. The > code > > generator that is linked to in the FAQ provides an easily templated web > page > > that you can use to embed one .swf. Extending this to deal with multiple > > SWFObjects is a fairly trivial programming exercise in PHP. > > > > You'll likely find that the actual "job" of SWFObject, which is to simply > > embed/bring forth the Flash file in question is done quite well. > > > > Depending on the DOM methods you are using around the flash object and > > specific parameters you are using (say if you are embedding them within > > dynamic "window" like regions on your screen), you may find some very > > painful truths among the various web browsers where the Flash movie > doesn't > > render as expected. My particular bugaboo is in FF3.5.x where a Flash > movie > > that didn't have problems before is now inverting the screen color on > > specific click and mouseover actions (wth). This isn't SWFObject, > although > > one might argue that there is something that moved underneath the scenes > > that SWFObject isn't compensating for, as someone who has peeked under > the > > hood at the SWFObject codebase... the good folks who are maintaining this > > project have done an excellent job. > > > > So, simplify first. Programatically, I always found it easier to use the > > dynamic method, but I certainly respect your needs regarding the static > > publishing method. If you do have flags in your PHP generator functions > to > > switch things around, it sounds like maybe you've created some sort of > PHP > > abstract object (if not you should) and manager of the SWFObject embeds. > > Invoking it as such and unit testing it in a simple environment is key > for > > you understanding whether or not your code base is really at issue or if > > there's really some cool new condition (we call it a feature) where > > SWFObject's code base should be modified. > > > > something like: > > > > $x = new SWFObject; > > $x->swf = '<pathtofile>'; > > $x->params = array('width'=>'400', 'height'=>'200'); > > . > > . > > . > > $x->renderjs(); // header output > > $x->renderHTML(); // actual in page output > > > > and/or > > > > $swfmanager = new SWFObjectManager; > > $swfmanager->addSWFObject($x); > > $swfmanager->render(); > > > > The concept illustrated by the PHP skeleton above is... having a > SWFObject > > in PHP that basically mirrors all the setup methods for a single > SWFObject > > file. It has a renderjs() method that basically outputs the HTML needed > to > > show the file in both the header and the inline HTML as needed. The > reason > > I personally advocate using an SWFObjectManager class is to simplify the > > whole putting some code in the <head> section and the other code in the > > <body> section. Then the ObjectManager is "smart" enough to only do a > > single .js include as needed and then just iterates over a collection of > > SWFObjects (added via the addSWFObject method). > > > > Obviously you can choose your own method given your server platform > (PHP). > > But right now, ideally to get your problem solved. Simplify the error > case, > > and take the time to develop simple versions of the pages based on the > > generated template output to convince yourself that SWFObject is doing > what > > it needs to do. > > > > Best wishes, > > > > Vincent Polite > > > > On Mon, Jan 11, 2010 at 9:33 AM, Philip Hutchison <[email protected] > >wrote: > > > > > > > > > Using both static and dynamic publishing makes no sense and bloats the > > > page's code. If the dynamic embed fails, it's usually because Flash > Player > > > is missing (or an inadequate version is installed). Using static > publishing > > > as a fallback won't fix that. > > > > > If you're worried about JavaScript restrictions, you should just use > static > > > publishing from the get-go, since it will work even if JavaScript is > > > disabled (though some extra features will stop functioning, such as > Express > > > Install and version detection). > > > > > - philip > > > > > On Mon, Jan 11, 2010 at 3:02 AM, Matt Bury <[email protected]> > wrote: > > > > >> Hi Philip, > > > > >> Thanks for your prompt reply. This forum is a great idea. I've read > > >> the FAQ page you linked to and bookmarked it - very useful! > > > > >> Re: #1 - I'll look into this one more, although since my code works > > >> perfectly with SWFObject 2.0, I'm sceptical. I came across a similar > > >> issue (with % width and height values) in Firefox a while ago when > > >> upgrading from SWFObject 1.5 to 2.0. A few months later, the issue > > >> seemed to have been resolved. > > > > >> Re: #14 - I don't have any such extensions installed in Firefox. > > > > >> Re: I'm curious... Let's see if I'm getting this right - I use dynamic > > >> embedding as the primary method which overwrites the > > >> "myAlternativeContent" div tag. If that fails for some reason then the > > >> static content remains and you can still see embedded Flash. Since > > >> this is a PHP script, it's very easy to switch either embed method on > > >> or off to test it with various browsers with various settings. Since > > >> this plugin is intended for use in various schools, colleges, > > >> universities, companies, NGOs and govt. organisations, where they > > >> often have strange restrictions on what users can and can't do, I need > > >> a "foolproof" embed method. > > > > >> Are you saying that I should only use static content? Please let me > > >> know if I'm way off track! > > > > >> @Kyle: Here's a link to my demo course where I've got the plugin > > >> working with SWFObject 2.0 - > > >>http://matbury.com/moodle/course/view.php?id=9 > > >> (Login as a guest) Unfortunately, I can't use SWFObject 2.2 on this > > >> site since it would prevent some of my user groups from accessing > > >> Flash applications. You can view/download the SWF Activity Module and > > >> FLV Player code from these Google Code project sites: > > > > >> SWF Activity Module:http://code.google.com/p/swf-activity-module/ > > > > >> FLV Player:http://code.google.com/p/moodle-flv-player/ > > > > >> Thanks again for your help :) > > > > >> On Jan 10, 10:57 pm, Philip Hutchison <[email protected]> wrote: > > >> > hi matt > > > > >> > swfobject 2.x has been thoroughly tested in firefox 2.x and 3.x. > > > > >> > check out the FAQs to see if any apply to you (esp #1 and #14) > > >>http://code.google.com/p/swfobject/wiki/faq > > > > >> > i'm curious: why are you using both static publishing AND dynamic > > >> publishing > > >> > for the same swf? you should normally use one or the other, not > both > > >> (using > > >> > both is redundant and won't get you any extra functionality or > > >> > compatibility). > > > > >> > - philip > > > > >> > On Sun, Jan 10, 2010 at 1:14 PM, Matt Bury <[email protected]> > wrote: > > >> > > Hi, > > > > >> > > I'm developing a plugin module for an open source PHP learning > > >> > > management system (Moodle) that leverages the JW FLV Player from > > >> > > LongtailVideo.com. Previous versions have worked without any > problems > > >> > > with various versions of the player across IE, Chrome, Safari and > > >> > > Firefox. > > > > >> > > I've updated the SWFObject version from 2.0 to 2.2 and I've come > > >> > > across this problem (SWFObject 2.2 doesn't work in Firefox 3.5). > > >> > > Everthing is fine in all other browsers and I've tried switching > > >> > > between SWFObject embed and "alternativeContent" embed which is > just > > >> > > bog standard HTML code. The alternative content, which is not > > >> > > dependent on SWFObject, works. > > > > >> > > Like I've said, everything works fine with SWFObject 2.0 and it's > only > > >> > > when I try 2.2 that things go wrong, so I tried opening the > example > > >> > > files that come in the swfobject.zip download package - index.html > and > > >> > > index_dynamic.html (both of which are dependent on SWFObject) - > and > > >> > > neither of them display the test.swf file in Firefox! Again, no > > >> > > problems with the other browsers. > > > > >> > > Is this a Firefox or a SWFObject bug? Does anyone know? > > > > >> > > In case you're interested, here's an instance of the code my > module > > >> > > prints out: > > > > >> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// > > >> > >www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > > >> > > <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" > > >> > > xml:lang="en"> > > >> > > <head> > > >> > > <meta http-equiv="Content-Type" content="text/html; > > >> > > charset=utf-8" /> > > >> > > <link rel="stylesheet" type="text/css" href=" > > >>http://localhost/moodle19/ > > >> > > theme/standard/styles.php< > > >>http://localhost/moodle19/%0Atheme/standard/styles.php>" > > >> > > /> > > >> > > <link rel="stylesheet" type="text/css" href=" > > >>http://localhost/moodle19/ > > >> > > theme/standardwhite/styles.php< > > >>http://localhost/moodle19/%0Atheme/standardwhite/styles.php>" > > >> > > /> > > >> > > <script type="text/javascript" src=" > > >>http://localhost/moodle19/mod/flv/ > > >> > > swfobject/swfobject.js< > > >>http://localhost/moodle19/mod/flv/%0Aswfobject/swfobject.js> > > >> > > "></script> > > >> > > <script type="text/javascript"> > > >> > > var flashvars = {}; > > >> > > flashvars.abouttext = ""; > > >> > > flashvars.aboutlink = " > > >> > >http://www.longtailvideo.com/players/"; > > >> > > flashvars.author = ""; > > > > ... > > > > read more ยป > > -- > You received this message because you are subscribed to the Google Groups > "SWFObject" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > > > >--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.
