Archive for the ‘FLEX’ Category

Tuesday, December 30th, 2008

SWFAddress 2.2 has been released.  SWFAddress is pretty much THE solution for deep linking in flash and works greatly in combo with THE embedding solution into (X)HTML/Javascript for flash SWFObject.

The new SWFAddress has just arrived after seven months of active development, various contributions and lots of positive feedback from the community. The list of changes includes the following:

  • Refactored JavaScript implementation
  • New SWFAddress.swc AS3 component
  • New CS4 based Splash screen sample
  • New Digg API sample
  • New up() method for easier deep linking path navigation
  • New XSS protection that doesn’t affect special characters
  • Support for Internet Explorer 8
  • Support for custom HTTP status messages in the SEO sample
  • Improved title handling
  • Improved unload event handling for IE
  • Updated Rails sample
  • Fixed getBaseURL() for AS3
  • Fixed Safari 2.0-2.0.3 support
  • Build-in fix for the Firefox 3/Mac OSX blinking effect
  • Additional onLoad fix for application/xml content type
  • Fixed optional options parameter for the popup method
  • Cross platform build script
  • Various optimizations

I believe that this new version is pretty stable and won’t require an update soon. There are two known Safari bugs (19202 and 20355) that currently affect the project and we can only hope that they will make it’s way into the next major release of the browser.

SWFAddress has grown significantly in the last two years and it’s very likely that we’re going to provide a lite version for users who need just the basic functionality. Very soon the same API will become available for Silverlight and we’re also scheduling the development of a jQuery plugin.

Tuesday, December 23rd, 2008

I have mentioned before that flash to unity3d communication is a key part of game development for the web now where you are using Unity3D as a higher end renderer and some of your other page elements might be flash. Now there is a new open source kit for this called u3dobject.

To get Flash and Unity3D to talk to one another in an HTML/XHTML page is pretty simple with javascript and with the internal Unity3D Application object and the ExternalInterface in Flash.  But there are lots of elements of that communication that can be consolidated and reused so you don’t have to recreate that over and over.  Various studios and programmers come up with their own kits but when it becomes a shared activity to get the best integration and make it more of a platform that is where things like swfobject, swfaddress and u3dobject come in.

So far swfobject is the standard for flash html embedding and unityObject is a similar take (but a bit dated) on that but now we have u3dObject that is open as well and a more official open source project for unity3D <–> flash integration and test harnesses for development when those two technologies are used together.

Unity3D <-> Flash Embedding Info:

Friday, December 12th, 2008

Adobe stratus sounds pretty interesting for flash client to client communication much like peer to peer networks for small numbers of people.

Want to build a video chat application, multi-player games or voice-over-ip applications for the Flash Player or AIR without worrying about setting up a server infrastructure? Stratus (which we showcased at MAX) is your new best friend.

Stratus is a beta hosted rendezvous service that helps establish communication between Flash Player or AIR clients. Once two clients are connected to Stratus, they can send data directly client to client. The APIs in Flash Player 10 and Adobe AIR 1.5 allow for point-to-point communication between a small number of subscribers. Publishers have to send data to all subscribing clients, so the number of subscribers is limited to the available bandwidth on the publisher end.

This must be one of the first Real-Time Media Flow Protocol (RTMFP) protocol usage programs from Adobe?  Basically this protocol is adding better UDP or broadcast support which allows for larger sets of users and is common in large scale real-time games.  Here it seems to be more of a peer to peer usage rather than authoratative approach (maybe flash media server will have large user set support with this) which limits to about 15 users or the lowest latency in the group with anything close to real-time syncing. Stratus seems like more of a matchmaking middle man to help with nat punchthrough and then it relies on peer to peer.  But more fun in store checking it out.

P2P like this can’t really be used for games due to cheating unless one client is the independent server but this works great for small file sharing apps, whiteboards, chats, watching videos at the same time, etc.

Thursday, December 11th, 2008

(more…)

Thursday, December 4th, 2008

When you do lots of any language you build up libraries over time that are time savers that are repetitive and tedious if you do not consoildate into a library.  Taking a look at the CASALib, an as3 library of common functions for flash that was released I have many of the same things in my libraries but CASALib just has lots of extras that go a bit deeper than some libraries, is very clean and is organized pretty well.

One cool thing about it is the IDestroyable interface and the CasaMovieClip, CasaSprite, CasaTextField , etcthat all have a destroy() method that cleans up all events, removed instances and even removes it from the parent display object. Gets me thinking why this isn’t just part of DisplayObject in the first place.

From the release:

Here are a few of our favorite things in CASA Lib AS3:

  • Standardized external load API
  • Easily remove listeners with IRemovableEventDispatcher
  • destroy methods make garbage collection easy
  • Large group of utility classes for common manipulations

We will be elaborating further the power of CASA Lib in future blog posts.

As with any new release there will be bugs that emerge, but with your help we promise to release updates often to keep CASA Lib as stable as possible.

1.0.0 Downloads & Documentation

ZIP: http://as3.casalib.org/releases/1.0.0/1.0.0.zip
SVN: http://svn.as3.casalib.org/releases/1.0.0/
Documentation: http://as3.casalib.org/releases/1.0.0/docs/

[source]

(more…)

Friday, November 28th, 2008

I am working with lots of content now that is flash and unity3d in game development for the web, and occasionally systems built in flash, javascript or other have to communicate with Unity3D and vice versa.  You can do this from the server side (WWW/WWWForm class or sockets) OR you can also communicate client side for many things such as sending name value pairs or variables into Unity3D, Flash or the javascript in page as needed. There are some great tools like UnityObject that is like swfobject (only you have to update it to work with latest browsers) that make this more simple to send in params and messages. The same can be applied to Silverlight. It is pretty simple all in all but having a sample to start with is good with all these technologies.

Paul Tondeur threw togetother a little sample that shows how you can integrate Unity3D, Flash and javascript in the page fairly simply with lots of great demos.  It really is just about passing parameters around into the objects from javascript, then within Flash calling ExternalInterface to call external javascript or within Unity3D calling Application.ExternalCall.

//Flash adding callback for javascript code
ExternalInterface.addCallback("functionNameInBrowser", functionNameInFlash );
//Unity3D calling javascript code
Application.ExternalCall("javascriptFunction", "Parameter1");

Nothing too tasking but if you want to see samples of this working together from flash, flex, javascript, unity3d then check it out. Zip on over to Paul’s site to grab the files and more demos and samples. All examples are bundled in one download, which includes all the Unity3D, Flash, Flex, Actionscript and Javascript files.

Here’s some demos

Monday, November 17th, 2008

Augmented reality is a very cool technology.  It is the star wars holograms that we always want, it is playing a game that maps out the physical world mixed with virtual assets, it is straight up cool.

The FLARToolKit is doing some of this cool in Flash.  This little toolkit is pretty sweet mapping points and sets of points to patterns, colors or other visual queues that technology can latch onto.  Combine this with a webcam and you have some pretty cool AR.

(more…)

Saturday, November 8th, 2008

The YouTube Chromeless Player works with AS3/ActionScript 3.

The demo shows great examples of the player with just the window canvas (chromeless) from both javascript and inside of flash.

The project is hosted on Google Code [youtubechromelesswrapper-as3]

Looks like they maybe had a contribution for this, so do it where you can.

This is something we’ve been wanting to provide for a while, and the YouTube API team greatly appreciates the work of developer Matthew Richmond of The Chopping Block for making it happen. Thanks Matthew!

Links

Capabilities/API

Public Methods

player.loadVideoById(id:String, startSeconds:Number = 0):void
Loads and plays video based on specified id.
player.cueNewVideo(id:String, startSeconds:Number = 0):void
Loads but does not automatically play video based on specified id.
player.clearVideo():void
Clears currently cued/loaded video.
player.setSize(w:Number, h:Number):void
Sets the size of YouTubePlayer instance.
player.play():void
Plays the currently cued/loaded video.
player.pause():void
Pauses the currently cued/loaded video.
player.stop():void
Stops the currently cued/loaded video.
player.seekTo(seconds:Number):void
Seeks to specified time within the currently cued/loaded video.
player.getPlayerState():String
Returns the current state of the currently cued/loaded video.
player.getBytesLoaded():Number
Returns the value of current bytes loaded of the currently cued/loaded video.
player.getBytesTotal():Number
Returns the value of total bytes loaded of the currently cued/loaded video.
player.getCurrentTime():Number
Returns the current position in time of the currently cued/loaded video.
player.getDuration():Number
Returns the current duration of the currently cued/loaded video.
player.getStartBytes():Number
Returns the start bytes of the currently cued/loaded video.
player.setVolume(newVolume:Number):void
Sets the volume of the currently cued/loaded video.
player.getVolume():Number
Returns the current volume of the currently cued/loaded video.
player.mute():void
Stores the current volume and changes the volume of the currently cued/loaded video to 0.
player.unmute():void
Returns the volume of the currently cued/loaded video to the last stored value when muted.
player.getEmbedCode():String
Returns the current YouTube embed code of the currently cued/loaded video.
player.getVideoUrl():String
Returns the current YouTube video url of the currently cued/loaded video.

Events

YouTubeLoaderEvent.LOADED
Fired once the Chromeless Player has successfully completed loading and is ready to accept operations calls.
YouTubeLoaderEvent.STATE_CHANGE
Fired whenever the player’s state changes. The YouTubeLoader class translates the JavaScript API numbers to their related string values, the YouTubeLoaderEvent class stores the current event in a variable called state. Possible values are unstarted, ended, playing, paused, buffering, video cued. When the SWF is first loaded, it will broadcast an unstarted event. When the video is cued and ready to play, it will broadcast a video cued event.
YouTubeLoaderEvent.IO_ERROR
Fired when an error in the player occurs. There are two error codes possible: 100 is broadcasted when the video requested is not found. This occurs when a video has been removed (for any reason), or it has been marked as private. 101 is broadcasted when the video requested does not allow playback in the embedded players.
Wednesday, October 15th, 2008

Mike Chambers posted that Flash Player 10 is officially live. This completes your 1-2 punch of RIA/game platform releases of Silverlight and Flash this week.

We have just released the shipping version of Flash Player 10 (Mac, Windows and Linux). You can find more information on all of the new features on the Flash Player product page.

You can download the player for Mac, Windows and Linux players from here.

You can grab debug and standalone players from here.

You can grab the release notes from here.

Flash Player 10 is great news. There are so many things in it from a new data structure (Vector), to local FileReference, to Matrix and 3D helpers, to speed improvements and video enhancements being able to play other video types and more (this was actually in a late version of flash player 9 as well but will be used more here). It does take time for flash versions to get out in the wild, about 9 months to where they are in the 90%-95% range where you can convince people to use it in production, but getting those skills now is good.  The scripting platform is still Actionscript 3 so anyone still making Flash Player 8 and AS2 stuff is now two revolutions behind.

Another thing I am looking forward to soon (next week) that is missing from both Flash and Silverlight, is the ability to develop for the iPhone, which Unity3D is dropping the iPhone kit on Oct 22nd. Unity3D has effectively taken Director’s 3d game development (hardware accelerated) market lead away this year and late last year and is a great platform. Director who?

Lots of great tools and platforms to create the innovative new applications, games and markets that are so needed right now. Go create!

Tuesday, October 14th, 2008

Silverlight 2 has been released. This is the real silverlight release.  The release last year 1.0 was just a javascript release and only had one object, the downloader, not even a text input.  But now there are real tools like rich ui controls, services support (REST), DLR (C#, Linq, ironpython/ruby) and Sockets which are much needed for games and game platform development.

There are also much better tools at this stage:

Bam. Silverlight 2 is out. There’s the expected stuff, like the final SDK, Expression, and Silverlight tools:

And from Tim’s blog:

But there’s also http://www.eclipse4sl.org/. Yes, that means you can code Silverlight in Eclipse. Details and progress at the Eclipse Tools for Silverlight Blog. It’ll be licensed under the EPL 1.0 License.

I have done lots of Silverlight initially when 1.0 came out as well as the agency I was working at.  We did video players, mini-games, demo apps and even the Halo 3 online manual at silverlight.net.  But it wasn’t really ready until now.  It still has a long way to go to really be an alternative to Flash but it is capable platform at version 2 for applications, mini-games and video apps for sure. But in the end it just provides competition to make both the Flash/Flex platforms and Silveright compete for developer support.