Thanks, Aran. I did belatedly RTFM (blush), found the code, and it's working great.
And thanks to the development group for a terrific job. Arnie On May 7, 3:56 pm, "Aran Rhee" <[email protected]> wrote: > Arnie. > > Have you checked out the SWFObject API page which shows you everything you > can do with the library? > > http://code.google.com/p/swfobject/wiki/api > > Unsurprisingly, there is a method that deals with exactly what you want to > do (last method on the page): > > swfobject.getQueryParamValue(paramStr) > > If you are wanting to do something with your swf, generally you are not in a > unique position and others have wanted to do the same thing, so > documentation is your friend :) > > Aran > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > > Behalf Of arnie keller > Sent: Friday, 8 May 2009 2:47 AM > To: SWFObject > Subject: Passing Flashvars from HTML with a query > > Hi > > For a project I'm doing with FLV videos embedded in a SWF, I'd like to > be able to pass a Flashvar to the SWF to move the playhead to > particular time. A sample URL would be this: > > http://hamlet.ucalgary.ca/act1_1/index.html?myTime=123. > > This would open the HTML file that holds the swf and send the playhead > to time 123. > > Using code from the Actionscript 3 Cookbook, I can in fact do this. > Here's the HTML I'm using: > > <script type="text/javascript" > > var parameters = window.location.search.substr(1); > var objectEmbed = '<object classid="clsid:D27CDB6E- > AE6D-11cf-96B8-444553540000" id="player" width="800" height="800" > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ > swflash.cab">'; > objectEmbed += '<param name="movie" value="player.swf" />'; > objectEmbed += '<param name="quality" value="high" />'; > objectEmbed += '<param name="bgcolor" value="#3C3F52" />'; > objectEmbed += '<param name="allowScriptAccess" value="sameDomain" / > >'; > objectEmbed += '<param name="FlashVars" value="' + parameters + '" / > >'; > objectEmbed += '<embed src="player.swf" quality="high" > bgcolor="#3C3F52" width="800" height="800" name="Example" > align="middle" play="true" loop="false" quality="high" > allowScriptAccess="sameDomain" type="application/x-shockwave-flash" > pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="' > + parameters + '"></embed>'; > objectEmbed += '</object>'; > document.write(objectEmbed); > </script> > > As I say this works fine except that I'd like to combine the code with > swfObject; I'd especially like to be able to detect the client's > version of the Flash player and invoke ExpressInstall as needed. > > I remember reading a while back in this group some discussion on > passing Flashvars via the URL with swfObject. But I don't know if > that problem was resolved. > > Any thoughts on this issue would be greatly appreciated. Thanks. > > Arnie Keller --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
