Message from discussion
Need Help: Conditional Statement Syntax based on Exact Flash Player Version
Received: by 10.204.156.199 with SMTP id y7mr467121bkw.7.1335384798477;
Wed, 25 Apr 2012 13:13:18 -0700 (PDT)
X-BeenThere: swfobject@googlegroups.com
Received: by 10.204.131.87 with SMTP id w23ls160036bks.2.gmail; Wed, 25 Apr
2012 13:13:14 -0700 (PDT)
Received: by 10.204.153.209 with SMTP id l17mr468214bkw.4.1335384794382;
Wed, 25 Apr 2012 13:13:14 -0700 (PDT)
Received: by 10.204.153.209 with SMTP id l17mr468213bkw.4.1335384794339;
Wed, 25 Apr 2012 13:13:14 -0700 (PDT)
Return-Path: <aran.r...@gmail.com>
Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173])
by gmr-mx.google.com with ESMTPS id k15si804395bks.0.2012.04.25.13.13.14
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 25 Apr 2012 13:13:14 -0700 (PDT)
Received-SPF: pass (google.com: domain of aran.r...@gmail.com designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of aran.r...@gmail.com designates 209.85.217.173 as permitted sender) smtp.mail=aran.r...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-lb0-f173.google.com with SMTP id i15so494923lbo.18
for <swfobject@googlegroups.com>; Wed, 25 Apr 2012 13:13:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=Xx/sWS88Q+8neg+ze3GaHXrsCGX6fhGkTyLF4xj8G7M=;
b=UbokWZgkda1+GdaUN92de/+7r3wZh5XdkrgfgDPxQJMAss7K7beIzCshjOcdjjoS47
Ds3jePwyLLQliC72RsmPBkoEpX4wxQ3rOgzKOsyW2OqA0I+p2aJNUoLjlJiIvZ78K4sy
oJfELwK7sznjiqBTXVFBkj98Qno52kNndVm80E4m4mlF5DX+H6BQR0swMsu5ms5fiS3q
Yid30QCFzzJnTRjZEGoBqh5UKoFzaaE8q8SeUulYIc7Ay4TavYDA8JjonMpr7v6DEreD
q/STZX2L5XxILY4ehc8e6NxEh/JDITl5OxpMXHO9Yzhg200b30WmmVJ06HoOgOxj7vgW
5IEQ==
MIME-Version: 1.0
Received: by 10.152.112.97 with SMTP id ip1mr3945959lab.31.1335384794121; Wed,
25 Apr 2012 13:13:14 -0700 (PDT)
Received: by 10.112.76.37 with HTTP; Wed, 25 Apr 2012 13:13:14 -0700 (PDT)
In-Reply-To: <9c6fb5d7-83b8-4563-812a-152ed1c92...@e42g2000yqa.googlegroups.com>
References: <9c6fb5d7-83b8-4563-812a-152ed1c92...@e42g2000yqa.googlegroups.com>
Date: Wed, 25 Apr 2012 15:13:14 -0500
Message-ID: <CAMx6rpPA16gSBk5yBRsrXOXESiy23xsNs5kz=O2JHWQYv0i...@mail.gmail.com>
Subject: Re: [SWFObject] Need Help: Conditional Statement Syntax based on
Exact Flash Player Version
From: Aran Rhee <aran.r...@gmail.com>
To: swfobject@googlegroups.com
Content-Type: multipart/alternative; boundary=f46d0421ad614ac5d504be86807d
--f46d0421ad614ac5d504be86807d
Content-Type: text/plain; charset=ISO-8859-1
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.
>
>
--f46d0421ad614ac5d504be86807d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Best look through the docs to see what a method actually returns :)=A0swfob=
ject.registerObject() does not return a version string for you to evaluate.=
You are looking for the api method:<div><br>swfobject.hasFlashPlayerVersio=
n(versionStr)<br>
<br><br>or if you want more fine grain control:<br><br>swfobject.getFlashPl=
ayerVersion()<br><br><br>Both methods can be found on :=A0<a href=3D"http:/=
/code.google.com/p/swfobject/wiki/api">http://code.google.com/p/swfobject/w=
iki/api</a><br>
<br><br>e.g.<div><tt><div style=3D"font-family:Monaco,'DejaVu Sans Mono=
','Bitstream Vera Sans Mono','Lucida Console',monospace=
;font-size:15px;max-width:66em"><tt style=3D"font-family:Monaco,'DejaVu=
Sans Mono','Bitstream Vera Sans Mono','Lucida Console'=
,monospace;font-size:15px;max-width:66em"><pre class=3D"prettyprint" style=
=3D"font-size:12px;padding-top:0.5em;padding-right:0.5em;padding-bottom:0.5=
em;padding-left:0.5em;overflow-x:auto;overflow-y:auto;font-family:Monaco,&#=
39;DejaVu Sans Mono','Bitstream Vera Sans Mono','Lucida Con=
sole',monospace;max-width:70em;background-color:rgb(238,238,238)">
<span class=3D"kwd" style=3D"color:rgb(0,0,136)">if</span><span class=3D"pl=
n"> </span><span class=3D"pun" style=3D"color:rgb(102,102,0)">(</span><span=
class=3D"pln">swfobject</span><span class=3D"pun" style=3D"color:rgb(102,1=
02,0)">.</span><span class=3D"pln">hasFlashPlayerVersion</span><span class=
=3D"pun" style=3D"color:rgb(102,102,0)">(</span><span class=3D"str" style=
=3D"color:rgb(0,136,0)">"10.3.181"</span><span class=3D"pun" styl=
e=3D"color:rgb(102,102,0)">))</span><span class=3D"pln"> </span><span class=
=3D"pun" style=3D"color:rgb(102,102,0)">{</span><span class=3D"pln"><br>
=A0 </span><span class=3D"com" style=3D"color:rgb(136,0,0)">// has Flash</s=
pan><span class=3D"pln"><br></span><span class=3D"pun" style=3D"color:rgb(1=
02,102,0)">}</span><span class=3D"pln"><br></span><span class=3D"kwd" style=
=3D"color:rgb(0,0,136)">else</span><span class=3D"pln"> </span><span class=
=3D"pun" style=3D"color:rgb(102,102,0)">{</span><span class=3D"pln"><br>
=A0 </span><span class=3D"com" style=3D"color:rgb(136,0,0)">// no Flash</sp=
an><span class=3D"pln"><br></span><span class=3D"pun" style=3D"color:rgb(10=
2,102,0)">}</span></pre></tt></div></tt><br><span style=3D"max-width:66em">=
You do not need to embed an actual swf file for calling either of these met=
hods, just include swfobject.js before calling.</span><br>
<br><br><span style=3D"max-width:66em">Cheers,</span><br><span style=3D"max=
-width:66em">Aran</span></div><br><div class=3D"gmail_quote">On Wed, Apr 25=
, 2012 at 2:40 PM, RFX <span dir=3D"ltr"><<a href=3D"mailto:reggfx@gmail=
.com">reg...@gmail.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hi,<br>
I have a situation where i need to document.write text or display code<br>
based on exact browser version.<br>
For example, if the user's SWFObject detects flash installed player<br>
version 10.3.181 or less then the web page would display the text or<br>
code based on that users exact flash player version.<br>
The code below is something i tried to write that would be compatible<br>
in IE,FireFox,Safari and etc but my syntax is not correct because it<br>
does not work at all.<br>
<br>
Could someone help point me in the right direction?<br>
<code><br>
<html><br>
=A0 =A0 =A0 =A0<head><br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<title>DISPLAY TEXT BASED ON FLASH VE=
RSION</title><br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<meta http-equiv=3D"Content-Type&qu=
ot; content=3D"text/html;<br>
charset=3Diso-8859-1" /><br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<script type=3D"text/javascript&quo=
t; src=3D"swfobject.js"></script><br>
<br>
=A0 =A0 =A0 =A0</head><br>
=A0 =A0 =A0 =A0<body><br>
=A0 =A0<script type=3D"text/javascript"><br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0swfobject.registerObject(&q=
uot;myFlashContent", "10.3.181");<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if(myFlashContent < 10,3=
,181)<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0document.write("You ha=
ve less than 10.3.181");<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0document.wr=
ite("CONGRATULATIONS you have equal to or Greater than<br>
10.3.181");<br>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}<br>
=A0 =A0 =A0 =A0</script><br>
=A0 =A0 =A0 =A0</body><br>
</html><br>
</code><br>
Or any script that would accomplish the same thing with document.write<br>
would be helpful.<br>
Please advise... thanks in advance.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
--<br>
You received this message because you are subscribed to the Google Groups &=
quot;SWFObject" group.<br>
To post to this group, send email to <a href=3D"mailto:swfobject@googlegrou=
ps.com">swfobject@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href=3D"mailto:swfobject%2=
Bunsubscribe@googlegroups.com">swfobject+unsubscribe@googlegroups.com</a>.<=
br>
For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/swfobject?hl=3Den" target=3D"_blank">http://groups.google.com/group/sw=
fobject?hl=3Den</a>.<br>
<br>
</font></span></blockquote></div><br></div>
--f46d0421ad614ac5d504be86807d--