On Wed, Apr 25, 2012 at 4:48 PM, RFX <reg
...@gmail.com> wrote:
> Ah.... i think i see... thank you for the reply....
> So how would i change the syntax if
> (swfobject.hasFlashPlayerVersion("10.2.x.x")) to evaluate if 10.2.x.x
> is less than or equal too?
> Is this possible? Based on your very helpful feed back i wrote the
> following. Do you think this would do the same?
> Hope i am making sense.... here is the code i tried to re-write below.
> -----------------------------------------------------
> <html>
> <head>
> <title>DISPLAY TEXT BASED ON FLASH VERSION</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1" />
> <script type="text/javascript" src="swfobject.js"></
> script>
> </head>
> <body>
> <script type="text/javascript">
> swfobject.registerObject("myFlashContent",
> "10.2.153.1");
> if
> (swfobject.hasFlashPlayerVersion("10.2.153.1"))
> {
> document.write("You have FLASH 10.2.153.1 You
> Can View This Video"); // This needs to be anything 10.2.x and above
> but not sure how to put in the evaluation syntax
> }
> else if
> (swfobject.hasFlashPlayerVersion("10.0.0.0")) // This needs to be
> anything less that 10.0 not sure how create evaluation syntax
> {
> document.write("You Have LESS Than Version 10.2
> You Cannot View This Video");
> }
> else
> {
> document.write("You Do Not
> Have Flash Or Correct Version! You
> cannot play this video unless you have version 10.2.x or Greater!");
> }
> </script>
> </body>
> </html>
> ---------------------------------------------------------
> Your thoughts?
> Cheers
> RFX
> On Apr 25, 3:13 pm, Aran Rhee <aran.r...@gmail.com> wrote:
> > Best look through the docs to see what a method actually returns
> > :) swfobject.registerObject() does not return a version string for you to
> > evaluate. You are looking for the api method:
> > swfobject.hasFlashPlayerVersion(versionStr)
> > or if you want more fine grain control:
> > swfobject.getFlashPlayerVersion()
> > Both methods can be found on :
> http://code.google.com/p/swfobject/wiki/api
> > e.g.
> > if (swfobject.hasFlashPlayerVersion("10.3.181")) {
> > // has Flash}
> > else {
> > // no Flash
> > }
> > You do not need to embed an actual swf file for calling either of these
> > methods, just include swfobject.js before calling.
> > Cheers,
> > Aran
> > On Wed, Apr 25, 2012 at 2:40 PM, RFX <reg...@gmail.com> wrote:
> > > Hi,
> > > I have a situation where i need to document.write text or display code
> > > based on exact browser version.
> > > For example, if the user's SWFObject detects flash installed player
> > > version 10.3.181 or less then the web page would display the text or
> > > code based on that users exact flash player version.
> > > The code below is something i tried to write that would be compatible
> > > in IE,FireFox,Safari and etc but my syntax is not correct because it
> > > does not work at all.
> > > Could someone help point me in the right direction?
> > > <code>
> > > <html>
> > > <head>
> > > <title>DISPLAY TEXT BASED ON FLASH VERSION</title>
> > > <meta http-equiv="Content-Type" content="text/html;
> > > charset=iso-8859-1" />
> > > <script type="text/javascript"
> src="swfobject.js"></script>
> > > </head>
> > > <body>
> > > <script type="text/javascript">
> > > swfobject.registerObject("myFlashContent",
> > > "10.3.181");
> > > if(myFlashContent < 10,3,181)
> > > {
> > > document.write("You have less than 10.3.181");
> > > }
> > > else
> > > {
> > > document.write("CONGRATULATIONS you have
> > > equal to or Greater than
> > > 10.3.181");
> > > }
> > > </script>
> > > </body>
> > > </html>
> > > </code>
> > > Or any script that would accomplish the same thing with document.write
> > > would be helpful.
> > > Please advise... thanks in advance.
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "SWFObject" group.
> > > To post to this group, send email to swfobject@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > swfobject+unsubscribe@googlegroups.com.
> > > 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 swfobject@googlegroups.com.
> To unsubscribe from this group, send email to
> swfobject+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=en.