thank you all for replying. It is definitely not a matter of syntax but of my poor knowledge of Flash I suppose. I found no way to get my mp4 imported in Flash converted in a "valid" swf for playing: the proof of my wrong approach is the dimension of the swf file obtained from Flash: 60KB against 6MB of the original mp4 file. Maybe I will learn to use Flash the right way one day..
As soon as I used another tool to convert my mp4 video into swf (into flv actually as you can read below) everything was ok and my original syntax worked. At present I chose to use the SWFObject approach which, among other things, lets you play your movies as flv files and customized player (I used the classic JW player), but even the classic <object> tag is fine. For the curious this is the code: <script type="text/javascript" src="{{=URL(r=request,c='static/ js',f='swfobject.js')}}"></script> <script type="text/javascript"> var flashvars = {}; flashvars.file = "{{=URL(r=request,c='static',f='xcel2xml.flv')}}"; var params = {}; params.play = "false"; params.loop = "false"; params.menu = "true"; params.quality = "best"; params.scale = "showall"; params.wmode = "window"; params.swliveconnect = "true"; params.allowfullscreen = "true"; params.allowscriptaccess = "always"; params.allownetworking = "all"; var attributes = {}; attributes.id = "container"; swfobject.embedSWF("{{=URL(r=request,c='static',f='player.swf')}}", "myAlternativeContent", "640", "480", "9.0.0", false, flashvars, params, attributes); </script> where player.swf= the JW Flash player and xcel2xml.flv=my video In the body section of your view just put (shown only if the user does not have Flash player installed): <div id="myAlternativeContent"> <a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/ get_flash_player.gif" alt="Get Adobe Flash player" /> </a> </div> Everything about swfobject at http://code.google.com/p/swfobject/ carlo On 31 Lug, 02:31, Jonathan Lundell <jlund...@pobox.com> wrote: > On Jul 30, 2009, at 5:21 PM, Miguel Lopes wrote: > > > > > > > On Thu, Jul 30, 2009 at 4:58 PM, Jonathan > > Lundell<jlund...@pobox.com> wrote: > > >> On Jul 30, 2009, at 7:47 AM, Jonathan Lundell wrote: > > >>> On Jul 30, 2009, at 7:42 AM, Miguel Lopes wrote: > > >>>> If its in swf, it should work. > > >>>> Although, I notice an error in the original snippet you posted > >>>> (besides the missing ' ): > >>>> {{url=URL(r=request,c='static',f='somefilename.swf)}} > > >>>> Should be): > >>>> url={{URL(r=request,c='static',f='somefilename.swf')}} > > >>> Or maybe: > > >>> url={{=URL(r=request,c='static',f='somefilename.swf')}} > > >> Never mind. I see from a later post that the {{url=...}} was correct. > > > Forgive me. Actually I meant: > > href="{{=URL(r=request,c='static',f='somefilename.swf')}}" > > > it is also true that: > > {{url=URL(r=request,c='static',f='somefilename.swf')}} > > > is also correct. But the only thing it does is assign the url to a > > variable, that is only available in the template. So if you are using > > this to populate a href tag (like I assumed), you'll get an empty tag. > > What I meant was that Carlo's original question had this code: > > {{url=URL(r=request, c='static', f='somefilename.swf' )}} > <object width="550" height="400"> > <param name="movie" value="{{=url}}"> > <embed src="{{=url}}" width="550" height="400"> > </embed> > </object> > > ...where the treatment of url look fine to me. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---