Wednesday, March 10, 2010

elsewhere

the reason for my lack of posts is that I've been working of a portfolio website and well all the stuff's been going up there. that and finals oh and March Maddness, and the OCT I've signed up for so... there it is.

Monday, March 1, 2010

Code

so i haven't posted anything in a while, that doesn't mean i haven't been doing things.
in Flash we've been working with action script. I'm going to post my code so far so i can reference it.


package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;

public class Main extends MovieClip
{
var pageOne:PageOne;
var pageTwo:PageTwo;

public function Main()
{
//trace( "hello world");
pageOne = new PageOne;
pageTwo = new PageTwo;
addChild(pageOne);

//ev list
pageOne.buttonOne.addEventListener(MouseEvent.CLICK, onButtonOneClick);
pageTwo.buttonReturn.addEventListener(MouseEvent.CLICK, onButtonReturnClick);

}
//ev handler
function onButtonOneClick(event:MouseEvent):void
{
removeChild(pageOne);
addChild(pageTwo);
}

function onButtonReturnClick(event:MouseEvent):void
{
removeChild(pageTwo);
addChild(pageOne);
}
}

}