More than one external screen

Hello, I'm an owner of Macbook Pro (2.5GHz) i have an external screen plugged in by DVI on my macbook, I'm wandering if i can plugin another one display into my mac, i really would like to have my mac in the middle and one screen on the left and one on the right, it would be very helpful for my work.

I thought the new macbookpro (late 2008) offers dual-link DVI. from my understanding that would allow two separate screens (DVI of course) to be connected. I am planning to purchase my Mini DisplayPort to dual link DVI but I have no idea if it will work the way I imagine it to be. I have 2x 19" Dell 1908FP that has a combined dimension of 2560x1024pixels. The maximum resolution as listed on the tech specs of the Macbook pro list it as 2560 by 1600 supported by the Dual-link DVI. Remember that Dual Link DVI Adapter and the single DVI adapter are two separate products!
Please check out this link for the Dual Link DVI Adaptor:
http://store.apple.com/us/product/MB571

Similar Messages

  • More than one external display possible?

    Hey all,
    I was wondering if there was a way of running more than one external monitor from my Macbook. I use the Macbook in my home recording studio for Logic Pro 8 but the screen is quite small to work with. I would love to work with dual external monitors so i do not have to look at the macbook screen at all.
    I'm guess this is not possible considering the Macbook only has one mini-DVI out ??
    Thanks for all your time reading this,
    Steve.
    Message was edited by: skeletal_wreck

    I feel your pain Da BomB!
    You will have to settle for what I have done - have a dual screen set up with one screen being an external monitor and the other being your little Macbook screen. I have tried to make the most of this compromise by just going for the biggest external TFT that I found affordable on ebay (20").
    Its a petty no monitor manufacturer came up with the idea of 'daisy chaining' screens!
    Steve.

  • How to load and unload more than one external swf files in different frames?

    I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
    I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
    Thanks

    Look into using the Loader class to load the swf files.  If you want to have it happen in different frames then you can put the code into the different frames.

  • Error 5006:  can't have more than one externally visible definition

    Hi
    I'm getting this error:
    5006: An ActionScript file can not have more than one
    externally visible definition: AMReports, playSound.
    playSound is a function in my main document class
    The error occured after I added a MovieClip and FLV component
    to my the same framemain timeline. This Movie Clip has 3 frames.
    I'll be using cue points added to the FLV component to move this
    from frame to frame in that MovieClip.
    Any one have an idea why this is happening?
    Thanks.

    I fixed this problem: a brace was in the wrong place.

  • Can you connect more then one external screen to a mac with one mini display point?

    Does any one know if you can connect more then one external screen to a mac, with one mini display point?

    This company has a dual monitor solution for DisplayPort;
    http://www.matrox.com/graphics/en/products/gxm/dh2go/

  • Using more than one external drive with apple tv and itunes

    I've searched the forums and haven't found a clear answer for this. Is it possible to use two seperate drives for the itunes library? I've already filled up my external firewire drive and would like to get another one.
    I've read in several places that people are doing this, but haven't found clear instructions on how its done.
    Much thanks!
    Brown.Recluse

    I don't think you can have more then one folder designated as you itunes library folder, so you can not have more then one drive for your library folder. However you can use more than one drive for you content. I have 6 drives that I use right now. I store the movies and tv shows on those drives. I drag a movie into then library tab in itunes and it just links itunes to the path of the movie. To do this however you have to unclick a option in itunes. It is the menu that you tell the path to you library, you have to unclick “copy to your library” not sure if this is the exact name of this. If you don't do this it will try to copy the movie you dragged in instead of linking it. I actually have nothing in my Itunes library folder. You can also do this with purchased content as well. Just move the purchase content to a drive of your choice from the itunes library. Delete it from itunes. Then drag it into itunes from the new drive. I hope this all makes sense, let me know if you have any other questions.

  • How to link more than one external HDD to be recognized as one HDD

    for the past 10 years or so i have been unintentionally collecting external HDD. some of them are 2T others are 250GB. is there a way to merge all of the drives so they are recognized as one single drive?

    It is inevitable that someone will suggest using one of your extra drives to make a clone of your startup disk. This is a useful thing to have since it makes "regressing" to a former state of that drive possible, but it is important to understand how a clone differs from an archival backup strategy.
    Basically, clones are functionally identical copies of volumes. (Drives may be partitioned into more than one volume, so each would have to be cloned individually to another volume to clone them all.) As generally & most practically implemented, clones are in effect snapshots of the state of a volume at some point in time. This means that any problems in the cloned volume will also be present in its clone, plus any problems that might result from an imperfect cloning process.
    Thus, it is important that the clone is tested thoroughly before relying on it. If a clone of a boot volume, this means making sure that it will boot the computer & its system behaves normally as well as that it is free of any file system problems. This can take quite a bit of time -- it is easy to get complacent after a few clones have proved to be reliable & skip the testing, but if you are relying on it for backup this is not wise.
    Also note that unless the cloning software has some provision for retaining old & deleted file versions -- and you use it -- each time you clone the volume you will lose those items, since the clone is intended to be a copy of the state of the drive at the time of cloning. So for example, if you overwrite an important file with another of the same name & file path by accident, you cannot retrieve the original one. Even if the software has a provision to retain the changes, it is not likely to do so in a way that makes it as easy to find or manage those file versions as with dedicated archival backup software.
    Arguably, the best software for archiving is Leopard's Time Machine, with its spiffy user interface that makes it easy to see the state of the volume at any backed up previous time. And like most other archival backup software, it allows you to pick & choose what not to back up, & can backup files from multiple volumes onto a single one.
    This type of software does not create a bootable volume like a clone does, so having both is a pretty good idea, especially when updating or upgrading the OS.

  • Is it possible to equip a MBP with more than one external monitor

    I am having one 17" monitor connected with my MBP right now. There'a a plan to buy new monitor and I don't wanna dispose my current one. Does anyone connect your laptop with more than one monitor?
    I tried to search apple site about some cable that enable MBP to connect to more than one monitor, but haven't found any yet.

    Yes, you can. But you have to use a third party hardware:
    http://www.matrox.com/graphics/en/gxm/support/mac/home.php
    Cheers
    A.

  • Can iTunes utilize more than one external hard drive at once?

    A couple of years ago we had the bright idea to get a mac mini with an external hard drive and load it up with movies and such, so when we wanted to watch a tv show or movie, we could just scroll through the titles and pick without having to deal with the actual DVD (the mini is hooked up to a flatscreen tv). Needless to say, this monster has grown to epic proportions and we have since upgraded to 2 external hard drives (totaling 5 TB), and we now use another program that utilizes both hard drives without problem.
    The issue I am having is that we bought an AppleTV tonight, and have not had any problems getting iTunes to see the movies in the "Movies" External HD, but the tv shows are on another External HD and they take up a little more than 345 GB of space. I kinda liked having the two drives separate, but was wondering if there was a way to make the mini think these two drives were just one? I know it is a strange question, but I can't think of a solution at this point.
    Is there a way to tell iTunes to look in two locations for content?

    I am wondering if this set-up will work if I daisy chain the external drives. My iTunes library is stored on a 1.5 TB external drive. I have about 350 GB of storage left. I have been trying to find a way to add a drive instead of replacing the drive with a larger drive. If I can daisy chain, this will allow me to add storage without losing another firewire port. I just want to make sure this all works before I attempt any changes. Thank you.

  • More than one external drive

    Hi folks,
    I have a older model 1TB TC that has been running just fine for over three years now. When it was first set up, I connected three additional hard drives to it via the USB port on the back using a powered D-Link USB hub as an intermediary. With the old Airport utility, this was not a problem. I was able to set it up so all three drive's contained volumes were seen and mounted as shared volumes on my network's clients' OSs (mix of Wins and OS X).
    However, as time has gone on, the attached drives have become full. I don't want to remove any of the existing drives as they contain various family members' media and destinations for Time Machine backups. What I would like to do is to add an additional 4TB Western Digital My Book drive to the collection.
    Problem is, the new Airport utility only shows the TC's internal drive and one of the external drives on the drives tab! I can't tell if the TC sees the new drive or not. It does not appear in any of my network computer's shares, so I am leaning towards not.
    So, how can I connect the new drive (formatted as OS X Extended Journalled/GUID) and be able to configure the connection in Airport utility so the contained volume will mount as a shared volume on my network's clients? That is, without downgrading the firmware on my TC to do it!!!
    Thanks in advance for any suggestions or assistance.

    If these are full sized drives and you are trying to power both from the bus, then more than likely the second drive is not running. Try instead powering the Firewire drives from an external power source or connecting each to a separate Firewire port.
    Time Machine will only backup to one backup drive, but can backup any number of attached drives.

  • More than one external hard drive....

    I already have a 160G lacie external hard drive and I need another. I want to purchase the Lacie 250G.
    Is there any problem with having two external hard drives connected at the same time?
    Thanks!
    -Jeff in NYC

    Not at all.
    Plug in as many as you have ports for
    If you are using FireWire drives, you probably have additional FireWire ports on the back of each drive. Just plug the next drive into the second port on the back of the drive.
    If you are using USB drives, you may or may not have a second port on the back of the first drive. If you do, use the same method.
    If you don't, then plug them directly into the USB ports on your computer.
    If you need more ports, get a powered USB hub. Make sure you get a powered USB hub (one with it's own power transformer), they are more stable.
    But, whenever possible, go with FireWire drives. The performance difference is quite significant.
    And, just for information, there is no problem mixing USB and FireWire drives if you want one or two of each
    Hope this helps.

  • More than one external display?

    I have a white intel C2D 24 (late 2006) and have a Dell 24 external via DVI. Can a third display be supported via some type of hub I'm not aware of? The iMac only has the one DVI port. Thanks for assistance! -jjsea

    I feel your pain Da BomB!
    You will have to settle for what I have done - have a dual screen set up with one screen being an external monitor and the other being your little Macbook screen. I have tried to make the most of this compromise by just going for the biggest external TFT that I found affordable on ebay (20").
    Its a petty no monitor manufacturer came up with the idea of 'daisy chaining' screens!
    Steve.

  • How to back with more than one external?

    I have four internal hard drives with my desktops so naturally my 1tb external HD doesn't have enough space for all the back up. I was wondering how do I add another external HD to the list in Time Machine so that it can back up the remaining stuff. I looked a lot in preferences but could not see a way to do it. I feel like I'm overlooking something...

    TM can only have one backup disk. no way around that. you can RAID your externals into a software RAID which means that they will be combined into one volume. but that's a VERY shaky arrangement for external drives sitting in separate enclosures. and it will also mean that you'll have to wipe both externals. you can also get a bigger external drive or get an external RAID enclosure. another option is to use a different backup solution for backing up the extra data that does not fit on the TM drive. there are many other excellent backup programs beside TM. see this link for options
    http://discussions.apple.com/thread.jspa?messageID=7495315#7495315

  • Is it possible to use more than one external hard drive for Time Machine backups?

    I want to use two hard drives for Time Machine backups.
    Bigger one keep at home and be sure it is safe.
    Second one (very small pocket size) keep with me for travels.
    I want to backup to both drives to be sure I can restore everywhere and to be sure if something bad happened with my small travel disk I can restore from home backup.
    Is there any problem with listed schema? Is it normal for Time Machine to handle backups for different drivers and keep everything consistent and smooth?

    I really need some help!  I have been using an Iomega NAS 1TB HD for the past year.  And I received an error message.  I believe I have ran out of memory on this drive.
    Then recently in the last couple of months I got a ReadyNAS Duo 2TB with 2TB RAID.  Should I switch my back ups to this one and delete the other back up file or keep the old back up image file on the Iomega?
    Can I transfer the old image back up to this new ReadyNAS? How do I do this?
    I appreciate any help.

  • Actionscript help: can not have more than one externally visable def

    package  {
        // these are flash built in classes
         import flash.display.MovieClip;
         import flash.events.TimerEvent;
        import flash.utils.Timer;
         import flash.events.Event;
        //Our own custom class
        import MainTimer;
        import flash.events.KeyboardEvent;
        public class MainDocument extends MovieClip{
            //initial variable values
             private var currentNumberOfEnemiesOnstage:int;
             private var initialNumberOfEnemiesToCreate:int = 2;
             private var enemyKills:int;
             private var childToRemove:int;
             private var level:int = 1;
             private var makeNewEnemyTimer:Timer = new Timer(3000,1);
             private var finishOffEnemy:Timer = new Timer (500, 1);
             private var gameTimer:MainTimer
             private var thePlayer:Player;
             private var theEnemy:Enemy;
             private var maxEnemies:int = 3;
             private var e:int = 0;
             private var childrenOnStage:int;
             private var lastX:int;// variable to determine where the last x of the player was.
             private var theStageNeedsToScroll:Boolean=false;// flag for scrolling
             private var numChildrenInGameStage:int;
             private var jump:JumpSound = new JumpSound();
             private var slap:SlapSound = new SlapSound();
             private var token:TokenSound = new TokenSound();
            public function MainDocument() {
                // constructor code
                trace("the main document is alive");
                makeNewEnemyTimer.addEventListener(TimerEvent.TIMER_COMPLETE,makeNewEnemyHandler);
                makeNewEnemyTimer.start();
                //new instance of the MainTimer class
                gameTimer = new MainTimer();
                //must add it to the stage
                addChild(gameTimer);
                //adjust its position on the stage
                gameTimer.x = 20;
                gameTimer.y = 20;
                //add the player
                thePlayer = new Player();
                addChild(thePlayer);
                // adjust its position on the stage
                thePlayer.x = stage.stageWidth * 0.5;
                // assign the name property
                thePlayer.name = "player";
                while (e< initialNumberOfEnemiesToCreate){
                    createEnemy();
                    e++;
                } //end while
                // init variable for tracking "kills"
                enemyKills = 0;
                killScoreBox.text = String (enemyKills) + " KILLS ";
                // Update this variable every time a child is added to the stage
                childrenOnStage = this.numChildren;
                //Add event listener to control timing of main game loop
                addEventListener (Event.ENTER_FRAME,mainGameLoop);
                 // Prepare for the keystroke listeners
                 stage.focus = stage;
                stage.addEventListener  (KeyboardEvent.KEY_DOWN, keyDownHandler);
                stage.addEventListener  (KeyboardEvent.KEY_UP, keyUpHandler);
            }  //end public function MainDocument
            private function keyDownHandler(e:KeyboardEvent):void {
                switch ( e.keyCode) {
                    case 37:   // left
                        thePlayer.moveLeft();
                        break;
                    case 38://up
                        jump.play();
                        thePlayer.startJumping();
                        break;
                    case 39:    //right
                        thePlayer.moveRight();
                        break;
                    case 40: //down to attack
                        slap.play();
                        thePlayer.attack();
                        break;                   
                }// end switch
            }// end function keyDownHandler
            private function keyUpHandler(e:KeyboardEvent):void {
                switch (e.keyCode) {
                    case 37:    // left
                    case 39:    // right
                        thePlayer.standStill();
                        break;
                    case 38: //jump
                        break;
                    case 40: // down to attack
                    break;
                    default:
                        //anything
                } //end switch
            } // end function keyUpHandler
            private function createEnemy():void{
                trace("create enemy");
                theEnemy = new Enemy((Math.random() * 5) + 1 );
                addChild(theEnemy);
                // Place in a random spot on stage
                theEnemy.x = (Math.random() * stage.stageWidth);
                theEnemy.y = 0;
                // assign the "name" property
                theEnemy.name = "enemy";
                //Update this variable everytime a child is added to the stage
                childrenOnStage = this.numChildren;
            } //end function createEnemy
            //the main loop for the game!!!!!
            private function mainGameLoop (event:Event):void{
                checkForGameReset();
                removeOrCreateNewEnemies();
                processCollisions();
                scrollStage();
            } //end function mainGameLoop
            private function checkForGameReset():void{
                //define conditions
                if(gameTimer.timerHasStopped == true){
                    resetBoard();
                }else if(thePlayer.y > stage.stageHeight){
                    resetBoard();
                }else if (theGameStage.theFish.hitTestPoint(thePlayer.x,thePlayer.y,true)
                                                        && theStageNeedsToScroll == false){
                    resetBoard();
                }else if (health.width <= 2){
                    resetBoard();
            } //end function CheckForGameReset
            private function resetBoard():void{
                health.width = 300;
                thePlayer.x = stage.stageWidth * 0.5;
                theGameStage.x = stage.stageWidth * 0.5;
                thePlayer.y = 0;
                theGameStage.y = 0;
                enemyKills = 0;
                gameTimer.resetTimer();
            } //end function
            private function processCollisions():void{
                //  set up main loop to look through all collidable objects on stage
                for(var c:int;c < childrenOnStage;c++){
                    //trace ("Children on stage c= " + c +
                    // test for a player or enemy child on stage
                    if (getChildAt(c).name == "player" || getChildAt(c).name == "enemy"){
                        // see if ovject is touching the game stage
                        if( theGameStage.hitTestPoint(getChildAt(c).x,getChildAt(c).y,true)){
                            // while it is still touching inch it up just until it stops
                               while ( theGameStage.hitTestPoint(getChildAt(c).x,getChildAt(c).y,true)==true){
                                   // called from CollisionObject Class, so force the connectioin
                                   CollisionObject (getChildAt(c)).incrementUpward();
                                   if (theGameStage.hitTestPoint(getChildAt(c).x,getChildAt(c).y,true)==false){
                                       CollisionObject(getChildAt(c)).keepOnBoundary(); //make it stick
                                   } // end if
                               } //end while
                        } //end if touching
                    }//end if player or enemy
                    ///////////////////////Collision with Enemies///////////////
                    if (getChildAt(c).name == "enemy"){
                        if(getChildAt(c).hitTestPoint (thePlayer.x, thePlayer.y , true) ){
                            if( thePlayer.isAttacking == false) {
                                // we are being attacked (and not defending)
                                health.width = health.width -2;                           
                                Enemy(getChildAt(c)).makeEnemyAttack();
                            }else{
                                // we are attacking that enemy
                                childToRemove = c;
                                Enemy(getChildAt(c)).makeEnemyDie();
                                finishOffEnemy.start();
                                finishOffEnemy.addEventListener(TimerEvent.TIMER_COMPLETE, finishOffEnemyComplete);
                            } //end else
                        }else if (Enemy(getChildAt(c)).enemyIsAttacking ==true) {
                            // if there isn't a collision between player and enemy,BUT the enemy is attacking
                            Enemy(getChildAt(c)).makeEnemyStopAttacking();
                        } //end else
    import flash.events.TimerEvent;
    // end if
                } //end for loop
                /////////////// token collision detection ///////////////
        numChildrenInGameStage = theGameStage.numChildren;
        for (var d:int = 0; d < numChildrenInGameStage; d++){
            if (theGameStage.getChildAt(d).hasOwnProperty("isToken") &&
                            theGameStage.getChildAt(d).visable == true) {
                if (thePlayer.hitTestObject(theGameStage.getChildAt(d))){
                    trace("hit token");
                    //play sound
                    token.play();
                    theGameStage.removeChildAt ( d );
                    numChildrenInGameStage = theGameStage.numChildren;
                }// end if
            }// end if
        } //end for
        }// end function processCollisions
        private function scrollStage():void{
                if (thePlayer.x != lastX){
                    theStageNeedsToScroll = true;
                }else{
                    theStageNeedsToScroll = false;
                }// end if
                if (theStageNeedsToScroll == true){
                    for (var b:int = 0; b < childrenOnStage; b ++){
                        if (getChildAt (b).name =="enemy"){
                            getChildAt (b).x += (stage.stageWidth * 0.5) - thePlayer.x;
                        }// end if
                    } //end for
                    theGameStage.x += (stage.stageWidth * 0.5) - thePlayer.x;
                } //end if
                thePlayer.x = stage.stageWidth * 0.5;
                lastX = thePlayer.x;
            }//  end function scrollStage
            // figure out logic
         //  end function scrollStage
        private function removeOrCreateNewEnemies():void{
            for (var c:int = 0; c < childrenOnStage; c++){
                if (getChildAt(c).name == "enemy" && getChildAt(c).y > stage.stageHeight){
                    removeChildAt(c);
                    createEnemy();
                } //end if
                if (getChildAt(c).name == "enemy" && getChildAt(c).x < thePlayer.x - stage.stageWidth){
                    removeChildAt(c);
                    createEnemy();
                } //end if
            } // end for loop
        }// end function removeOrCreateNewEnemies
        private function makeNewEnemyHandler(event:TimerEvent):void{
            currentNumberOfEnemiesOnstage = 0;
            for (var c:int = 0; c < childrenOnStage; c++){
                if (getChildAt(c).name == "enemy");
                    currentNumberOfEnemiesOnstage++;
                }// end if
            }// end for
            if(currentNumberOfEnemiesOnstage < maxEnemies){
                trace("not enough enemies onstage, make more");
                createEnemy();
            } //end if
            makeNewEnemyTimer.start();                       
        } //end function
        public function finishOffEnemyComplete(event:TimerEvent):void {
            enemyKills ++;
            killScoreBox.text = String ( enemyKills) + " KILLS ";
            removeChildAt (childToRemove);
            childrenOnStage = this.numChildren;
        }// end functioin
        }// end public class

    You have several problems with syntax. Here is the class that has syntactical integrity:
    package
              // these are flash built in classes
              import flash.display.MovieClip;
              import flash.events.TimerEvent;
              import flash.utils.Timer;
              import flash.events.Event;
              //Our own custom class
              import MainTimer;
              import flash.events.KeyboardEvent;
              public class MainDocument extends MovieClip
                        //initial variable values
                        private var currentNumberOfEnemiesOnstage:int;
                        private var initialNumberOfEnemiesToCreate:int = 2;
                        private var enemyKills:int;
                        private var childToRemove:int;
                        private var level:int = 1;
                        private var makeNewEnemyTimer:Timer = new Timer(3000, 1);
                        private var finishOffEnemy:Timer = new Timer(500, 1);
                        private var gameTimer:MainTimer
                        private var thePlayer:Player;
                        private var theEnemy:Enemy;
                        private var maxEnemies:int = 3;
                        private var e:int = 0;
                        private var childrenOnStage:int;
                        private var lastX:int; // variable to determine where the last x of the player was.
                        private var theStageNeedsToScroll:Boolean = false; // flag for scrolling
                        private var numChildrenInGameStage:int;
                        private var jump:JumpSound = new JumpSound();
                        private var slap:SlapSound = new SlapSound();
                        private var token:TokenSound = new TokenSound();
                        public function MainDocument()
                                  // constructor code
                                  trace("the main document is alive");
                                  makeNewEnemyTimer.addEventListener(TimerEvent.TIMER_COMPLETE, makeNewEnemyHandler);
                                  makeNewEnemyTimer.start();
                                  //new instance of the MainTimer class
                                  gameTimer = new MainTimer();
                                  //must add it to the stage
                                  addChild(gameTimer);
                                  //adjust its position on the stage
                                  gameTimer.x = 20;
                                  gameTimer.y = 20;
                                  //add the player
                                  thePlayer = new Player();
                                  addChild(thePlayer);
                                  // adjust its position on the stage
                                  thePlayer.x = stage.stageWidth * 0.5;
                                  // assign the name property
                                  thePlayer.name = "player";
                                  while (e < initialNumberOfEnemiesToCreate)
                                            createEnemy();
                                            e++;
                                  } //end while
                                  // init variable for tracking "kills"
                                  enemyKills = 0;
                                  killScoreBox.text = String(enemyKills) + " KILLS ";
                                  // Update this variable every time a child is added to the stage
                                  childrenOnStage = this.numChildren;
                                  //Add event listener to control timing of main game loop
                                  addEventListener(Event.ENTER_FRAME, mainGameLoop);
                                  // Prepare for the keystroke listeners
                                  stage.focus = stage;
                                  stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
                                  stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
                        } //end public function MainDocument
                        private function keyDownHandler(e:KeyboardEvent):void
                                  switch (e.keyCode)
                                            case 37: // left
                                                      thePlayer.moveLeft();
                                                      break;
                                            case 38: //up
                                                      jump.play();
                                                      thePlayer.startJumping();
                                                      break;
                                            case 39: //right
                                                      thePlayer.moveRight();
                                                      break;
                                            case 40: //down to attack
                                                      slap.play();
                                                      thePlayer.attack();
                                                      break;
                                  } // end switch
                        } // end function keyDownHandler
                        private function keyUpHandler(e:KeyboardEvent):void
                                  switch (e.keyCode)
                                            case 37: // left
                                            case 39: // right
                                                      thePlayer.standStill();
                                                      break;
                                            case 38: //jump
                                                      break;
                                            case 40: // down to attack
                                                      break;
                                            default:
                                            //anything
                                  } //end switch
                        } // end function keyUpHandler
                        private function createEnemy():void
                                  trace("create enemy");
                                  theEnemy = new Enemy((Math.random() * 5) + 1);
                                  addChild(theEnemy);
                                  // Place in a random spot on stage
                                  theEnemy.x = (Math.random() * stage.stageWidth);
                                  theEnemy.y = 0;
                                  // assign the "name" property
                                  theEnemy.name = "enemy";
                                  //Update this variable everytime a child is added to the stage
                                  childrenOnStage = this.numChildren;
                        } //end function createEnemy
                        //the main loop for the game!!!!!
                        private function mainGameLoop(event:Event):void
                                  checkForGameReset();
                                  removeOrCreateNewEnemies();
                                  processCollisions();
                                  scrollStage();
                        } //end function mainGameLoop
                        private function checkForGameReset():void
                                  //define conditions
                                  if (gameTimer.timerHasStopped == true)
                                            resetBoard();
                                  else if (thePlayer.y > stage.stageHeight)
                                            resetBoard();
                                  else if (theGameStage.theFish.hitTestPoint(thePlayer.x, thePlayer.y, true) && theStageNeedsToScroll == false)
                                            resetBoard();
                                  else if (health.width <= 2)
                                            resetBoard();
                        } //end function CheckForGameReset
                        private function resetBoard():void
                                  health.width = 300;
                                  thePlayer.x = stage.stageWidth * 0.5;
                                  theGameStage.x = stage.stageWidth * 0.5;
                                  thePlayer.y = 0;
                                  theGameStage.y = 0;
                                  enemyKills = 0;
                                  gameTimer.resetTimer();
                        } //end function
                        private function processCollisions():void
                                  //  set up main loop to look through all collidable objects on stage
                                  for (var c:int; c < childrenOnStage; c++)
                                            //trace ("Children on stage c= " + c +
                                            // test for a player or enemy child on stage
                                            if (getChildAt(c).name == "player" || getChildAt(c).name == "enemy")
                                                      // see if ovject is touching the game stage
                                                      if (theGameStage.hitTestPoint(getChildAt(c).x, getChildAt(c).y, true))
                                                                // while it is still touching inch it up just until it stops
                                                                // while it is still touching inch it up just until it stops
                                                                while (theGameStage.hitTestPoint(getChildAt(c).x, getChildAt(c).y, true) == true)
                                                                          // called from CollisionObject Class, so force the connectioin
                                                                          CollisionObject(getChildAt(c)).incrementUpward();
                                                                          if (theGameStage.hitTestPoint(getChildAt(c).x, getChildAt(c).y, true) == false)
                                                                                    CollisionObject(getChildAt(c)).keepOnBoundary(); //make it stick
                                                                          } // end if
                                                                } //end while
                                                      } //end if touching
                                            } //end if player or enemy
                                            ///////////////////////Collision with Enemies///////////////
                                            if (getChildAt(c).name == "enemy")
                                                      if (getChildAt(c).hitTestPoint(thePlayer.x, thePlayer.y, true))
                                                                if (thePlayer.isAttacking == false)
                                                                          // we are being attacked (and not defending)
                                                                          health.width = health.width - 2;
                                                                          Enemy(getChildAt(c)).makeEnemyAttack();
                                                                else
                                                                          // we are attacking that enemy
                                                                          childToRemove = c;
                                                                          Enemy(getChildAt(c)).makeEnemyDie();
                                                                          finishOffEnemy.start();
                                                                          finishOffEnemy.addEventListener(TimerEvent.TIMER_COMPLETE, finishOffEnemyComplete);
                                                                } //end else
                                                      else if (Enemy(getChildAt(c)).enemyIsAttacking == true)
                                                                // if there isn't a collision between player and enemy,BUT the enemy is attacking
                                                                Enemy(getChildAt(c)).makeEnemyStopAttacking();
                                                      } //end else
                                  } //end for loop
                                  /////////////// token collision detection ///////////////
                                  numChildrenInGameStage = theGameStage.numChildren;
                                  for (var d:int = 0; d < numChildrenInGameStage; d++)
                                            if (theGameStage.getChildAt(d).hasOwnProperty("isToken") && theGameStage.getChildAt(d).visable == true)
                                                      if (thePlayer.hitTestObject(theGameStage.getChildAt(d)))
                                                                trace("hit token");
                                                                //play sound
                                                                token.play();
                                                                theGameStage.removeChildAt(d);
                                                                numChildrenInGameStage = theGameStage.numChildren;
                                                      } // end if
                                            } // end if
                                  } //end for
                        } // end function processCollisions
                        private function scrollStage():void
                                  if (thePlayer.x != lastX)
                                            theStageNeedsToScroll = true;
                                  else
                                            theStageNeedsToScroll = false;
                                  } // end if
                                  if (theStageNeedsToScroll == true)
                                            for (var b:int = 0; b < childrenOnStage; b++)
                                                      if (getChildAt(b).name == "enemy")
                                                                getChildAt(b).x += (stage.stageWidth * 0.5) - thePlayer.x;
                                                      } // end if
                                            } //end for
                                            theGameStage.x += (stage.stageWidth * 0.5) - thePlayer.x;
                                  } //end if
                                  thePlayer.x = stage.stageWidth * 0.5;
                                  lastX = thePlayer.x;
                        } //  end function scrollStage
                        // figure out logic
                        //  end function scrollStage
                        private function removeOrCreateNewEnemies():void
                                  currentNumberOfEnemiesOnstage = 0;
                                  for (var c:int = 0; c < childrenOnStage; c++)
                                            if (getChildAt(c).name == "enemy")
                                                      currentNumberOfEnemiesOnstage++;
                                            } // end if
                                  } // end for
                                  if (currentNumberOfEnemiesOnstage < maxEnemies)
                                            trace("not enough enemies onstage, make more");
                                            createEnemy();
                                  } //end if
                                  makeNewEnemyTimer.start();
                        } //end function
                        public function finishOffEnemyComplete(event:TimerEvent):void
                                  enemyKills++;
                                  killScoreBox.text = String(enemyKills) + " KILLS ";
                                  removeChildAt(childToRemove);
                                  childrenOnStage = this.numChildren;
                        } // end functioin

Maybe you are looking for

  • Help bring components to front!

    If I have multiple components positioned at the same location, how can I bring one component to front (so you can see it) without giving it the focus?

  • IPod has an error that iTunes is not fixing.

    Hey so I have my 5G 30GB iPod and when I turn it on I read the following: "Connect to your computer, use iTunes to restore." when I do this my computer goes through the process of restoring it but then the computer tells me to restore the iPod again.

  • Planning upgrading from t3i

    Hey guys!So I've had my t3i for a while and I think I'm hitting the limitations in the t3i in terms of what I'm doing now. I've had the camera for about 1-2 years (was given to me as a xmas gift) and up until now, I've done automotive photography, na

  • Want the old display method

    I was using I-Tunes ver 9 and I was loving the display options we had available but now that I had to reinstall it those display options have all changed and are no longer available. How could I go back to the old version without having to rebuilt al

  • Unattended copying from a netatalk share

    Hi everyone, I'm currently migrating 3 Linux file servers to a new Mac OS X Server. The Linux servers use netatalk to provide AFP shares. I now need to copy all data (many TB) to the Mac server. If I try to copy everything at once using Finder it wil