Detect Flash Player Version | Actionscript based detection method (as2)

Google Buzz

looking for this in as3!? look no more Detect Flash Player Version | Actionscript based detection method (as3)

Overview

Recently I had a requirement that I had to detect which version of the flash player was currently installed. This is a normal thing, we do it all the time when embedding flash into html, we detect which version of the player is installed and if the user has an old version they are invited to upgrade…

But what about finding the flash version from within flash? An actionscript based detection method? I hadn’t ever thought about doing that…

It turns out it is very simple. From adobe I found the flash detection kit. Which had a lot of code I didn’t need. I only want to know what version of the player is running, not forward to upgrade sites and redirect… So I made this little testing file to save and share what I learned:

Steps

Internally flash knows it’s version number as $version. So to read it we must evaluate that variable.

eval(“$version”);

This returns a string, 3 letter operating system, a space, and then the version number as four numbers seperated with commas.
I display the $version and to split it out I split the string on the space, and then split the version number with the comma delimiter and display them all.

Example

Here’s what mine is (gif):

version detection actionscript gif

And here’s what yours is (swf):

Get Adobe Flash player

Actionscript (as2)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version = eval("$version");

//The operating system: WIN, MAC, LNX
var osType;
//The player version.
//The latest as of December '07: 9,0,115,0
var majorVersion; //9
var majorRevision; //0
var minorVersion; //115
var minorRevision; //0

vers.text = version;

osArray = version.split(' ');
osType = osArray[0];

versionArray = osArray[1].split(',');
majorVersion = versionArray[0];
majorRevision = versionArray[1];
minorVersion = versionArray[2];
minorRevision = versionArray[3];

Download

Here’s the source fla file: flash version detection actionscript method

Let me know how and if you find this useful

  • del.icio.us
  • Digg
  • email
  • Facebook
  • FriendFeed
  • Google Bookmarks
  • Hexosearch
  • LinkedIn
  • Mixx
  • Print
  • PDF
  • StumbleUpon
  • Technorati
  • Twitter
  • RSS
Posted in tutorial | Tagged , , , , , | 6 Comments

Free IQ Player Updated!

Google Buzz

Here’s a post from the Free IQ Team!

We’ve been busy at Free IQ and just released our new video player!

Check it out by watching Brad Fallon on the vision of Free IQ.
Or see circlecube at Free IQ!

At the surface, the player looks much the same, but as you dig into the secondary functions, you’ll see a slew of enhancements made with you and all freeiq-ers in mind.

The layout has been updated to be more dynamic, more readable and web 2.0 friendly. The graphics got a make-over.

The updates to the playlist have cleaned up the interface and give helpful information about the content. We still get the ReviewRank for each item, and also we can see our personal viewing history, a feature we’re calling the ‘high water mark’. You can see how far into a video you’ve been. This high water mark is also shown in the scrub bar, for returning to where you left off quickly, just click the yellow arrow to return. Also the video currently being played in the player is specified as ‘Now Watching’ (how original).

Playlist

The author window still displays the author’s portrait, biography and links to the author page. The author biography may contain html- such as links, which help viewers learn more about authors.

Author

The IQPON window connects viewers to providers by giving users access to the content provider’s services!

IQPON

Sharing options have been improved greatly!

Users may embed content on their own site directly from the player now! By choosing options for auto play and format user’s copy embed codes straight from the player, and paste it into their own site. The normal format uses javascript to ensure maximum compatibility with different browsing software, and the the extra simple format is for embedding content into sites which restrict javascript, such as MySpace and a handful of others, so there is always a way to embed content into your very own space.

Embed

Sharing by email is much faster now, as you can send to multiple people at once directly through the player itself (just separate the email addresses with a comma).

Email

Sharing with the web is just as easy! You can copy the link or click your preferred social bookmarking site. Social bookmarking capabilities are built into the player, so with one click you can bookmark content to any of a number of social bookmarking sites (del.icio.us, digg, furl, google bookmarks, magnolia, reddit, stumble upon, technorati, windows live favorites and yahoo! bookmarks) with more to come.

Social Bookmarking

All these methods are used to share content and are useful no matter where the player is embedded!

This player release features updates to the Full Screen mode as well. To take full advantage of the screen size we stretched the control across the bottom of the screen! The control tray will slide away after a few seconds giving access to full screen video playback. To bring the controls back, just more the mouse again.

Volume controls are updated for faster more intuitive interactive control.

By using the internal menu (just right-click to access it) you have access to all options in the player.

Menu

Also updated with this release is the integration with Google Analytics! There is new tracking built into the player and best news of all is that the player now supports both versions of the Google Analytics Tracking Code. So whether you’ve updated to the new tracking system or still use the Legacy code, this player logs interactions with the player to your google analytics reports! It will tell you how much people are watching your videos, which ones and how users interact with the player on your site. We’ll post about that later, once you’ve gotten used to your new player!

Another point to mention… if you’re a Free IQ regular and have already embedded content onto your site, the updates are automatic. You have nothing to do to enable these updates! It’s already done!

Enjoy the updates, we put a lot into it!

Let us know any suggestions you have for making the Free IQ video player even better – for you!

  • del.icio.us
  • Digg
  • email
  • Facebook
  • FriendFeed
  • Google Bookmarks
  • Hexosearch
  • LinkedIn
  • Mixx
  • Print
  • PDF
  • StumbleUpon
  • Technorati
  • Twitter
  • RSS
Posted in portfolio, work | Tagged , , , , , , | Leave a comment

FLEX | 360 Atlanta | Day 3

Google Buzz

From the community…
people I saw quickly but didn’t get to attend their session: Renaun showed off his voip app Pacifica,  Zach from Yahoo showing some things available with Yahoo Maps AS3 API, Adam talking about Merapi where you can access Java from AIR apps and Joe showed us some awesome music app he’s working on, keep your ears open for noteflight(?)!

Brad Umbaugh- Practical 3-D: Immersive interfaces for regular people

Brad Umbaugh , Senior Developer @ effectiveui. In the discussion of 3D we pointed out that 3D is associated with the future. There have been many 3d success stories such as: games, CAD, sketchup, maya… But we decided that making good 3D interfaces is a lot different than making 3D interfaces- just because it’s 3D doesn’t mean it’s good.
Brad explained the steps in the 3d graphics rendering pipeline: place object in world coordinate system, illuminate models, transform world coords to viewing coords, perform clipping, project to screen and rasterize. Luckily there are 3d engines that will do all of this so we don’t have to think about it. It takes a lot of Linear Algebra Math. 3d apps are constantly performing lots of calculations, and thus can perform rather poorly.
Brad discussed the process of his Discover Earth Live project. They started project with papervision3d, but had problems with pinpoints and how they were wrapping around the globe as it spun. So, they tried Away3d and it fixed these problems “out of the box”. Another plus to Away3d they found is that it lets us do correct Z ordering.
We then talked about setting up the scene in away3d and making objects and he showed some 3D Globe examples: nike, mars.com, wii forecast, discovery earth live.

Ben Stucki – Reinventing Flex:

Ben an independent flex developer (nice soundtrack by the way), let’s talk about Flex, baby.
He started out giving everyone a pair of red/blue anaglyphic 3D glasses and showing us mr doob’s anaglyphic rendering tests. The 3d glasses work by filtering different colors to give your eyes two different views of the same image. Red filters out the red lines, cyan filters out the green/blue lines.
Ben has his own staging area for code that’s not yet released… lots of it is probably broken… but it is open source (benstucki.googlecode.com).
Ben then walked us through lots of openflux, his project that is rebuilding some built in componentes of flex with different proerties and capabilities in mind. Great job Ben!

Dave Hassoun – Flash Video tips (and tricks)

Dave from realeyes taught us about video codecs! Flash video gives us the compression options of sorenson, on2 VP6 and the famed H.264.
Sorenson is easy on cpu performance, but struggles with good color and quality. For the quality the file size is a bit high, but sorenson is a good standard.
on2 vp6 has high quality image, but lots of processing demand, plus it has transparency capabilities!
h.264 (& AAC/AAC+ audio is the newest with the most bells and whistles. As it’s new it’s only supported by flash player 9 (which is beginning to be less and less of an issue). It does support true HD video (1080p), multi-core support, many devices, and lots lots of metadata.
A general rule (equation) to help with encoding:

1
frame height x frame width x frame rate) / compression = total bits/sec

Tools he mentioned to help with encoding: rools, riva, fmpeg, on2fix, sorenson squeeze, cs & adobe media encoder.
Dave pointed out that flex video integration was simple, but too simple, making it weak. There is only video display, which is very simple. AS3 is way better equipped to handle video.
h264 streaming requires a streaming media server, can stream or seek to any point (non-linear or random access), has quicker playback and is much more secure. H264 contains a lot of metadata: length, dimensions, codec, seek points, cover art, subtitles, audio book chapters, image tracks, and more!
Dave’s tips for video compression: quality in, quality out | use the right codec for the job | be creative | code reusability! write stuff to be reused | metadata is your friend, use it
He gave so many resources! I won’t copy them here, so go check his Presentation Notes and source. Here is one resource though, Tinic Uro’s blog about the flash player and video.

Juan Sanchez – Degrafa

Juan (better known as scalenine) taught about his open source project Degrafa – Declarative Graphics Framework for Flex. Degrafa uses mxml to make graphics so you don’t have to use the AS3 drawing API! It makes drawing objects more intuitive and allows you to do it using less code! Plus, rather than creating graphics in photoshop and importing the static image (which takes more memory and then can’t be modified), we can bind properties to the graphic and make it dynamic in flex. So far Degrafa allows us to make surfaces, shapes, objects, fills, strokes, groups, geometry compositions, segments, graphic image, graphic text, and even use svg path data, with much much more in the works! Degrafa is a great way to add custom graphics to your app and it supports advanced css as well, so it is very simple to skin your app! Juan showed us many examples of what degrafa can do and promised there is much more soon to come. Thanks for this great library Juan and everyone else at degrafa, and thanks for the T-shirt as well!

Personally, I got the most out of Day 3 at the conferenc! It was awesome! I got to attend sessions about 3D, drawing graphics, and video! Thanks to all the speakers and Big Thanks to Tom and John, who are Flex360!

  • del.icio.us
  • Digg
  • email
  • Facebook
  • FriendFeed
  • Google Bookmarks
  • Hexosearch
  • LinkedIn
  • Mixx
  • Print
  • PDF
  • StumbleUpon
  • Technorati
  • Twitter
  • RSS
Posted in personal, work | Tagged , , , | Leave a comment

FLEX | 360 Atlanta | Day 2

Google Buzz

Johnny Boursiquot – AIR Infrastructure to manage licensing maintenance and monetization of AIR apps

This is important information as more and more apps ar looking at using AIR to make apps. Discussion on how he’s deployed for large corporations including Avaya, Honeywell, Seagate and others. We need to be thinking about how to license the apps we make!
He’s promised a version of his slide show here: Developers Pierinc

Renaun Erickson – QTIndexSwapper H.264

The flash player now supports H.264 format video files! This is great but one problem is the meta data is placed at the end of the file and therefore the video can’t be accessed until it is fully loaded to the end. The metadata (moov) needs to be loaded before the play knows how it’s indexed. Renaun showed a technique he’s been playing with. He has an AIR app that will move the meta data to the beginning of the file for viewing during progressive download! He also talked about other meta data, like album art, and stuff, he’s promised more links to be posted on his blog
So far, here’s the source at Renaun’s site
More info posted about H264 and Flash by Dave Hassoun at Adobe’s Developer Center

Andy Edmonds – Scrutinizer

Discussing the psychology of vision (fovea and peripheral). We discussed how better design relates to a sites efficiency. Andy showed a couple videos from stomperNet (which can be found at the Going Natural 2 page or stomperNet’s youTube channel) and showed a demo of the Scrutinizer AIR app which is available for free beta download at About.StomperNet.com . Scrutinizer is a browser which forces you to see the internet how your eyes see it, rather than how you brain puts together what your eyes see. It has a layer which blurs the rendered html page, and also a layer which desaturates the colors, which modifies the page as you are looking at it. The browser attempts to show you what you are looking at, but importantly it disconnects your vision from your eye, using instead the mouse so you can actually look at your peripheral vision. Like the “squint test”, where you squint your eyes to see the general overview of a page, this page is blurred to only show the most dominant designs. An interesting tool hat can be used to improve site designs and efficiency.

Doug McCune – Open source Flex community projects

A great discussion about projects and opensource communities. Doug loved to point out that you can take two open source libraries and mash them together to make your own thing.
A few places to find open source code: google, flexbox, ria forge, and a growing number of personal blogs
An example was FlexSpy (basically a debugger that runs live in your flex app) in which Doug added his own part to the existing open source code to monitor all event listeners in addition to all the debugging features already existing in flexSpy.
A highly recommended plugin for flex (eclipse) is subclipse, which adds svn repository, checkout source as flex library project, build swc, add to your build path…
List of open source libraries discussed: (I’ll try to add all the links later)
Big open source libraries for as3 and flex: flexLib (now including flexMDI), minimalComps, AsWing, openFlux
Graphics Libraries: Degrafa (declarative graphics framework – lets you write graphics in mxml tags), Singularity (Jim Armstrong’s math library), AlivePDF (create pdf in actionscript).
Physics engines: Actionscript Physics Engine (APE), Box2D and Motor 2 (both more of an as3 feel) (almost the same), FOAM (note that with physics engines there are differences between the particle based and rigid body based engines.)
3D: PaperVision 3D (most popular3d engine), Away3D (was a branch of papervision, but is now seperate), Sandy, wow (3D physics engine)
Flex specific uses: Alex Uhlmann’s Sandy distortion effects library, Tink’s PV3D transitions..
Tweening (moving an object property from a to b, set something with a transitional effect): Tweener, KitchenSink (MosesSuposes.com)

The Summarizing moral: Don’t reinvent anything, but don’t trust other peoples code blindly. Give credit where credit is due, and contribute back to the community.

James Echmalian – Enhancing Flex Presentations with Bitmap Technques

Bitmap data is just a 2D array of pixels with 4 channels (red, green, blue, and alpha).
Bitmaps are a view of a bitmapdata class, inheriting displayObject properties (height width, scaleX, scaleY, rotation, visible…) but bitmapData and bitmap are not the same thing.
Image – loader – loads an image out of an external file using loader, converts formatted data into display objects automatically.
Image – display – wraps a bitmap, is a flex component, has properties, styles controls…
Demo source to show bitmap editing will be on site ech.net/360flex2008 and ech.net/blog contains all source and annotated slides.

Special thanks goes out to all the Flex|360 Day Two Speakers!

  • del.icio.us
  • Digg
  • email
  • Facebook
  • FriendFeed
  • Google Bookmarks
  • Hexosearch
  • LinkedIn
  • Mixx
  • Print
  • PDF
  • StumbleUpon
  • Technorati
  • Twitter
  • RSS
Posted in personal, work | Tagged , , , , | 2 Comments

FLEX | 360 Atlanta | Day 1

Google Buzz

flex atl 360

Matt Chotin – Keynote

Review: The big announcement! Air 1 and Flex 3 are here! And what more Flex has gone open source, well done!
And I can’t continue without mentioning Matt’s Flex Flex Behind the Scenes Video

John Mason – FlexUnit and Unit Testing

John talked about his FusionLink and TDD (test driven development).
Unit testing – is making test files that automatically tests your code for logical errors. We know the compiler will catch any syntax errors or things like that, but what about logic?
ASUnit – unit testing framework for actionscript
I will definately be looking into Unit Testing, I’ll probably go the ASUnit route, as I mostly code in actionscript.
We talked a bit about ANT, an automating Build processes which sounds very exciting for a few projects I’m working on.
Some key points I took away: some unit testing is better than none.
It is more work at first, but in the long run can and usually will save lots of time.
The computer can automate a lot of the heavy lifting. Another good ides is to include unitTesting classes in your svn repository.
Here’s the lecture notes:
source and slides @ labs.fusionlnk.com
video of presentation @ http://www.carehart.org/ugtv

Ben Forta – Flex and latest Cold Fusion

A lot of this went over my head, but I am not a cold fusion expert, like the majority of those who attended this section. But hey, now at least I’ve seen some cold fusion! I just had to go and hear Ben Forta!

Jeff Houser – Code reuse with Flex and AIR

Great presentation discussing reusing code in AIR and Flex. I should have taken better notes, a great side note is I am now a subscriber of The Flex Show!

(Jesse Warden) – Big And Famous

How to succeed as an independent developer (to which append ‘or designer’)
Great session, I realy like the open discussion we had. I’m guessing because Jesse wasn’t there (he’s actually in the hospital, get well soon Jesse). Doug Mccune and Juan Sanchez headed up the discussion. Doug had a slide show about branding yourself which I totally agree with.
1. Blog – I hands down agree with this. The blog is the new resume, and plus the new portfolio. I use it as a place to collect code I want to remember (I figure if I’m keeping it I mght as well share it and showcase it. Might as well document the work I do cause I am already doing the work)
2. Use your name (or alias) – Yes it is definately nice to have a presence, and without a name I don’t think it’s really possible. Doug felt strongly to use your name and face and be very personal, I think as a developer that is important, although there are imporant advantages to having an alias and logo rather than a name/face, as Juan is proof of with ScaleNine (who is more of a designer).
3. Use your face
4. Make a Logo
5. Make Business cards
6. Be social and active in the blogosphere. – This one is important. You gotta do it all the way. If you’re a blogger wanting to et better known, be involved in the blogosphere! Communicate with others and comment on what you’re reading from others as well.

Well that sums up the official first day of Flex 360 Atlanta!

  • del.icio.us
  • Digg
  • email
  • Facebook
  • FriendFeed
  • Google Bookmarks
  • Hexosearch
  • LinkedIn
  • Mixx
  • Print
  • PDF
  • StumbleUpon
  • Technorati
  • Twitter
  • RSS
Posted in personal, work | Tagged , , , | 1 Comment

Men Circles | Interactive Experiment

Google Buzz

Here’s a graphic of a circle of men. You may recognize the outline from any public restroom. They’re standing in a corny circle holding hands, like an all over the world theme., let’s just hope they all washed their hands…

I made the graphic a while ago, and have been wanting to interactive-ize it. I’ve really been wanting to play with elasticity, throwing things and snapping to a point… Although I’m still thinking about a version where I’d spin the objects rather than just throw them, I figured I’d put it up for any feedback that comes.

[kml_flashembed publishmethod="dynamic" fversion="9.0.0" movie="http://blog.circlecube.com/wp-content/uploads/2008/02/MenCircle.swf" width="550" height="550" targetclass="flashmovie"]

Get Adobe Flash player

The different pieces all rotate differently and it changes if you are dragging or ‘holding’ them. Then you can press the anchor (gray) button to toggle the snap. The objects will all center around the anchor and spring into place (elasticity applied to position and rotation). And then the interactivity changes and rather than dragging and dropping them, you push and bump or throw them. It almost turns into a game…

Here’s some of the actionscript

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
_root.tr = 0;
_root.k = 0.2;
_root.damp = .9;
_root.margin = 150;
_root.heads.ax = 0;
_root.heads.vx = 0;
_root.heads.ay = 0;
_root.heads.vy = 0;
_root.heads.ar = 0;
_root.heads.vr = 0;
_root.heads._x = (Math.random() * (Stage.width + _root.heads._width)) - _root.margin;
_root.heads._y = (Math.random() * (Stage.height + _root.heads._height)) - _root.margin;

//Heads
_root.heads.dragging = false;
_root.heads.onEnterFrame = function() {
if (!_root.center.dragging){
if (_root.heads.dragging){
this._rotation += 1.2;
}
else {
rot = this._rotation + Math.random();
xmouse = _root._xmouse/Stage.width;
this._rotation += rot + xmouse;
}

this._x+=Math.random()*2 - 1;
this._y+=Math.random()*2 - 1;

}
else {
//_root.heads._x = _root.center._x;
//_root.heads._y = _root.center._y;
_root.heads.ax = (_root.center._x - _root.heads._x) * _root.k;
_root.heads.vx += _root.heads.ax;
_root.heads.vx *= _root.damp;
_root.heads._x += _root.heads.vx;

_root.heads.ay = (_root.center._y - _root.heads._y) * _root.k;
_root.heads.vy += _root.heads.ay;
_root.heads.vy *= _root.damp;
_root.heads._y += _root.heads.vy;

_root.heads.ar = (_root.tr - _root.heads._rotation) * _root.k;
_root.heads.vr += _root.heads.ar;
_root.heads.vr *= _root.damp;
_root.heads._rotation+=_root.heads.vr;
}
this.onPress = function() {
startDrag(this, false);
_root.heads.dragging = true;
}
this.onRelease = this.onReleaseOutside = function() {
stopDrag();
_root.heads.dragging = false;
}
this.onRollOver = function() {
if(_root.center.dragging){
startDrag(this, false);
_root.heads.dragging = true;
}
}
this.onRollOut = function() {
if(_root.center.dragging) {
stopDrag();
_root.heads.dragging = false;
}
}
}

//Button
_root.center.dragging = false;
_root.center.onEnterFrame = function() {
this.onPress = function() {
startDrag(_root.center, false);
_root.center.dragging = !_root.center.dragging;
if (_root.center.dragging) {
this.gotoAndStop("on");
}
else {
this.gotoAndStop("off");
}

//var vr:Number = 0;
}
this.onRelease = this.onReleaseOutside = function () {
stopDrag();
//_root.center.dragging = false;
}
}
  • del.icio.us
  • Digg
  • email
  • Facebook
  • FriendFeed
  • Google Bookmarks
  • Hexosearch
  • LinkedIn
  • Mixx
  • Print
  • PDF
  • StumbleUpon
  • Technorati
  • Twitter
  • RSS
Posted in portfolio | Tagged , , , , , , | Leave a comment

Reason Live @ Caledonia Lounge 5 Feb 2004

Google Buzz

REASON ~ Live at the Caledonia Lounge ~ 5 February 2004

reason rockman

If you know me you probably know that I love music, and that I love to play music…

I have been in a few bands before, not for the money (cause there wasn’t any), nor the fame (not much of that either), but for the fun. Looking through my old stuff, I found a recording of what I consider the most fun concert I played. I’ve talked with people about the “rocking” days and had no point of reference, so here it is, the point of reference. I just wanted a place to put this for anyone that’s interested. Because at home, these tracks aren’t doing much- other than collecting dust. So noticing that it is now over four years old, I want to give it away for the music-ly minded out there. Enjoy!

reason caledonia lounge cover art

This is Reason, the band, which is now dis-banded, but we had fun while it lasted.

Reason was: Chris Scredon, Evan Mullins and Rhett Coleman

Here is the set list from the show (note my favorites):

01 Intro
02 On the Riverbed
03 Miss America
04 Cats Have Freedom Too
05 Aquarius
06 Broken Bones
07 Time And Again
08 Shout (Beatles cover)
09 Goodbye To Forever
10 Never Needed
11 Lullabye
12 Nathaniel
13 Holiday

Reason-5Feb2004-CaledoniaLounge.zip

The songs are all copyright to either Reason or Chris.

For more info visit the old reason website I made. Or this outdated MySpace page

Here are a few of my favorites for online listening through circlecube at FreeIQ

  • del.icio.us
  • Digg
  • email
  • Facebook
  • FriendFeed
  • Google Bookmarks
  • Hexosearch
  • LinkedIn
  • Mixx
  • Print
  • PDF
  • StumbleUpon
  • Technorati
  • Twitter
  • RSS
Posted in personal | Tagged , | Leave a comment

Dynamic Flash Vertical Scrolling Link List with XML download at Flashden

Google Buzz

Go get the source files at Flashden

[kml_flashembed publishmethod="dynamic" fversion="9.0.0" movie="http://blog.circlecube.com/wp-content/uploads/2007/08/linklist.swf" width="550" height="500" targetclass="flashmovie"]

Get Adobe Flash player

circlecube on FlashDen

Other Circlecube Items at FlashDen

21075 24687 45713 45893 22018

  • del.icio.us
  • Digg
  • email
  • Facebook
  • FriendFeed
  • Google Bookmarks
  • Hexosearch
  • LinkedIn
  • Mixx
  • Print
  • PDF
  • StumbleUpon
  • Technorati
  • Twitter
  • RSS
Posted in portfolio | Tagged , , , , , , , , , , | 9 Comments