Hi there
I'm having some trouble with a site created in Gaia Framework - the index file
runs before the preloader has finished. I was told this is not a Gaia issue
because transitionIn is not called until after the preloader has finished and
to leave frame 1 blank as a first step toward fixing this and do not go to
frame 2 and beyond until transitionIn is called. I have tried numerous ways but
all without success - by moving the content to frame 2 I get output error:
Cannot access a property or method of a null object reference. at
com.vanellensheryn::IndexPage$iinit()
Below is my index page class file - any help would be greatly appreciated.
package com.vanellensheryn
{
import com.gaiaframework.templates.AbstractPage;
import com.gaiaframework.events.*;
import com.gaiaframework.debug.*;
import com.gaiaframework.api.*;
import flash.display.*;
import flash.events.*;
import flash.net.URLRequest;
import flash.net.navigateToURL;
import com.greensock.TweenMax;
import com.greensock.easing.*;
import com.greensock.plugins.*;
TweenPlugin.activate([AutoAlphaPlugin, TransformMatrixPlugin, TintPlugin,
RemoveTintPlugin]);
public class IndexPage extends AbstractPage
{
public var container_mc:MovieClip;
public var gel:MovieClip;
public var nav_bg:MovieClip;
public var btn_mailto:SimpleButton;
public var btn_mularam:SimpleButton;
public var btn_riba:SimpleButton;
public function IndexPage()
{
super();
alpha = 0;
btn_mailto.addEventListener (MouseEvent.CLICK, buttonClickHandler);
btn_mailto.addEventListener(MouseEvent.ROLL_OVER, over1);
btn_mailto.addEventListener(MouseEvent.ROLL_OUT, out1);
btn_mularam.addEventListener (MouseEvent.CLICK, buttonClickHandler2);
btn_mularam.addEventListener(MouseEvent.ROLL_OVER, over1);
btn_mularam.addEventListener (MouseEvent.ROLL_OUT, out1);
btn_riba.addEventListener (MouseEvent.CLICK, buttonClickHandler3);
TweenPlugin.activate([ColorTransformPlugin]);
function over1(event:MouseEvent):void {
TweenMax.to(event.target, 0.75, {colorTransform:{tint:0xFF9900},
ease:Back.easeInOut});
}
function out1(event:MouseEvent):void {
TweenMax.to(event.target, 0.75, {colorTransform:{tint:0xCCCCCC},
ease:Back.easeInOut});
}
}
private function buttonClickHandler (e:MouseEvent):void
{
var request:URLRequest = new URLRequest("mailto:[email protected]");
navigateToURL(request, "_self");
}
private function buttonClickHandler2 (e:MouseEvent):void
{
var request:URLRequest = new URLRequest("http://www.mularam.com");
navigateToURL(request);
}
private function buttonClickHandler3 (e:MouseEvent):void
{
var request:URLRequest = new
URLRequest("http://www.architecture.com/TheRIBA/AboutUs/RIBAMembers.aspx");
navigateToURL(request);
}
override public function transitionIn():void
{
super.transitionIn();
TweenMax.to(this, 0.3, { alpha:1, onComplete:transitionInComplete } );
}
override public function transitionOut():void
{
super.transitionOut();
TweenMax.to(this, 0.3, {alpha:0, onComplete:transitionOutComplete});
}
}
}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders