Tuesday, October 25, 2011

Flash Games 2

as a follow up to my last post, I plan on making my project 2 on video cameras/angles etc since i dont have all of the information for the other idea yet, this way i can build it and make it functional and just go back later and swap out images and questions.

Flash Games

So I have just recently decided that while I do like flash and using it to make animated movies and stuff of a similar practice, I do not like making games--even "simple" ones.  I am sure I can just equate the dislike to the fact that I need to practice it more but coding games is intense.  I honestly think I made my game for assignment nine way to complex.  I think I need to use something other than a random number generator to display the questions because it is kind of confusing when you answer the same question 3 or 4 times in a row.  I think for project two rather than making a game of hit test and timer and arrow keys, I want to make a question&answer game similar to the "anatomy of a letter" game.  I think it will be more realistic to accomplish in the time given, especially since making games is not my strong suit right now.  Also I think a question&answer game is more fitting to the topic since I am relating it to Derek's paper.  I think that this game will involve the players more because they would have had to read the paper first.  I know that this isolates some people but really it is more of a targeted audience situation; only people who are interested in learning about simulation and its use in the military would want to read the paper and play the game.  with this game I think it would be good to use "gotoAndStop/gotoAndPlay" functions.  But I can keep some of my original idea with the enter your name page and instructions page.

Sunday, October 9, 2011

Flash Tutorials

Just some more Flash Tutorials  to keep in mind
had some cool apple iPhone effects that could be potentially useful for Capstones!

Infographic: the Death Star (part 2)

Well as an update to the previous post, rather than including videos, since I didn't have any of my own, iI decided to download some of the iconic songs from the films and put them as external .swf files in my project.  For the most part I definitely think it came out pretty good and I am pleased with the overall look of it.  But there are a few things I might go back and fix.  For instance, I probably want to add somewhere that this is about the Death Star. I have an image of it and the word Star Wars but I think it might add some clarity.  Also i might make it bigger in the sense of stage area.  I mean it is a medium size but making it bigger might help with the font readability on the slides. Also I need to add some instruction as to what to click on with in each slide, specifically R2D2.  And just as a final thought, rather than using the accordion slider effect I might try doing something like Kelsey Trabue did with her infographic.  For the most part the code for the slider tabs work if you open and close each individually rather than opening one and clicking on two to close one and open two (if that makes any sense) but sometimes the code is picky and doesn't want to work at all, even though I gave it specific values rather than moving percentages.  So I included a word document of my code for anyone to look and and use, and fix if they see a mistake I missed.  Otherwise, I think the way Kelsey did her's might be a good solution to the slider problem, even though it would be a cool code to conquer!

ps:
   ok so I cant attach a file so sorry for the length, but here is the code:



var loader:Loader=new Loader();
var mcExternal:MovieClip;

var toggle_btn:Boolean = true;
cont.visible = false;

copy_btn.addEventListener(MouseEvent.CLICK,toggle_on_off);
           
function toggle_on_off(event:MouseEvent):void {

            if (toggle_btn) {
                        toggle_btn = false;
                        cont.visible = true;
                        cont.play();
            } else {
                        toggle_btn = true;
                        cont.visible = false;
                        cont.gotoAndStop(1);
            }

}

import fl.transitions.Tween;
import fl.transitions.easing.*;
var toggle_intro:Boolean = true;
mc1.btn1_intro.addEventListener(MouseEvent.CLICK,movement1);
function movement1(event:MouseEvent):void {
            if (toggle_intro) {
                        toggle_intro = false;
                        mc1.x=150

                        var Tween2:Tween = new Tween(mc2, "x", Strong.easeOut, mc2.x,588, 1, true);
                        var Tween3:Tween = new Tween(mc3, "x", Strong.easeOut, mc3.x,631, 1, true);
                        var Tween4:Tween = new Tween(mc4, "x", Strong.easeOut, mc4.x,673, 1, true);
                        var Tween5:Tween = new Tween(mc5, "x", Strong.easeOut, mc5.x,716, 1, true);

                        this.addChild(loader);
                        loader.load(new URLRequest("intro.swf"));
                        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,swfIn);
           
                        function swfIn(e:Event):void {
                       
                        loader.width = 380;
                        loader.height = 486;
                       
                        loader.x=197;
                        loader.y=0;
                       
                        loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,swfIn);
                        mcExternal=loader.content as MovieClip;
                        }
            } else {

                        toggle_intro = true;
                        loader.unload();
                        mcExternal=null;
                       
                        var Tween6:Tween = new Tween(mc1, "x", Strong.easeOut, mc1.x,514, 1, true);
                        var Tween7:Tween = new Tween(mc2, "x", Strong.easeOut, mc2.x,557, 1, true);
                        var Tween8:Tween = new Tween(mc3, "x", Strong.easeOut, mc3.x,600, 1, true);
                        var Tween9:Tween = new Tween(mc4, "x", Strong.easeOut, mc4.x,643, 1, true);
                        var Tween10:Tween = new Tween(mc5, "x", Strong.easeOut, mc5.x,686, 1, true);
            }
}
var toggle_dstar:Boolean = true;
mc2.btn2_ds.addEventListener(MouseEvent.CLICK,movement2);
function movement2(event:MouseEvent):void {
            if (toggle_dstar) {

                        toggle_dstar = false;
                       
                        var Tween1:Tween = new Tween(mc1, "x", Strong.easeOut, mc1.x,150, 1, true);
                        var Tween2:Tween = new Tween(mc2, "x", Strong.easeOut, mc2.x,195, 1, true);
                        var Tween3:Tween = new Tween(mc3, "x", Strong.easeOut, mc3.x,631, 1, true);
                        var Tween4:Tween = new Tween(mc4, "x", Strong.easeOut, mc4.x,673, 1, true);
                        var Tween5:Tween = new Tween(mc5, "x", Strong.easeOut, mc5.x,716, 1, true);

                        this.addChild(loader);
                        loader.load(new URLRequest("deathstar.swf"));
                        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,swfIn);
           
                        function swfIn(e:Event):void {
                       
                        loader.width = 410;
                        loader.height = 486;
                       
                        loader.x=239;
                        loader.y=0;
                       
                        loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,swfIn);
                        mcExternal=loader.content as MovieClip;
                        }
            } else {
                        toggle_dstar = true;
                        loader.unload();
                        mcExternal=null;
                       
                        var Tween6:Tween = new Tween(mc1, "x", Strong.easeOut, mc1.x,514, 1, true);
                        var Tween7:Tween = new Tween(mc2, "x", Strong.easeOut, mc2.x,557, 1, true);
                        var Tween8:Tween = new Tween(mc3, "x", Strong.easeOut, mc3.x,600, 1, true);
                        var Tween9:Tween = new Tween(mc4, "x", Strong.easeOut, mc4.x,643, 1, true);
                        var Tween10:Tween = new Tween(mc5, "x", Strong.easeOut, mc5.x,686, 1, true);
            }
}
var toggle_interior:Boolean = true;
mc3.btn3_int.addEventListener(MouseEvent.CLICK,movement3);
function movement3(event:MouseEvent):void {
            if (toggle_interior) {
                        toggle_interior = false;
                       
                        var Tween1:Tween = new Tween(mc1, "x", Strong.easeOut, mc1.x,150, 1, true);
                        var Tween2:Tween = new Tween(mc2, "x", Strong.easeOut, mc2.x,195, 1, true);
                        var Tween3:Tween = new Tween(mc3, "x", Strong.easeOut, mc3.x,237, 1, true);
                        var Tween4:Tween = new Tween(mc4, "x", Strong.easeOut, mc4.x,673, 1, true);
                        var Tween5:Tween = new Tween(mc5, "x", Strong.easeOut, mc5.x,716, 1, true);

                        this.addChild(loader);
                        loader.load(new URLRequest("interior.swf"));
                        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,swfIn);
           
                        function swfIn(e:Event):void {
                       
                        loader.width = 390;
                        loader.height = 486;
                       
                        loader.x=280;
                        loader.y=8;
                       
                        loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,swfIn);
                        mcExternal=loader.content as MovieClip;
                        }
            } else {

                        toggle_interior = true;
                        loader.unload();
                        mcExternal=null;
                       
                        var Tween6:Tween = new Tween(mc1, "x", Strong.easeOut, mc1.x,514, 1, true);
                        var Tween7:Tween = new Tween(mc2, "x", Strong.easeOut, mc2.x,557, 1, true);
                        var Tween8:Tween = new Tween(mc3, "x", Strong.easeOut, mc3.x,600, 1, true);
                        var Tween9:Tween = new Tween(mc4, "x", Strong.easeOut, mc4.x,643, 1, true);
                        var Tween10:Tween = new Tween(mc5, "x", Strong.easeOut, mc5.x,686, 1, true);
            }
}
var toggle_weapons:Boolean = true;
mc4.btn4_weapon.addEventListener(MouseEvent.CLICK,movement4);
function movement4(event:MouseEvent):void {
            if (toggle_weapons) {
                        toggle_weapons = false;

                        mc1.x=150
                        mc2.x=195
                        mc3.x=237
                        mc4.x=280
                        mc5.x=716

                        this.addChild(loader);
                        loader.load(new URLRequest("weapons.swf"));
                        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,swfIn);
           
                        function swfIn(e:Event):void {
                       
                        loader.width = 385;
                        loader.height = 486;
                       
                        loader.x=325;
                        loader.y=0;
                       
                        loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,swfIn);
                        mcExternal=loader.content as MovieClip;
                        }
            } else {
                        toggle_weapons = true;
                        loader.unload();
                        mcExternal=null;
                       
                        var Tween6:Tween = new Tween(mc1, "x", Strong.easeOut, mc1.x,514, 1, true);
                        var Tween7:Tween = new Tween(mc2, "x", Strong.easeOut, mc2.x,557, 1, true);
                        var Tween8:Tween = new Tween(mc3, "x", Strong.easeOut, mc3.x,600, 1, true);
                        var Tween9:Tween = new Tween(mc4, "x", Strong.easeOut, mc4.x,643, 1, true);
                        var Tween10:Tween = new Tween(mc5, "x", Strong.easeOut, mc5.x,686, 1, true):
            }
}
var toggle_crew:Boolean = true;
mc5.btn5_crew.addEventListener(MouseEvent.CLICK,movement5);    
function movement5(event:MouseEvent):void {
            if (toggle_crew) {
                        toggle_crew = false;
                       
                        var Tween1:Tween = new Tween(mc1, "x", Strong.easeOut, mc1.x,150, 1, true);
                        var Tween2:Tween = new Tween(mc2, "x", Strong.easeOut, mc2.x,195, 1, true);
                        var Tween3:Tween = new Tween(mc3, "x", Strong.easeOut, mc3.x,237, 1, true);
                        var Tween4:Tween = new Tween(mc4, "x", Strong.easeOut, mc4.x,280, 1, true);
                        var Tween5:Tween = new Tween(mc5, "x", Strong.easeOut, mc5.x,325, 1, true);

                        this.addChild(loader);
                        loader.load(new URLRequest("crew.swf"));
                        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,swfIn);
           
                        function swfIn(e:Event):void {
                       
                        loader.width = 390;
                        loader.height = 486;
                       
                        loader.x=367;
                        loader.y=0;
                       
                        loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,swfIn);
                        mcExternal=loader.content as MovieClip;
                        }
            } else {
                        toggle_crew = true;

                        loader.unload();
                        mcExternal=null;
                       
                        var Tween6:Tween = new Tween(mc1, "x", Strong.easeOut, mc1.x,514, 1, true);
                        var Tween7:Tween = new Tween(mc2, "x", Strong.easeOut, mc2.x,557, 1, true);
                        var Tween8:Tween = new Tween(mc3, "x", Strong.easeOut, mc3.x,600, 1, true);
                        var Tween9:Tween = new Tween(mc4, "x", Strong.easeOut, mc4.x,643, 1, true);
                        var Tween10:Tween = new Tween(mc5, "x", Strong.easeOut, mc5.x,686, 1, true);
            }
}