Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Need Help: Conditional Statement Syntax based on Exact Flash Player Version
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
RFX  
View profile  
 More options Apr 25 2012, 3:40 pm
From: RFX <reg...@gmail.com>
Date: Wed, 25 Apr 2012 12:40:44 -0700 (PDT)
Local: Wed, Apr 25 2012 3:40 pm
Subject: Need Help: Conditional Statement Syntax based on Exact Flash Player Version
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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aran Rhee  
View profile  
 More options Apr 25 2012, 4:13 pm
From: Aran Rhee <aran.r...@gmail.com>
Date: Wed, 25 Apr 2012 15:13:14 -0500
Local: Wed, Apr 25 2012 4:13 pm
Subject: Re: [SWFObject] Need Help: Conditional Statement Syntax based on Exact Flash Player Version

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RFX  
View profile  
 More options Apr 25 2012, 5:48 pm
From: RFX <reg...@gmail.com>
Date: Wed, 25 Apr 2012 14:48:56 -0700 (PDT)
Local: Wed, Apr 25 2012 5:48 pm
Subject: Re: Need Help: Conditional Statement Syntax based on Exact Flash Player Version
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aran Rhee  
View profile  
 More options Apr 26 2012, 10:09 am
From: Aran Rhee <aran.r...@gmail.com>
Date: Thu, 26 Apr 2012 09:09:21 -0500
Local: Thurs, Apr 26 2012 10:09 am
Subject: Re: [SWFObject] Re: Need Help: Conditional Statement Syntax based on Exact Flash Player Version

I would suggest you call the getFlashPlayerVersion() method instead and
then do a number comparison on the major/minor/elease properties as needed:

<script type="text/javascript">

function outputPlayerversion() {

var playerVersion = swfobject.getFlashPlayerVersion(); // returns a
JavaScript object

var output = "You have Flash player " + playerVersion.major + "." +
playerVersion.minor + "." + playerVersion.release + " installed";

alert(output);

}

//outputPlayerversion(); // testing before the DOM is available is not
fully reliable in non-Internet Explorer browsers
swfobject.addDomLoadEvent(outputPlayerversion);

</script>

Cheers,
Aran


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »