<div dir="ltr">No help? Bummer. I may try and play around with it later if I have time. Would be fun to have it working.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 10:48 PM, Maria McKinley <span dir="ltr"><<a href="mailto:mariak@mariakathryn.net" target="_blank">mariak@mariakathryn.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi there,<br><br>I think I have discovered a simpler solution from this page:<br><br><a href="http://perishablepress.com/embed-flash-and-video-via-the-object-tag/" target="_blank">http://perishablepress.com/embed-flash-and-video-via-the-object-tag/</a><br>

<br>I adapted his code a bit, and verified that this code works for showing a png file if the flashplayer is not found:<br> <br><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="300"<br>

        codebase="<a href="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" target="_blank">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0</a>"><br>
  <param name="movie" value="movie.swf" /><br>
  <param name="bgcolor" value="#ffffff" /><br>  <param name="quality" value="high" /><br>  <!--[if !IE]>--><br>    <object data="movie.swf" width="400" height="300" type="application/x-shockwave-flash"><br>

      <param name="pluginurl" value="<a href="http://www.macromedia.com/go/getflashplayer" target="_blank">http://www.macromedia.com/go/getflashplayer</a>" /><br>      <param name="bgcolor" value="#ffffff" /><br>

      <param name="quality" value="high" /><br>      <img src="no-flash.gif" width="400" height="300" alt="Get Flash Player" /><br>    </object><br>

  <!--<![endif]--><br></object><br><br>Of course it shouldn't work with IE without Flash, but since it seems like IE just comes with Flash now, I suspect this isn't an issue in any IE sort of recent anyway. On a mac with chrome, safari and firefox and flash I get just the flash video and on an iphone I get the png. The trick is to have the img src tag inside the second object tag, otherwise you do get both.<br>

<br>I looked at the code for swf.php, and it looks like it shouldn't be difficult to adapt. The code there uses the embed tag instead of the second object. If you try to use the img trick within the embed tag, it shows both the flash movie and the png. So, here is my idea:<br>

<br>SDV($SwfTagFmt,<br>  "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' <br>    codebase='<a href="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" target="_blank">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0</a>' ><br>

    <param name='movie' value='\$LinkUrl' /><br>    <param name='quality' value='high' /><br>   <!--[if !IE]>--><br>    <object data='\$LinkUrl' type='application/x-shockwave-flash'><br>

      <param name='pluginurl" value='<a href="http://www.macromedia.com/go/getflashplayer" target="_blank">http://www.macromedia.com/go/getflashplayer</a>' /><br>      <param name='quality' value='high' /><br>

      <img src='\$AltUrl' /><br>    </object><br>  <!--<![endif]--><br> </object>");<br><br>But, I just did the easy part, and, I have no idea what to do with the actual pmwiki markup. I think there must be a way to make it so there is an optional markup for flash so you could do something like this:<br>

<br>Attach:myflashfile.swf width=300 height=200 alt=my.png<br><br>But, now I am in over my head. Is this a crazy idea? For reference, this is the rest of swf.php<br><br>Markup('swf', '<urllink', <br>  "/\\b(?>(\\L))([^\\s$UrlExcludeChars]+\\.swf)/e",<br>

  "Keep(\$GLOBALS['LinkFunctions']['$1'](\$pagename,'$1','$2',NULL,'$1$2',<br>    \$GLOBALS['SwfTagFmt']), 'L')");<br><br>SDVA($WikiStyleAttr,array(<br>  'height' => 'img|object|embed',<br>

  'width' => 'img|object|embed'));<br><br>?><br>  <br>Thanks,<div>maria<div><div class="h5"><br><br>On Thu, Apr 11, 2013 at 3:25 PM, tamouse mailing lists <<a href="mailto:tamouse.lists@gmail.com" target="_blank">tamouse.lists@gmail.com</a>> wrote:<br>

><br>> With all due respect, no, you can't actually detect it from within<br>> pmwiki. It's only known once you're actually in the user's browser,<br>> i.e., pmwiki has done all it can in rendering. You probably need to go<br>

> with something like this: <a href="https://code.google.com/p/swfobject/" target="_blank">https://code.google.com/p/swfobject/</a><br>><br>> On Thu, Apr 11, 2013 at 2:42 PM, Petko Yotov <<a href="mailto:5ko@5ko.fr" target="_blank">5ko@5ko.fr</a>> wrote:<br>

> > Yes, see this article:  <a href="http://blog.deconcept.com/2005/03/31/" target="_blank">http://blog.deconcept.com/2005/03/31/</a> .<br>> ><br>> > The Cookbook:Freemind recipe uses something like this. If Flash is enabled<br>

> > in the browser, a Flash object is inserted before a link.<br>> ><br>> > Petko<br>> ><br>> ><br>> > Maria McKinley writes:<br>> >><br>> >> Is there any way to detect from pmwiki if there is a flash player in a<br>

> >> browser? I'd like to show a flash movie if there is, and a gif if there<br>> ><br>> ><br>> ><br>> > _______________________________________________<br>> > pmwiki-users mailing list<br>

> > <a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>> > <a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>

><br>> _______________________________________________<br>> pmwiki-users mailing list<br>> <a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>> <a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>

<br><br><br><br></div></div>--<br>Maria Mckinley<br>Programmer and System Administrator</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Maria Mckinley<br>Programmer and System Administrator
</div>