HELP! I've created a blue movie!

Just created my first movie using Premier Pro CS5. Just a standard QuickTime DV Pal. As I've done with CS4, I went to File - Export - Media. I set it to QuickTime PAL DV then clicked Export. To my surprise it started rendering without first opening Adobe Media Encoder CS5. Is that normal?
Anyway, when I viewed the rendered file in QuickTime I noticed that certain sections that should be in colour were just bright blue. Initially I thought I'd left in an unwanted Video effect for those particular sections. But no. I can't get to the bottom of the problem. The entire .prproj file renders fine in CS4 using Adobe Media Encoder CS4. The two individual movies render fine on their own in CS5. Even earlier sections of the same movie render fine. Has anyone else had a similar problem? I'm mystified.
SOLUTION
Only good news is that I've got a solution:
Instead of clicking Export in the Export Settings box, I click Queue. This takes me to the Adobe Media Encoder CS5. I then click Start Queue. Resultant QuickTime movie is fine!
But it should still work using Export shouldn't it?
Any ideas anyone?

Guys that is why the PRO external MONITOR is needed and it is expensive!
And color management of your monitor is often not the broadcasting one (I just bought nVIDIA CUDA 3800FX graphic card the other day, and when I installed it, it asked me which monitor color profile I wanna use to work with... And it is much more then just sRGB and sADOBE ones... Almost like pro-printers!!!
I use hardware gadget to calibrate my monitors, but still check all my work up on CRT TV-set (nowadays you can get really good second hand CRT TVs, since people are all changing them for "slim" ones - and TUBE TV (CRT) is still the most reliable one!!! So, if you can't afford real studio MONITOR (I know that  I can't), my advise to you is to buy some good SONY CRT TV-set (at least 32" screen)  somewhere from the second hand market!!!
I would also suggest using some other DV codecs then QUICK TIME one, I tried many of them in the time I was working with DV materials, and my personal favorite was MAIN CONCEPT DV codec, although Panasonic had good one... And someone just told me yesterday on 5D forum that QUICK TIME codecs (being APPLE's product) aren't suitable for 64bit computing, so they crush down your quality to 32-bit ---- I don't know if that is correct - just telling you what I was told!
And about exporting or queing (for opening Media Encoder) ---- It is still Media Encoder's engine rendering your file directly from Premiere, they just made it so that if you have only one file to render, you save time and extra process of going into ENCODER's window....
But, if you still wanna do it from there (which I personally do, 'cause you can still change some custom setting from there, or you intend to export more files, but not one at the time, just press QUEUE - and your MEDIA ENCODER WINDOW will pop up!!!
Good luck and all the best in the New Year!!!!
V.

Similar Messages

  • Help with Automator - create workflow to move files to dated folders

    If anyone could help me, I'd greatly appreciate it.
    I have no idea how to use Automator, but I think it'd be perfect for this job.
    I want to take a folder of files (images) and move them to separate folders which are named for the dates that the files were created on. So, for instance, I have a folder of ten images. Five were created on November 1st and the other five were created on November 2nd. I want to create two folders on the desktop with the dates in the name (like 20071101 & 20071102) and take the five images from 11/1 and move them to the 20071101 folder and the five images from 11/2 and move them to the 20071102 folder (sorry for the run-on sentence).
    Is this possible with Automator? Is this an easy thing to do?
    Thanks,
    Antonio

    I'm trying to do something very similar. I need to open an image sequence in QuickTime and export them to a mov file. Easy enough, but I would also like to create a new Finder folder and name it with today's date and save the mov file to that new folder.
    What frustrates me is that it doesn't appear you can name Finder folders in any way other than using the Rename Folder action. I was hoping to use today's date that I had copied to the clipboard. Also, I have no experience using AppleScript, so hoping to avoid anything advanced there.

  • Trying to create a new movie.  It tells me to name my movie, and the only event choice is the last movie I made.  I don't want it there.  I'm lost and I'm just starting.  Not sure I like the new version.  Any help out there?

    I'm trying to create a new movie.  It tells me to name my movie, and the only event choice in the drop down menu is the last movie I made. IMovie Library is greyed out. I'm lost and I'm just starting.  Not sure I like the new version.  Any help out there?

    peggy818 wrote:
    … I'm lost and I'm just starting.  Not sure I like the new version.  …
    have a read in the Manual:
    http://help.apple.com/imovie/mac/10.0/?lang=en#mov755717b21

  • General Overview on How to use Final Cut Studio to create a Blu-Ray DVD

    I am a new user of Final Cut Studio and need an experienced user to give my a progression guide on how to create a Blu-Ray DVD of my recent Alaska Trip. Last month I spend 8 days in Alaska visiting Denali and Juneau primarily. During that time I took about 100 short video clips (HD 1080p) and 570+ still photos with my Canon 7D. I have experimented with some pieces of the software and have created a Blu-Ray disk using Final Cut Pro and Compressor. However my goal is to create this DVD with menus that will play short clips (some narrated) and still photos(also some narration). I did a short one in DVD Studio Pro this morning but need some general guidance on what progression and programs to use to create this project. I was not able to take my video from the Studio Pro Sequence I created for my 1st DVD I had to take the original clips which were processed using Apple ProRes 422 and copy them in one at a time and then find the audio (on the voice overs) I created and also place them into DVD Studio Pro one at a time. I obviously need some guidance on the proper progression.
    Any help would be greatly appreciated.

    Here's the situation...
    DVD Studio Pro will not do the trick for you - it doesn't do blu-ray discs. If you want to do Blu-ray you've got to use either Final Cut Pro's "Export" command or Compressor's "Burn Blu-ray disc" template. The downside to both of these approaches is that you can't burn more than one title (or movie, etc.) using Final Cut Studio.
    To do what you want to do, you need Toast (at least). Toast will auto-generate menus but will let you put more than one title per slide (so you can put multiple slideshows on the same disc).
    If you want to do full-on customizing of menus and multi-level menus, for that you need Adobe's Encore.
    My suggestion - Get Toast. Encore is close to $800.
    Here's your progression (at least the one I use).
    Edit in Final Cut Pro (ProRes 422 is fine, ProRes 422 LT would do the trick as well)
    Export as QuickTime movies (original settings)
    In Compressor using the H.264 for Blu-ray setting and Dolby Digital setting and create elementary streams for video (.264 file) and audio (.ac3). Make sure these files have identical names except for the extension.
    Using toast, add the video file to the Toast project and it'll find the audio file.
    Burn away!

  • When I import my Sony video, which is in m2ts format, the file size is a few times larger.  This affects the volume of clips for creating the blu-ray or DVD discs.  How can I squeeze the file size without sacrificing the quality of output?

    When I import my Sony video, which is in m2ts format, the file size is a few times larger.  This affects the volume of clips for creating the blu-ray or DVD discs.  How can I squeeze the file size without sacrificing the quality of output?  Is there any other ways of achieving this?

    wongrayd wrote:
    Thanks.  I do not have the experience on burning discs from iMovie for the movie after editing (ie for video discs players).  It seems that i cannot find the relevant command in the tool bar for this purpsoe.  Would you please show me the way?
    The command is gone because iDVD has been discontinued by Apple. After Apple discontinued iDVD they removed the iDVD burning link from iMovie. I still use iDVD sometimes, only because I have an old copy.
    wongrayd wrote:
    You have mentioned about Handbrake as a converter.  What is the RF no. (under Constant Quality) meant?  It seems that the smaller the no. is, the better quality will be.  What is the optimal no.? or should we use the Average Bitrate? Again, what is the best rate?  Furthermore, which format is more suitable or the best: H264 or mpeg 2/4?
    I don't know what RF means. When I have used HandBrake, I've used presets that apply to what I want to do, so I don't know the meaning of each individual setting. However, it appears that many of them are listed in the HandBrake User's Guide that is linked from the Help menu in the program:
    https://trac.handbrake.fr/wiki/HandBrakeGuide
    wongrayd wrote:
    For iMac, except iMovie, what other software is the best for the amateur?  I have read Photoshop.  Can this support m2ts files and user friendly?
    Photoshop is not amateur-level software, and although it can edit a video, it cannot burn a DVD. Unfortunately, because I still use iMovie, I haven't tried anything else. You might want to read the reviews of various DVD-burning applications in the Mac App Store.
    And maybe another forum member will jump in and help us here!

  • How To: Use FCPX to create iPhone Portrait Movies (and other non-standard formats)

    Goal: Use Final Cut Pro X 10.0.7 to produce a 640x1136 video (iPhone 5 Portrait). You can use these same steps to produce virtually any dimensions you want. My example is for the iPhone 5, in Portrait mode.
    This information is available in various places, but you have to realy work to find it, so I thought I'd post a step-by-step guide here.
    By the way, you might think you could just create a FCPX Project with your desired dimensions, but you can't (at least with 10.0.7). Projects only support certainly dimensions. But there are other ways, as the rest of this post describes:
    1) Create an initial movie with the desired dimensions, to serve as a template. We'll call it "Template.mov". The only thing that matters is the dimensions. It can be in any codec FCPX understands, and virtually any length.
    I'm using a 2 second video shot on my iPhone for the template. You could also create a blank image (.png, whatever) with the proper dimensions, copy and paste it into a new Quick Time Pro 7 window, and Export it using custom settings. There's lots of different ways to do this.
    2) Drop Template.mov into a FCPX event.
    3) Select Template.mov in the Event browser, and select File->Duplicate (or command-D). You probably could just edit "Template.mov", but it's a good idea to save it for reuse.
    3) Change the name of the copied video. I'm using "iPhone Video".
    4) Right-click "iPhone Video" and select "Open in Timeline".
    5) If you made the Template video from a still image, you may need to change the duration (ctrl+D). You don't have to make it very long, but it needs to be longer than 1 frame. A few seconds should be enough.
    6) Use this timeline like you'd use a project's timeline. Drop in new content, trim, transition, etc. There may be things you can't do in it, but I haven't found any yet. I'm guessing Chapters may not work, but I haven't tried them.
    7) Note that when you drop new content into the timeline, it may size funny. That's because the default setting for "Spacial Conform" is "Fit". Simply select the newly-dropped content, and in the Video settings inspector, scroll down to "Spacial Conform" and change it. You could use "Fill", which fills the frame vertically, or "None", which uses the source's original height. Then crop/transform/whatever to get what you want.
    8) When you're ready to render, select "iPhone Video" in the Event browser, then use the "Share" button. You want to use the "Export File" destination, which you may have to add. Pick your codec, and let 'er rip.
    9) When the rendering is done, you should have a video in your desired dimensions.
    That's all there is to it. Hope this helps someone.
    Dan
    PS: Don't ask why someone would want to create an iPod video using FCPX. The point is that you may need to create a video with non-standard  dimensions at some point in time, and this is how to do it.
    PPS: Most of this information came from http://library.creativecow.net/articles/payton_t/FCPX_Custom-Resolution-Timeline s/video-tutorial. I just wrote it down, while I tried to do what the video suggested.

    Instructions for using QuickTime Pro 7 to create a template video with unusual dimensions.
    I suspect that anyone savy enough to be using FCPX has probably already figured out how to do this, either using my technique or another, so there probably isn't a real need for me to post this. For that matter, I may be the only person who cares about this at all. However, while I was trying to learn how to do all of this, I would have really appreciated having all the information in one place, so here goes.
    If you want to create a video with unusual dimensions (like 640x1136) using my steps above, you'll need a "template" video first. Here's an easy way to create one, using any image editor, and QuickTime Pro 7.
    1) Open QuickTime Pro 7 (QTP for short).
    2) From the menu, select File->New Player. You'll get a window with just the bottom portion of the player, i.e. the playback controls.
    3) Using an image editor, create a still image in the desired dimensions. You can use any image editor. It doesn't matter what the image contains (although it will end up showing as a thumbnail in FCPX).
    4) Copy the image to the clipboard.
    5) Switch back to QTP, and paste the image into the new player. Don't worry that there isn't a video window showing - just paste it into the window that has only playback controls. As soon as you do, the video window appears.
    6) Advance to the end of the movie (the short, 1-frame movie), then hold down Command+V (paste) and keep holding it down to paste multiple images in. Watch the time advance. You could, if you want, just hold down Command+V until you get the length you want. But if you want a long video, there's an easier way:
    7) When you reach a few seconds (or whatever duration your patience allows), select all (Command+A) and copy (Command+C). Then hold down Command+V to keep pasting in the longer clips. Wait until you reach a longer duration, then repeat the process. So, for example, 1 second, then 10 seconds, then 1 minute, then 10 minutes, then 1 hour. Or whatever you want.
    8) Save the video however you want. I usually use File->Export with H.264, with Quality set to "Least". Just make sure you don't let it change the dimensions. If you resized the player window, depending on which "save" or "export" method you've chosen, it might default to the resized dimensions, so double check that to make sure.
    That's it. You now have a template video you can use with my previous post(s).
    Dan

  • Creating a QuickTime movie with the new Canon T5i  camera in iMovie 9.0.9.

    Help needed creating a QuickTime movie with the new Canon T5i  camera in iMovie 9.0.9.  The project is done and looks good...I need help understanding what settings need to be set so I can make a QuickTime movie in the highest quality that would fit the ratio of 16.9 to be sent out to my YouTube page.  I played around with some of the settings and have not come with the right setting for the video.  I want the highest quality with the lowest amount of megabytes…thanks

    I would suggest using SHARE/EXPORT MOVIE and choose 1920x1080 (if your source material supports this).
    That should work well in YouTube.
    If you want to go further with custom QuickTime settings,  here are some that should work, but in my experience, it will be no better than using SHARE/EXPORT MOVIE.
    follow the instructions below to create a .mov video that will work on YouTube:
    In iMovie, select Share > Export Using QuickTime
    Next, you may want to check your Options to verify that the following settings are correct:Video settings
    Compression Type: H.264
    Frame Rate: 30 is preferred. 23.98, 24, 25, 29.97 are also acceptable.
    Data Rate: Automatic
    Key Frames: Automatic
    Frame Reordering: Unchecked
    Audio/Sound settings
    Format: AAC
    Click Show advanced settings and choose Constant Bit Rate as encoding strategy
    Other settings
    Size: Choose the original size of the video
    “Prepare for Internet Streaming”: Fast Start

  • Video is zoomed in when i create a new movie.

    New iMac user.  Trying to work in iMovie.  Dumped video in and have it linbed up in "Events."  When I try to create a new Project, I can't.  It does not even give me the option.  The only option I have is to create a new Movie.  When I do that, the video seems "zoomed in" or pushed forward a bit, cutting off the bottom part of the video once moved into the edit space.
    Would love some guidance on how to stop this or to help me understand what it is I have done wrong.
    Thanks for any light you can shed.
    Forgyman

    New Movie creates a new project.  If you select the project and click on "Settings" (top right over viewer window), you will see "Photos placement"  Zoom  (the default which applies the Ken Burns effect to stills).  You can change this to "Fit" (which will not crop any of the photo or video but leave black borders if necessary)  or  "Crop" (which will crop to avoid black borders).  This only acts on clips added afterwards, not ones already in the timeline which have to be corrected seperately (though you can select multiple clips and change them all by selecting "Adjust", choosing the cropping tool and changing the "Style" setting.
    See: http://help.apple.com/imovie/mac/10.0/#mov26d3f6a6c   for more details.
    Geoff.

  • Want to create a small Movie to play on ipod

    Hallo
    I want to create a small Movie-file to play on my iPod, but I don't want to use the quite large Standard iPod-Format. What other choices do I have? I tried MPEG4, but it didn't play.
    I produce a Videopodcast, and want to keep the size small, and it should also play on iPods.
    Any Suggestions?
    Thanks everybody.
    Greetings from Switzerland
    Rolf

    Okay, thank you for trying to help me, but I guess, I didn't make clear what I really want.It would be a lot easier if you simply stated a target file size for a given duration here. For instance, lets say you want an iPod file targeted at 3 MBs/min or 9 MBs for your 3 minute file. This would require you to limit your audio plus video data rate to an average of approximately 384 Kbps. Since this is roughly half the data rate recommended for a 320 x 240 "Baseline" profile H.264/AAC iPod/Podcast file, your would have to use alternaive compression settings to the "iPod" preset. If I assume you wish to use QT Pro as your current workflow would suggest, then the obvious solution would be to use the "Movie to MPEG-4" export option since the lowest available "auto-adaptive Movie to iPod" option would be twice this figure.
    QT Pro Export option: MPEG-4
    File Format: MP4
    Video Tab Settings:
    Video Format: H.264
    Data Rate: 320 Kbps
    Image Size: 320 QVGA (for 4:3 aspect ratio) or as appropriate for other aspects at 320 pixel width
    Frame Rate: Current
    Key Frame: Automatic
    Video Options: Baseline/Faster Encode
    Audio Tab Setttings:
    Audio Format: AAC-LC (Music)
    Data Rate: 64 Kbps
    Channels: Mono or Stereo
    Output Sample Rate: 44.1 KHz
    Encoding quality: Better
    Streaming Settings:
    Enable streaming box: Unchecked
    One the other hand, if all you want to do is half your current output file size, then:
    open your DV file in the QT Player
    open the "Show Movie Properties" window
    select the video track
    select the "Visual Settings" tab
    turn Preserve Aspect Ratio off if needed
    enter 320 x 240 or other 320 width aspect ratio "Scaled Size" settings
    and convert using the "Movie to iPod" export option
    This series of steps forces the "auto-adaptive" function to export as an H.264/AAC "Baseline" profile with video data rate limited to less than 768 Kbps and a 128 Kbps/44.1 KHz stereo audio track or roughly half the file size of your current "Baseline Low Complexity" profile. Both of these possibilities, of course, assume you would be satisfied with the reduced display size (320 x 240 QVGA) iPod compatible/Podcast file format and the quality produced in the 3 MBs/min to 6 MBs/min range covered by these two suggestions.
    P.S.,
    Is there any particular reason you are not exporting directly from FCE to your iPod/Podcast target file?

  • Create a new Movement Type wrt 101

    Hello colleagues ,
    I want to create a new movement type same as 101 , and want that when I will do goods receipt with reference to Purchase order instead of Movement type 101 my new movement should be selected by the system.
    I know how to copy the new movement but when  I am doing GR wrt PO 101 is selected  and not the new movement ?
    Please help me !
    Thanks a lot !
    regards
    Shashank

    Hello All ,
    These solutions will work  fine as such !
    But see this :
    If I do VL02N for a Delivery (This is created wrt to STO ) and in Customizing set it one step procedure .
    Then the default behaviour of system is it will do first 647 Mvt then this will be followed by 101 Mvt
    when the PGI will be done.
    Now I copy the Mvt type for 647  as  X11 and  for 101 as Y11 .
    So now when I do VL02N , the system should post X11 and Y11 , and not 647 and 101 ??
    Can you please help me further ?
    Thanks for the contribution !
    Regards
    Shashank

  • Plz help me to create a directory

    hi guys
    i'm trying to create directory to put xml files into it
    but i got error messages. as following
    SQL> create directory db2 as 'c:\az';
    Directory created.
    SQL> Grant all on directory db2 to public
    SQL> BEGIN
    2 DBMS_XMLSCHEMA.registerSchema(
    3 SCHEMAURL=>'http://homepagezz.com/Movies.xsd',
    4 SCHEMADOC=>bfilename('db2','Movies.xsd'),
    5 LOCAL =>false,
    6 GENTYPES=>false,
    7 GENTABLES=>FALSE,
    8 CSID=>nls_charset_id('AL32UTF8'));
    9 END;
    10 /
    BEGIN
    ERROR at line 1:
    ORA-22285: non-existent directory or file for FILEOPEN operation
    ORA-06512: at "SYS.DBMS_LOB", line 635
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 127
    ORA-06512: at line 2
    so plz guys if u know help me

    ... bfilename('db2','Movies.xsd'), ...
    db2 must be in UPPERCASE. It is a directory object and therefore the name must be uppercased.
    ... bfilename('DB2','Movies.xsd'), ...

  • IMovie won't let me create a new movie

    When i try to create a new movie, i input a title and no event title comes up below. When i press "create" it tells me that the operation can not be completed and no information is available about the problem. I haven't had this problem before and I use iMovie regularly. The current iMovie is version 10.0.4. the computer is an iMac 21.5, though I'm not sure if that is relevant.
    Please help! Thanks

    OK
    How many hard disk's do You have ?
    one in Your MacBook Pro.
    any more external ones ?
    As I see it - this can be due to that iMovie can not find the material - either:
    it is Photos or material from iPhoto and iPhoto library has problems - in need of repair
    material was stored on Memory-card or external hard disk not connected just now
    iMovie got some information wrong in it's preference file - trash this pref file and see if iMovie behaves
    preferences got it wrong - use Disk Util program to repair preferences
    The most obvious and common things that can go wrong.
    Yours Bengt W

  • I have 3  h.264 files which i want to create a dvd movie with?

    hi guys
    i hope you can help.
    i have 3 seperate h.264 files (video has been graded and colour corrected) which i want to put on a dvd as one seamless movie.
    my friend did the exporting and had to do it in smaller chunks because it kept crashing his computer., the format he used was h.264, now its very important that i can create a dvd movie with these files to be viewed on a standalone dvd player..
    how would do i this? most efficient method and preserve  good quality?

    One thing to be aware of is when you burn a disk image in Encore, you'll end up with a .iso disk image file.  In the past I made the mistake of dragging the .iso file into the  dvd-r folder and burning it from finder.   This made it so it burned as a data DVD that didn't play on my DVD player.  In order to make playable copies of the DVD using the disc image you have to use the apple Disk Utility application located in utilities to burn a playable DVD.  Do this...
    Open Disk Utility located in / Applications / Utilities /  Disk Utility.
    Click Burn in  the tool bar at the top of the window and select your Adobe Encore disc image (.iso).
          3.  Select the Appropriate DVD burning drive and insert your blank disc. Make sure your disc is free of dust and fingerprints before burning to reduce the probability of failure.
         4. Click Burn to create your DVD disc.
         5. Remember to test your disc in several DVD players if possible before burning additional copies.

  • Help needed with creating Flash game

    Hello,
    I need to create Flash educational/quiz game for one of my clients. It would be based on concept like these ones for example:
    Example 1
    http://go.ucsusa.org/game/
    Example 2
    http://www.zdravlje.hr/igre/stop-aids/
    Note: when you open this link you will see two text boxs which you first must fill. On the left side text box "Upišite ime" means "Type your name" and right one "Upišite godinu svog rođenja" means "Year of birth"
    What is interesting about this type of games is that they are classic games (for example game Labirint where you have to find way out), but during play pop-up questions starts to appear to test end user knowledge abot certain topic (in example 2 topic is about AIDS/HIV). In case of my client, topic is about Eco environment.
    Here is where my trouble starts;) : I found many useful free tutorials how to create simple flash game (most interesting example I found is this one http://www.strille.net/tutorials/snake/index.php)  BUT I dont know how make that system of popup questions appear during game similar to Example 1 and Example 2?
    Any help is appreciated and thanks in advance for promt reply.
    Greetings,
    Adnan

    Update: I have just read all instructions in Snake tutorial which helped be better realize how Snake game works.
    a) This is what I plan to realize for my client:
    1. Snake game which end users will play and during play pop-up/quiz quesions will appear on topic Eco environment;
    2. For example when end user earns 50 points he must answer some of the random questions like "Q:How many ton of waste are produced by US livestock each year" with three answers A1: "1 milion" A2: "1 bilion" A3: "2 bilion" and after user scores 100 points then another question pops up and so on. This is all true if all answers are correct but in case he answer some question wrong than game can start from begining or another solution could be he looses -50 or -100 points.
    3. At the end, user which gains most points wins.
    b) This is what I have done till now:
    I have this file http://www.strille.net/tutorials/snake/snakeGameWithHighscore.zip which I partly understand how it works with my Flash knowladge.
    All functions and main game engine is in layer code:
    "// Snake Game by Strille, 2004, www.strille.net
    blockSize = 8;   // the block width/height in number of pixels
    gameHeight = 30; // the game height in number of blocks
    gameWidth  = 45; // the game width in number of blocks
    replaySpeed = 1;
    SNAKE_BLOCK = 1; // holds the number used to mark snake blocks in the map
    xVelocity = [-1, 0, 1, 0]; // x velocity when moving left, up, right, down
    yVelocity = [0, -1, 0, 1]; // y velocity when moving left, up, right, down
    keyListener = new Object(); // key listener
    keyListener.onKeyDown = function() {
        var keyCode = Key.getCode(); // get key code
        if (keyCode > 36 && keyCode < 41) { // arrow keys pressed (37 = left, 38 = up, 39 = right, 40 = down)...
            if (playRec) {
                if (keyCode == 37 && replaySpeed > 1) {
                    replaySpeed--;
                } else if (keyCode == 39 && replaySpeed < 10) {
                    replaySpeed++;
            } else if (game.onEnterFrame != undefined) { // only allow moves if the game is running, and is not paused
                if (keyCode-37 != turnQueue[0]) { // ...and it's different from the last key pressed
                    turnQueue.unshift(keyCode-37); // save the key (or rather direction) in the turnQueue
        } else if (keyCode == 32) { // start the game if it's not started (32 = SPACE)
            if (!gameRunning || playRec) {
                startGame(false);
        } else if (keyCode == 80) { // pause/unpause (80 = 'P')
            if (gameRunning && !playRec) {
                if (game.onEnterFrame) { // pause
                    delete game.onEnterFrame; // remove main loop
                    textMC.gotoAndStop("paused");
                } else { // exit pause mode
                    game.onEnterFrame = main; // start main loop
                    textMC.gotoAndStop("hide");
    Key.addListener(keyListener);
    function startGame(pRec) {
        x = int(gameWidth/2); // x start position in the middle
        y = gameHeight-2;     // y start position near the bottom
        map = new Array(); // create an array to store food and snake
        for (var n=0;n<gameWidth;n++) { // make map a 2 dimensional array
            map[n] = new Array();
        turnQueue = new Array(); // a queue to store key presses (so that x number of key presses during one frame are spread over x number of frames)
        game.createEmptyMovieClip("food", 1); // create MC to store the food
        game.createEmptyMovieClip("s", 2); // create MC to store the snake
        scoreTextField.text = "Score: 0"; // type out score info
        foodCounter = 0; // keeps track of the number of food movie clips
        snakeBlockCounter = 0; // keeps track of the snake blocks, increased on every frame
        currentDirection = 1; // holds the direction of movement (0 = left, 1 = up, 2 = right, 3 = down)
        snakeEraseCounter = -1; // increased on every frame, erases the snake tail (setting this to -3 will result in a 3 block long snake at the beginning)
        score = 0; // keeps track of the score
        ticks = lastRec = 0;
        recPos = recFoodPos = 0;
        playRec = pRec;
        if (!playRec) {
            textMC.gotoAndStop("hide"); // make sure no text is visible (like "game over ")
            highscores.enterHighscoreMC._visible = false;
            statusTextField.text = "";
            recTurn = "";
            recFrame = "";
            recFood = "";
            game.onEnterFrame = main; // start the main loop
        } else {
            if (loadedRecordingNumber != -1) {
                var n = getLoadedRecordingNumberHighscorePos(loadedRecordingNumber);
                statusTextField.text = "Viewing " + highscores[n].name.text + "'s game (score " + highscores[n].score.text + ")";
            } else {
                statusTextField.text = "Viewing your game";
            game.onEnterFrame = replayMain; // start the main loop
        placeFood("new"); // place a new food block
        gameRunning = true; // flag telling if the game is running. If true it does not necessarily mean that main is called (the game could be paused)
    function main() { // called on every frame if the game is running and it's not paused
        if (playRec) {
            if (ticks == lastRec+parseInt(recFrame.charAt(recPos*2)+recFrame.charAt(recPos*2+1), 36)) {
                currentDirection = parseInt(recTurn.charAt(recPos));
                lastRec = ticks;
                recPos++;
        } else if (turnQueue.length) { // if we have a turn to perform...
            var dir = turnQueue.pop(); // ...pick the next turn in the queue...
            if (dir % 2 != currentDirection % 2) { // not a 180 degree turn (annoying to be able to turn into the snake with one key press)
                currentDirection = dir; // change current direction to the new value
                recTurn += dir;
                var fn = ticks-lastRec;
                if (fn < 36) {
                    recFrame += " "+new Number(fn).toString(36);
                } else {
                    recFrame += new Number(fn).toString(36);
                lastRec = ticks;
        x += xVelocity[currentDirection]; // move the snake position in x
        y += yVelocity[currentDirection]; // move the snake position in y
        if (map[x][y] != SNAKE_BLOCK && x > -1 && x < gameWidth && y > -1 && y < gameHeight) { // make sure we are not hitting the snake or leaving the game area
            game.s.attachMovie("snakeMC", snakeBlockCounter, snakeBlockCounter, {_x: x*blockSize, _y: y*blockSize}); // attach a snake block movie clip
            snakeBlockCounter++; // increase the snake counter
            if (map[x][y]) { // if it's a not a vacant block then there is a food block on the position
                score += 10; // add points to score
                scoreTextField.text = "Score: " + score; // type out score info
                snakeEraseCounter -= 5; // make the snake not remove the tail for five loops
                placeFood(map[x][y]); // place the food movie clip which is referenced in the map map[x][y]
            map[x][y] = SNAKE_BLOCK; // set current position to occupied
            var tailMC = game.s[snakeEraseCounter]; // get "last" MC according to snakeEraseCounter (may not exist)
            if (tailMC) { // if the snake block exists
                delete map[tailMC._x/blockSize][tailMC._y/blockSize]; // delete the value in the array m
                tailMC.removeMovieClip(); // delete the MC
            snakeEraseCounter++; // increase erase snake counter   
        } else { // GAME OVER if it is on a snake block or outside of the map
            if (playRec) {
                startGame(true);
            } else {
                gameOver();
            return;
        ticks++;
    function replayMain() {
        for (var n=0;n<replaySpeed;n++) {
            main();
    function gameOver() {
        textMC.gotoAndStop("gameOver"); // show "game over" text
        delete game.onEnterFrame; // quit looping main function
        gameRunning = false; // the game is no longer running
        enterHighscore();
    function placeFood(foodMC) {
        if (playRec) {
            var xFood = parseInt(recFood.charAt(recFoodPos*3)+recFood.charAt(recFoodPos*3+1), 36);
            var yFood = parseInt(recFood.charAt(recFoodPos*3+2), 36);
            recFoodPos++;
        } else {
            do {
                var xFood = random(gameWidth);
                var yFood = random(gameHeight);
            } while (map[xFood][yFood]); // keep picking a spot until it's a vacant spot (we don't want to place the food on a position occupied by the snake)
            if (xFood < 36) {
                recFood += " "+new Number(xFood).toString(36);
            } else {
                recFood += new Number(xFood).toString(36);
            recFood += new Number(yFood).toString(36);
        if (foodMC == "new") { // create a new food movie clip
            foodMC = game.food.attachMovie("foodMC", foodCounter, foodCounter);
            foodCounter++;
        foodMC._x = xFood*blockSize; // place the food
        foodMC._y = yFood*blockSize; // place the food
        map[xFood][yFood] = foodMC; // save a reference to this food movie clip in the map
    //- Highscore functions
    loadHighscores();
    enterHighscoreKeyListener = new Object();
    enterHighscoreKeyListener.onKeyDown = function() {
        if (Key.getCode() == Key.ENTER) {
            playerName = highscores.enterHighscoreMC.nameTextField.text;
            if (playerName == undefined || playerName == "") {
                playerName = "no name";
            saveHighscore();
            Key.removeListener(enterHighscoreKeyListener);
            Key.addListener(keyListener);
            highscores.enterHighscoreMC._visible = false;
            loadedRecordingNumber = -1;
            startGame(true);
    function enterHighscore() {
        if (score >= lowestHighscore) {
            highscores.enterHighscoreMC._visible = true;
            highscores.enterHighscoreMC.focus();
            Key.removeListener(keyListener);
            Key.addListener(enterHighscoreKeyListener);
        } else {
            loadedRecordingNumber = -1;
            startGame(true);
    function getLoadedRecordingNumberHighscorePos(num) {
        for (var n=0;n<10;n++) {
            if (num == highscores[n].recFile) {
                return n;
    function loadHighscores() {
        vars = new LoadVars();
        vars.onLoad = function(success) {
            for (var n=0;n<10;n++) {
                var mc = highscores.attachMovie("highscoreLine", n, n);
                mc._x = 5;
                mc._y = 5+n*12;
                mc.place.text = (n+1) + ".";
                mc.name.text = this["name"+n];
                mc.score.text = this["score"+n];
                mc.recFile = parseInt(this["recFile"+n]);
            lowestHighscore = parseInt(this.score9);
            if (!gameRunning) {
                loadRecording(random(10));
            delete this;
        if (this._url.indexOf("http") != -1) {
            vars.load("highscores.txt?" + new Date().getTime());
        } else {
            vars.load("highscores.txt");
    function loadRecording(num) {
        vars = new LoadVars();
        vars.onLoad = function(success) {
            if (success && this.recTurn.length) {
                recTurn = this.recTurn;
                recFrame = this.recFrame;
                recFood = this.recFood;
                startGame(true);
            } else {
                loadRecording((num+1)%10);
                return;
            delete this;
        loadedRecordingNumber = num;
        if (this._url.indexOf("http") != -1) {
            vars.load("rec"+loadedRecordingNumber+".txt?" + new Date().getTime());
        } else {
            vars.load("rec"+loadedRecordingNumber+".txt");
    function saveHighscore() {
        sendVars = new LoadVars();
        for (var n in _root) {
            if (_root[n] != sendVars) {
                sendVars[n] = _root[n];
        returnVars = new LoadVars();
        returnVars.onLoad = function() {
            if (this.status == "ok") {
                loadHighscoresInterval = setInterval(function() {
                    loadHighscores();
                    clearInterval(loadHighscoresInterval);
                }, 1000);
            delete sendVars;
            delete this;
        sendVars.sendAndLoad("enterHighscore.php", returnVars, "POST");
    function startClicked() {
        if (!gameRunning || playRec) {
            if (highscores.enterHighscoreMC._visible) {
                Key.removeListener(enterHighscoreKeyListener);
                Key.addListener(keyListener);
                highscores.enterHighscoreMC._visible = false;
            startGame(false);
    function viewGame(lineMC) {
        loadRecording(lineMC.recFile);
        statusTextField.text = "Loading " + lineMC.name.text + "'s game...";
    Now what is left to do is somehow to iclude educational quiz in this game/code. First idea that came to me is same thing Ned suggested: to create some unique movie clip which would contain all data/questions lined up but main problem for me is how to "trigger" that movie clip to play only AFTER end user clicks on "Start game" or SPACE to restart? Not sure how to solve this issue?

  • I created my first movie using one long video (all photos) clip created in Keynote and imported to Imovie.  I added many music clips, some overlapping. I now want to lay down a new updated video clip, eliminate the original but retain the audio. Can I?

    I created my first movie using one long video (a montage of photos) clip created in Keynote and imported to Imovie.  I added many music clips, some overlapping. I now want to lay down a new updated video clip, eliminate the original video, but retain the audio. Can I?  And if so, how.  I cant seem to
    find the info anywhere in help.

    I would suggest that you go to iMovie/Preferences and make sure that Advanced Tools are enabled.
    Then, you can drag your new video clip on top of your old clip and a popup menu should appear. Choose REPLACE.

Maybe you are looking for

  • HELP!! can't open raw files in photoshop ver 12.1- new 5D mark iii camera

    I have photoshop creative suite version 12.1 - just bought a new mark iii camera  and my raw files won't open in my photoshop version....what can i do??

  • Please help with Macbook Pro

    Please read my story because I really need some help... I've had my Macbook Pro for only a little over a year now but it has already given me tons of problems and headaches. I was very happy when I first got it but over the next few months I noticed

  • Adobe ID's not showing up in DPS Account Admin dashboard??

    I have developed a magazine app using the companies DPS subscription. Our app has a subscription model, so I need to specify the shared secret information with our Adobe account to enable the subscription to work within the viewer app. When I go to t

  • MobileMe Gallery for iPad

    As we can all see now, Apple have failed to provide (so far) a universal gallery application for it's very own expensive & heavily promoted iPad; which would be less embarrassing if none of the 3rd party developers for a whole range of pre-existing i

  • How can you verify an attachment exists?

    On the leave request form that I'm working on, there are certain leave types that require that the form originator attach some sort of documentation, like a doctor's note if they are claiming sick leave. In my start point, I have the "Permit adding a