Hi, I have an issue embedding a flash movie into one of my rails views. /movies/index.rhtml embeds /resources/movies/episode1.swf and episode1.flv e.g index.rhtml includes: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="320" height="280" id="episode1" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value=/resources/movies/episode1.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/resources/movies/episode1.swf" quality="high" bgcolor="#ffffff" width="320" height="280" name="episode1" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> If I put this in index.html in /resources/movies, everything works fine. But as I understand it, flash.swf references a player skin in the same directory (/resources/movie)- MojaveExternalAll.swf. With the code in my view, this isn''t being found, so my movie plays without controls. Adobe''s site says "FLVPlayback skin SWF must be in same directory as HTML file" http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=608abffd If I load an html file from /resources/movie it all works fine. However, I need to embedd that flash movie into my Rails view. Hopefully I''ve made myself clear. I expect this may be a common problem with loading components that load other components in their same directory. I tried using javascript to modify base href, but to no avail. Any thoughts? Thanks, Nick --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
making sure I have this straight. your flash.swf, episode1.flv and MojaveExternalAll.swf are in the same directory (/resources/movie) and when you have a web page in that directory that flash movie works fine. but when you access that slash movie from another directory it fails? I think it might be a relative link to the MojaveExternalAll.swf.(which is the controller for the movie, correct?) (the movie.swf (just a shell) loads the FLV and the MojaveExternalAll) let''s do some testing. we know it works in the same directory. lets make a new in the /resources/movie called flash and move all you flash movie things into that directory. now with the web page in the /resources/movie/ directory see if you can get the flash movie to play from the /resources/movie/flash directory. I think that will work. But if you start moving the flash components around into different directories it fails. It''s been several months since I''ve done flash video work. I running from memory. let me know if that helps. John On 4/25/07, Nicholas Van Weerdenburg <vanweerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I have an issue embedding a flash movie into one of my rails views. > > /movies/index.rhtml > embeds /resources/movies/episode1.swf and episode1.flv > > e.g index.rhtml includes: > <object > classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" > codebase=" > http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" > width="320" height="280" id="episode1" align="middle"> > <param name="allowScriptAccess" value="sameDomain" /> > <param name="movie" value=/resources/movies/episode1.swf" > /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" > /><embed src="/resources/movies/episode1.swf" > quality="high" bgcolor="#ffffff" width="320" height="280" name="episode1" > align="middle" allowScriptAccess="sameDomain" > type="application/x-shockwave-flash" pluginspage=" > http://www.macromedia.com/go/getflashplayer" /> > </object> > > If I put this in index.html in /resources/movies, everything works fine. > > But as I understand it, flash.swf references a player skin in the same > directory (/resources/movie)- MojaveExternalAll.swf. > > With the code in my view, this isn''t being found, so my movie plays without > controls. > > Adobe''s site says "FLVPlayback skin SWF must be in same directory as HTML > file" > http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=608abffd > > If I load an html file from /resources/movie it all works fine. However, I > need to embedd that flash movie into my Rails view. > > Hopefully I''ve made myself clear. I expect this may be a common problem with > loading components that load other components in their same directory. I > tried using javascript to modify base href, but to no avail. > > Any thoughts? > > Thanks, > Nick > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the thoughts. Everything works when in the same directory as a regular html page. I got it to work in a rails view by doing the following: 1. move the flash files to public (e.g. / ) 2. add <base href="www.mysite.com" /> to my main layout. 3. reference flash file by "movie.swf" reference in view. Not sure exactly why yet, but I''m happy for now. Thanks, Nick On 4/25/07, John Ivanoff <john.ivanoff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > making sure I have this straight. > your flash.swf, episode1.flv and MojaveExternalAll.swf are in the same > directory (/resources/movie) > and when you have a web page in that directory that flash movie works > fine. > but when you access that slash movie from another directory it fails? > > I think it might be a relative link to the > MojaveExternalAll.swf.(which is the controller for the movie, > correct?) > (the movie.swf (just a shell) loads the FLV and the MojaveExternalAll) > > let''s do some testing. > we know it works in the same directory. > lets make a new in the /resources/movie called flash and move all you > flash movie things into that directory. > now with the web page in the /resources/movie/ directory see if you > can get the flash movie to play from the /resources/movie/flash > directory. > > I think that will work. But if you start moving the flash components > around into different directories it fails. > > It''s been several months since I''ve done flash video work. I running > from memory. > > let me know if that helps. > John > > On 4/25/07, Nicholas Van Weerdenburg <vanweerd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > > > > I have an issue embedding a flash movie into one of my rails views. > > > > /movies/index.rhtml > > embeds /resources/movies/episode1.swf and episode1.flv > > > > e.g index.rhtml includes: > > <object > > classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" > > codebase=" > > > http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 > " > > width="320" height="280" id="episode1" align="middle"> > > <param name="allowScriptAccess" value="sameDomain" /> > > <param name="movie" value=/resources/movies/episode1.swf" > > /><param name="quality" value="high" /><param name="bgcolor" > value="#ffffff" > > /><embed src="/resources/movies/episode1.swf" > > quality="high" bgcolor="#ffffff" width="320" height="280" > name="episode1" > > align="middle" allowScriptAccess="sameDomain" > > type="application/x-shockwave-flash" pluginspage=" > > http://www.macromedia.com/go/getflashplayer" /> > > </object> > > > > If I put this in index.html in /resources/movies, everything works fine. > > > > But as I understand it, flash.swf references a player skin in the same > > directory (/resources/movie)- MojaveExternalAll.swf. > > > > With the code in my view, this isn''t being found, so my movie plays > without > > controls. > > > > Adobe''s site says "FLVPlayback skin SWF must be in same directory as > HTML > > file" > > http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=608abffd > > > > If I load an html file from /resources/movie it all works fine. However, > I > > need to embedd that flash movie into my Rails view. > > > > Hopefully I''ve made myself clear. I expect this may be a common problem > with > > loading components that load other components in their same directory. I > > tried using javascript to modify base href, but to no avail. > > > > Any thoughts? > > > > Thanks, > > Nick > > > > > > > > > > > > > > >-- Nicholas Van Weerdenburg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---