Hi Josh,
So good... now working............. almost fine... ups, sorry... let me explain what's the only strange happens (not crash, only strange movement about the screen with header in transitions):
I modified a little bit the Cover.as class in order to the screen covered have a small movement in the same way of cover screen but only a percentage, and applied a cover Quad that change the alpha in same percentage to seem a iOS9 transition effect (the cover comes to de right, the covered move little bit to left and is shaded progressive by cover screen,...)
In pre-release version all covered screen (content area, footer and header (if screen has them) was a one single object moving together... Now the header remains quite in the movement (like if was over the screen object or not disappeared after create the DisplayObjects to move) then the effect is strange... all screen moving to the left and shadowing except the header, title and buttons on it... rare.
But here the good news (or not so bad). Where I wrote THE TRICK in the code underneath I added the alpha property to the screen covered... then, all fine... what want to test is if header still over all but alpha 0 because will have troubles in buttons area when tap screen in header zone... not?
Here my code modified if want to see it
import feathers.display.RenderDelegate;
import starling.animation.Tween;
import starling.core.Starling;
import starling.display.DisplayObject;
import starling.display.Quad;
import starling.display.Sprite;
import flash.geom.Rectangle;
class CoverTween extends Tween
{
public function CoverTween(newScreen:DisplayObject, oldScreen:DisplayObject,
xOffset:Number, yOffset:Number, duration:Number, ease:Object, onCompleteCallback:Function,
tweenProperties:Object)
{
var mask:Quad = new Quad(1, 1, 0xff00ff);
//the initial dimensions cannot be 0 or there's a runtime error,
//and these values might be 0
mask.width = oldScreen.width;
mask.height = oldScreen.height;
this._temporaryParent = new Sprite();
this._temporaryParent.mask = mask;
oldScreen.parent.addChild(this._temporaryParent);
var delegate:RenderDelegate = new RenderDelegate(oldScreen);
delegate.name = "outingScreen";
delegate.alpha = oldScreen.alpha;
delegate.blendMode = oldScreen.blendMode;
delegate.rotation = oldScreen.rotation;
delegate.scaleX = oldScreen.scaleX;
delegate.scaleY = oldScreen.scaleY;
this._temporaryParent.addChild(delegate);
oldScreen.visible = false;
/*
THIS IS THE TRICK
*/
oldScreen.alpha = 0;
this._savedOldScreen = oldScreen;
super(this._temporaryParent.mask, duration, ease);
if(xOffset < 0)
{
this.animate("width", 0);
}
else if(xOffset > 0)
{
this.animate("x", xOffset);
this.animate("width", 0);
}
if(yOffset < 0)
{
this.animate("height", 0);
}
else if(yOffset > 0)
{
this.animate("y", yOffset);
this.animate("height", 0);
}
if(tweenProperties)
{
for(var propertyName:String in tweenProperties)
{
this[propertyName] = tweenProperties[propertyName];
}
}
this._onCompleteCallback = onCompleteCallback;
if(newScreen)
{
this._savedNewScreen = newScreen;
this._savedXOffset = xOffset;
this._savedYOffset = yOffset;
this._cover = new Quad(this._savedNewScreen.width, this._savedNewScreen.height, 0);
this._cover.name = "cover";
this._cover.alpha = 0;
this._temporaryParent.addChild(this._cover);
this._outingScreen = this._temporaryParent.getChildByName("outingScreen");
this.onUpdate = this.updateNewScreen;
}
this.onComplete = this.cleanupTween;
//this.delay = 0.14;
Starling.juggler.add(this);
}
private var _savedXOffset:Number;
private var _savedYOffset:Number;
private var _outingScreen:DisplayObject;
private var _cover:Quad;
private var _savedOldScreen:DisplayObject;
private var _savedNewScreen:DisplayObject;
private var _temporaryParent:Sprite;
private var _onCompleteCallback:Function;
private function updateNewScreen():void
{
var mask:Quad = Quad(this._temporaryParent.mask);
if(this._savedXOffset < 0)
{
this._savedNewScreen.x = mask.width;
this._outingScreen.x = ( this._savedNewScreen.x - this._savedNewScreen.width ) * 0.3;
this._cover.alpha = Math.abs( this._outingScreen.x ) / this._savedNewScreen.width * 0.8;
//trace(this._cover.alpha, this._outingScreen.x, this._outingScreen.width, this._savedNewScreen.x, this._savedNewScreen.width);
}
else if(this._savedXOffset > 0)
{
this._savedNewScreen.x = -mask.width;
this._outingScreen.x = ( this._savedNewScreen.width - Math.abs( this._savedNewScreen.x ) ) * 0.3;
this._cover.alpha = Math.abs( this._outingScreen.x ) / this._savedNewScreen.width * 0.8;
//trace(this._cover.alpha, this._outingScreen.x, this._outingScreen.width, this._savedNewScreen.x, this._savedNewScreen.width);
}
if(this._savedYOffset < 0)
{
this._savedNewScreen.y = mask.height;
this._outingScreen.y = ( this._savedNewScreen.y - this._savedNewScreen.height ) * 0.3;
this._cover.alpha = Math.abs( this._outingScreen.y ) / this._savedNewScreen.height * 0.8;
//trace(this._cover.alpha, this._outingScreen.y, this._outingScreen.height, this._savedNewScreen.y, this._savedNewScreen.height);
}
else if(this._savedYOffset > 0)
{
this._savedNewScreen.y = -mask.height;
this._outingScreen.y = ( this._savedNewScreen.height - Math.abs( this._savedNewScreen.y ) ) * 0.3;
this._cover.alpha = Math.abs( this._outingScreen.y ) / this._savedNewScreen.height * 0.8;
//trace(this._cover.alpha, this._outingScreen.y, this._outingScreen.height, this._savedNewScreen.y, this._savedNewScreen.height);
}
this._cover.x = this._outingScreen.x;
}
private function cleanupTween():void
{
this._temporaryParent.removeFromParent(true);
this._temporaryParent = null;
this._savedOldScreen.visible = true;
this._savedNewScreen = null;
this._savedOldScreen = null;
if(this._onCompleteCallback !== null)
{
this._onCompleteCallback();
}
}
}