Wednesday, April 22, 2009

WED. Scripts Frame 3

var req2:URLRequest = new URLRequest("profile/profile1.jpg");
var loader2:Loader = new Loader();

loader2.x = 50
loader2.y = 100



loader2.load(req2);
addChild(loader2);

WED. Scripts Frame 2

var req:URLRequest = new URLRequest("squares.swf");
var loader:Loader = new Loader();



loader.load(req);
addChild(loader);




btnWhite.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerE);
function mouseDownHandlerE(event:MouseEvent):void {
    loader.unload();
}

btnBlack.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerG);
function mouseDownHandlerG(event:MouseEvent):void {
    addChild(loader);
}

WED. scripts FRAME 1

stop();

btnBlack.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerD);
function mouseDownHandlerD(event:MouseEvent):void {
    gotoAndStop(2);
}

btnRed.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerH);
function mouseDownHandlerH(event:MouseEvent):void {
    gotoAndStop(6);
}





btnYellow.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerA);
function mouseDownHandlerA(event:MouseEvent):void {
    gotoAndStop(5);
}

btnCyan.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerB);
function mouseDownHandlerB(event:MouseEvent):void {
    gotoAndStop(4);
}

btnGreen.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerC);
function mouseDownHandlerC(event:MouseEvent):void {
    gotoAndStop(3);
}

Monday, April 20, 2009

UNLOAD

btnWhatever.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerE);
function mouseDownHandlerE(event:MouseEvent):void {
    loader.unload();
}

LOAD external file

stop();

var req3:URLRequest = new URLRequest("whatever.swf");
var loader3:Loader = new Loader();



loader3.load(req3);
addChild(loader3);

Good AS3 Preloader Tutorial

http://www.flashmagazine.com/tutorials/detail/how_to_make_a_custom_as3_preloader/

AS3 PRELOADER

AS3 using a MovieClip as a Button w/ Animation

LINK to explanation/TUTORIAL (http://www.actionscript.org/forums/showthread.php3?t=164295):
code using:
import flash.display.MovieClip
import flash.events.MouseEvent:

import flash.display.MovieClip; 

import flash.events.MouseEvent;

myMc.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);

myMc.addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler); 

myMc.addEventListener(MouseEvent.CLICK, onClickHandler); 

myMc.addEventListener(MouseEvent.MOUSE_DOWN, onPressHandler); 

myMc.addEventListener(MouseEvent.MOUSE_UP, onReleaseHandler);

// if you want a hand cursor  

myMc.buttonMode = true; myMc.useHandCursor = true;


function onRollOverHandler(myEvent:MouseEvent) {

        trace("s1");  

        myMc.gotoAndPlay("_over"); 


function onRollOutHandler(myEvent:MouseEvent) {  

               trace("Out");  

               myMc.gotoAndPlay("_out");  

               // myMc.stop(); 

}


function onClickHandler(myEvent:MouseEvent) {  

              trace("I waited for Press AND Release!!!"); 


function onPressHandler(myEvent:MouseEvent) {  

              trace("Press"); 


function onReleaseHandler(myEvent:MouseEvent) {  

              trace("Release"); 

}

 













Wednesday, April 1, 2009

NONlinear Flash (Video) Database Narrative

We will review this work in class on Mon. April 20.  All work must be posted at this time.
All post crit revisions will be due by the following Monday, April 27.