Pages: [1]
  Print  
Author Topic: Version 3.0.5  (Read 2526 times)
steven
Gaia Author
Administrator
Gaia Evangelist
*****
Posts: 3472


gaiaframework
WWW
« on: March 04, 2009, 01:42:08 PM »

Gaia Framework for Adobe Flash v3.0.5
Release Date: 03.04.2009

This version of Gaia no longer available.

3.0.5 Overview
This release adds a few new features to Gaia and fixes a couple of bugs.  The NetStreamAsset has been improved in both AS3 and AS2 and a new class NetStreamAssetEvent has been added. There's new API methods, setGlobalVolume() and getGlobalVolume(), and the gotoRoute method has been modified to allow passing of deeplinks.  The Panel now saves the last project's folder path names so you don't have to change them each time you make a new project and TweenMax has been updated to 10.11.


NetStreamAsset Improved
NetStreamAsset has been improved in both AS3 and AS2 with  a new helper method, attach(), as well as real event listeners for the client "events" that currently exist.  Also, AS3 now has support for F4V.

attach(video:Video):void

This helper method is a substitute for the much longer video.attachNetStream(assets.myVideoAsset.ns) (or video.attachVideo in AS2).

Now, you simply pass a valid video instance to attach() and Gaia handles the rest.

Code:
var video:Video = new Video();
assets.myVideoAsset.attach(video);

The NetStreamAsset also now has an event class, NetStreamAssetEvent.  This class is for setting up listeners for all the "client" events that NetStream fires.  Note that you have to set your NetStreamAsset preload="false" in the site.xml to listen for certain events like onMetaData.

In AS3, these events are onMetaData, onCuePoint, onImageData, onTextData and onXMPData.
In AS2, these events are onMetaData, onCuePoint, and onStatus.

The NetStreamAssetEvent has one property, info, which is the object passed with the event.  This makes it easy to detect when the onMetaData event fires on your NetStreamAsset.

Code:
INetStream(assets.myVideoAsset).addEventListener(NetStreamAssetEvent.METADATA, onMetaData);

private function onMetaData(event:NetStreamAssetEvent):void
{
    trace("width: " + event.info.width + ", height: " + event.info.height);
}

In AS3, NetStreamAssets now dispatch AsyncErrorEvent, so you can listen for that.


setGlobalVolume() / getGlobalVolume()
Gaia now has support for setting the global volume in both AS3 and AS2.  You can also fade the global volume and optionally pass a callback method when the fade is complete.

setGlobalVolume(value:Number, duration:Number = 0, onComplete:Function = null):void
getGlobalVolume():Number

Code:
// set the global volume to 50%
// AS3
setGlobalVolume(0.5);
// AS2
setGlobalVolume(50);

// fade the global volume to 0 over 3 seconds
// AS3 & AS2
setGlobalVolume(0, 3);

// fade the global volume to 100% over 5 seconds and call a method when finished
// AS3
setGlobalVolume(1, 5, onGlobalFadeComplete);
function onGlobalFadeComplete():void
{
    trace("global fade complete");
}

// AS2
setGlobalVolume(100, 5, Delegate.create(this, onGlobalFadeComplete));
function onGlobalFadeComplete():Void
{
    trace("global fade complete");
}


gotoRoute deeplink support
gotoRoute now supports deeplinks beyond the site.xml.  Simply pass the deeplink as the second parameter.

gotoRoute(route:String, deeplink:String = null, flow:String = null):void;

Code:
Gaia.api.gotoRoute("home", "/my/deep/link");

Gaia.api.gotoRoute("contact", null, Gaia.REVERSE);

I decided to push the optional flow parameter to the third position (since it's rarely, if ever, used), so, if you're currently using gotoRoute() and you update your project, you'll need to find and replace any instances where you're passing a flow as the second parameter and put null as the second parameter and push your flow parameter to the third position.  A find and replace in files should take care of it for you.


Panel saves last project's folder paths
The Gaia Panel now saves the most recently opened project's folder paths.  So, if you have your own project paths that you use every time, the panel now remembers them when you make a new project.


Minor bug fix
The AS2 IGaia interface was missing the setLoadTimeout() method.  This has been resolved.


My email removed from licensing comments in classes
Due to many people on the forums and elsewhere copying and pasting the comment block at the top of Gaia classes (please stop!) into their posts, I have removed my email address.  The amount of spam I receive has gone up dramatically because of this.  I think everyone knows to come to the forums now anyway!  Wink


TweenMax 10.11
Gaia 3.0.5 includes the latest version of TweenMax, which contains a new Plugin type for AS3 and AS2.  Read more on the official TweenMax site.

http://blog.greensock.com/tweenmaxas3/
« Last Edit: March 09, 2009, 10:05:35 PM by steven » Logged

Steven Sacks | Gaia Author
Please support Gaia by donating to the project!  Smiley
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc