Archive for the ‘XHTML’ Category

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, June 4th, 2007

Photo Sharing and Video Hosting at PhotobucketIn case you haven’t heard the SWFObject creator Geoff Stearns and the UFO creator have teamed up to create a new Flash Embed kit for HTML/XHTML called SWFFix that is more DOM compliant yet works.  Its always been a battle on this front of DOM standards vs Javascript when it comes to Flash embedding.

This teamwork to make a common kit will help to consolidate all issues with this and hopefully provide a really solid platform for embedding flash that takes into account all browser and satisfies standards but also works all the time. Making it harder to vote against when it comes time to decide what technology to use.

Of course there have been libraries like SWFAddress (for deep linking in flash and back button support easily) that have been built on top of SWFObject that will have to be switched over that have large user bases and following.

Check out SWFfix (of course this project has been very quiet and is not public since Feb 6-7th) hrm.