Thursday, July 15, 2010

too.....much....pink.....(week of 6-6)

So this week we switched gears to focus on the opening page for the gallery, which is a good break from redoing slide show templates. These images are graphics designed by Ian describing the desired functionality for the entry page. Clicking either image will take you to the interactive SWF file. After seeing this at the next meeting, we all agreed: that's WAY too much pink...
Actionscript follows in the comments. for those interested, creating conditional statements using the e.target keyword is just about the must useful thing you'll ever find if you have a page with lots of buttons. If it wasn't for that, I'd have had to write over 30 gunctions instead of the 5 that I have.

1 comment:

  1. code:
    import flash.display.*;
    stop();

    var target_mc;
    var target_mc2;
    var about_info:about_child = new about_child();
    var contact_info:contact_child = new contact_child();

    ab_mc.addEventListener(MouseEvent.MOUSE_OVER, moveRightBars);
    ex_mc.addEventListener(MouseEvent.MOUSE_OVER, moveRightBars);
    pe_mc.addEventListener(MouseEvent.MOUSE_OVER, moveRightBars);
    co_mc.addEventListener(MouseEvent.MOUSE_OVER, moveRightBars);
    ab_mc.addEventListener(MouseEvent.MOUSE_OUT, resetRightBars);
    ex_mc.addEventListener(MouseEvent.MOUSE_OUT, resetRightBars);
    pe_mc.addEventListener(MouseEvent.MOUSE_OUT, resetRightBars);
    co_mc.addEventListener(MouseEvent.MOUSE_OUT, resetRightBars);
    bl_mc.addEventListener(MouseEvent.MOUSE_OVER, moveLeftBars);
    fa_mc.addEventListener(MouseEvent.MOUSE_OVER, moveLeftBars);
    fl_mc.addEventListener(MouseEvent.MOUSE_OVER, moveLeftBars);
    tw_mc.addEventListener(MouseEvent.MOUSE_OVER, moveLeftBars);
    bl_mc.addEventListener(MouseEvent.MOUSE_OUT, resetLeftBars);
    fa_mc.addEventListener(MouseEvent.MOUSE_OUT, resetLeftBars);
    fl_mc.addEventListener(MouseEvent.MOUSE_OUT, resetLeftBars);
    tw_mc.addEventListener(MouseEvent.MOUSE_OUT, resetLeftBars);
    loadWindow.addEventListener(Event.ENTER_FRAME, loadContent);

    function loadContent(e:Event):void
    {
    if(ab_mc.currentFrame == 24)
    {
    loadWindow.removeChildAt(0);
    loadWindow.addChildAt(about_info, 0);
    }
    if(co_mc.currentFrame == 37)
    {
    loadWindow.removeChildAt(0);
    loadWindow.addChildAt(contact_info, 0);
    }
    }
    function moveRightBars(e:Event):void
    {
    if(e.target == ab_mc)
    target_mc = ab_mc;
    if(e.target == ex_mc)
    {
    target_mc = ex_mc;
    ab_mc.gotoAndPlay(160);
    pe_mc.gotoAndPlay(140);
    }
    if(e.target == pe_mc)
    {
    target_mc = pe_mc;
    ab_mc.gotoAndPlay(160);
    ex_mc.gotoAndPlay(160);
    }
    if(e.target == co_mc)
    target_mc = co_mc;
    target_mc.gotoAndPlay(2);
    }
    function resetRightBars(e:Event):void
    {
    if(e.target == ab_mc)
    target_mc2 = ab_mc;
    if(e.target == ex_mc)
    {
    target_mc2 = ex_mc;
    ab_mc.gotoAndPlay(180);
    pe_mc.gotoAndPlay(170);
    }
    if(e.target == pe_mc)
    {
    target_mc2 = pe_mc;
    ab_mc.gotoAndPlay(180);
    ex_mc.gotoAndPlay(180);
    }
    if(e.target == co_mc)
    target_mc2 = co_mc;
    target_mc2.gotoAndPlay(100);
    }
    function moveLeftBars(e:Event):void
    {
    if(e.target == bl_mc)
    target_mc = bl_mc;
    if(e.target == fa_mc)
    target_mc = fa_mc;
    if(e.target == fl_mc)
    target_mc = fl_mc;
    if(e.target == tw_mc)
    target_mc = tw_mc;
    target_mc.gotoAndPlay(2);
    }
    function resetLeftBars(e:Event):void
    {
    if(e.target == bl_mc)
    target_mc2 = bl_mc;
    if(e.target == fa_mc)
    target_mc2 = fa_mc;
    if(e.target == fl_mc)
    target_mc2 = fl_mc;
    if(e.target == tw_mc)
    target_mc2 = tw_mc;
    target_mc2.gotoAndPlay(100);
    }

    ReplyDelete