Help me with creating a Livello1.m document

I wish to create a Livello1.m document for a iphone/ipad app?
THANK YOU IN ADVANCE,
cheers

the game im working on is good, all i think i did by accident last night was delete it and cause im new asking in forum never dawned on me till now. yes my own code. i have widen my search to look in the mac and found iit but the .h file is there and the .m file isnt.... all I want to know is how to add a file of thee .m nature?

Similar Messages

  • Help With Creating 'Hi-Res' PDF Document?

    Hi
    I am needing to meet a deadline tomorrow in supplying a magazine publication with a trade advert for my business.
    The magazine editor tells me he requires my advert to be emailed to him in 'HI-RES PDF FORMAT, 300 DPI'.
    Currently, my advert is a simple MICROSOFT WORD document, which is printed out for flyers etc. It is acceptable quality for my needs. I have very little knowledge at this point of making my advert into 'HI-RES PDF'.
    However, I do have access to ADOBE ACROBAT V9.0 PRO EXTENDED, and understand I can use this to create the document that is required?
    My main questions at this point are, where do I begin researching how to turn my current WORD document into the '300 DPI HI-RES' picture that is required? What is the process involved? How do I go about 'creating a hi-res picture' from my humble Word document?
    What I don't understand at the moment is, the difference between me emailing the magazine my Word document in its current .doc form, and needing to involve Adobe Acrobat to achieve 'best quality' HI-RES/300 DPI. Do I need to make my Word document into PDF to improve its quality?
    Totally new to this, would greatly appreciate any help/advice.

    I wish I had more time to spend getting up to speed on these issues, unfortunately the deadline looms tomorrow [new business, urgent last minute advertising and all that]. I expect to have a genuine hi-res advert ready for next month's issue - in the meanime, Aandi, how would you recommend I best go about things from what I have, or can modify/recreate fairly quickly?
    Guidlines given by magazine publication: 'Hi-Res PDF Document, 300DPI, 12cm W x 9cm H
    OK, my advert in Word is mostly black text on a white background, and there is a colour picture in it [to help illustrate my services]. So the picture is not 300dpi hi-res, I accept that, and I accept it will not be printed in the magazine necessarily any better than I can manage from my inkjet printer.
    But considering the magazine is a glossy, hi-res publication, surely the picture will not be printed in any WORSE quality than I can get out of my cheap £80 printer? If I know what to expect, I know how I can play around with the current lo-res images I have at my disposal.
    There are a number of options I currently have to replace the picture in my advert, and some have a deliberately 'hazy' look to them already - I am thinking perhaps pictures with this kind of styling which are far from 300 DPI anyway would be a better choice? At least in the printing reproduction, the degrasion would not look like a cheap 'error' but rather simply the style of the picture?
    And what about my Word TEXT? Forgetting pictures for the moment, will the all important text parts of my advert reproduce as good as I can get them in 'best' quality from my printer?
    What I am aiming for this evening, is once I have decided upon the kind of lo-res picture [if any] I am including in my advert, allowing for degrasion because it is not 300 DPI, can I then concentrate on the TEXT information and still work on this within MICROSOFT WORD before submitting it to Adobe Acrobat and producing the PDF document? I do not have to do anything special to the text at any point to make it 'high resolution'?
    Thank you again for your help so far.

  • Help needed with creating HTML email in Dreamweaver

    Hi everyone, would really appreciate some help with a dilemma or two that I have.
    I have created the following newsletter in Dreamweaver and uploaded it to our website:
    http://www.nova-design.co.uk/sales/000030.html
    Now, when I go into my email mass mailing client (Handymailer) and send a test out, I encounter a couple of problems.
    Firstly, in Outlook when I receive the email, the grey table on the right of the eshot, is crushed and a lot of the single line text is forced to go over two lines...
    Secondly, in Hotmail, the table displays fine, but it does say that "This message is too wide to fit your screen.  Show full message."
    Once I click "Show full message" it displays in full, but I then need to scroll across to the middle of the browser to view the email.
    If I left align the newsletter will this problem be solved?  Or is there a way in Dreamweaver that I can edit the entire page size so that it's not too wide?
    The table is 600px wide so I assumed that any email sent out would shrink to this size.
    Any help would be greatly appreciated!  This is the first full HTML email I have sent out so it's going to be far from perfect!

    mozza34 wrote:
    I need to look into using inline css styles, I have no idea how to so need to read up on those.
    I created a transparent GIF and placed it, but that moves my text down because the image is in the way?  Am I doing that right?
    Make the transparent gif 1px high.
    Is it the links in the right column that go onto two lines? If so that could be because the links are wider than the actual column itself..so you will have to make column wider.
    If you can't sort it, have  a look at the code below, copy and paste into a new Dreamweaver document and test out. Inline css styling is used in the code below. I've masked your email so no spam bots get hold of it.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    </head>
    <body style="background-color: #CCC;">
    <table width="600" border="0" cellspacing="0" cellpadding="0" style="margin: 0 auto;">
    <tr>
    <td width="412" style="font-family: arial, helvetica, sans-serif; font-size: 12px; padding: 10px 10px; background-color: #fff; vertical-align: top;">
    <table width="392" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td style="text-align: center;"><img src="http://www.nova-design.co.uk/images/novalogo.jpg" alt="Nova Design" width="208" height="155" align="top" /></td>
    </tr>
    </table>
    <p style="font-size: 16px; font-weight: bold;">September 2011 Update</p>
    <p>Welcome to our September 2011 Newsletter!  Keeping you up to date with all things Nova Design.</p>
    <p><strong>New Addition</strong></p>
    <p>We would like to welcome to our team Kieran Duggal.  Kieran joins us from Schneider Electric and will be placed into a newly created recruitment role within the company.</p>
    <p>With the contracting side of our business growing, Kieran will be looking after all things recruitment.</p>
    <p>If you are currently looking for work in the field of engineering design, or if you are looking to take on contract or permanent design engineers, feel free to contact Kieran for a chat about current possibilities.</p>
    <p> Kieran Duggal - Recruitment Executive<br />
          <a href="mailto:[email protected]" style="color: #000;">
          [email protected]</a><br />
        01384 405 977</p>
        <p><strong>Social Media</strong></p>
        <p>Further expanding our Social Media horizons, we have decided to create a group on LinkedIn.  Here we will be listing current vacancies and allowing people from the engineering world to take part in various discussions.  Please make sure to join our group, as we will be looking to develop it over the coming months.</p>
        <p><strong>Revamped Design Team</strong></p>
        <p>We have recently taken on several enthusiastic, highly skilled graduates.  We feel our current team of design engineers is stronger than ever, with a healthy mix of vast experience and youth.  We are constantly searching for the best engineering talent in order to consistently provide our clients with high quality levels of work.</p>
        <p><strong>Summary</strong></p>
        <p>2011 has been a busy, exciting year so far and long may it continue.  Our clients are what make us, and we would like to thank those of you who have placed business with us in the past.</p></td>
    <td width="158" style="font-family: arial, helvetica, sans-serif; font-size: 12px; padding: 0 10px; background-color: #333; vertical-align: top;"><img src="../images/novalogo.jpg" alt="Nova Design" width="168" height="1" align="top" />
    <p style="color: #fff;">
    <strong>Nova Design Ltd</strong><br />
    Watt House<br />
    Innovation Centre<br />
    Pensnett Trading Estate<br />
    Kingswinford<br />
    West Midlands<br />
    DY6 7YD</p>
    <p style="color: #fff;">T: +44 (0)1384 400 044<br />
    F: +44 (0)1384 400 090</p>
    <p style="color: #fff;">W: <a href="http://www.nova-design.co.uk" style="color: #fff;" target="_blank">www.nova-design.co.uk</a><br />
    E: <a href="mailto:[email protected]" style="color: #fff;">[email protected]</a></p>
    <table width="168" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td style="vertical-align: middle; padding: 7px 0; font-size: 12px;"><a href="http://www.facebook.com/novadesignuk" target="_blank"><img src="http://www.nova-design.co.uk/images/facebook.gif" alt="Facebook" width="25" height="25" align="absmiddle" style="border: none;" /></a> <a href="http://www.facebook.com/novadesignuk" style="color:#fff;" target="_blank">Facebook</a></td>
    </tr>
    <tr>
    <td style="vertical-align: middle; padding: 7px 0; font-size: 12px;"><a href="http://twitter.com/novadesignuk" target="_blank"><img src="http://www.nova-design.co.uk/images/twitter.gif" alt="Twitter" width="25" height="25" align="absmiddle" style="border: none;"/></a> <a href="http://twitter.com/novadesignuk" style="color:#fff;" target="_blank">Twitter</a></td>
    </tr>
    <tr>
    <td style="vertical-align: middle; padding: 7px 0; font-size: 12px;"><a href="http://www.linkedin.com/groups?about=&gid=4002529&trk=anet_ug_grppro" target="_blank"><img src="http://www.nova-design.co.uk/images/linkedin.gif" alt="LinkedIn" width="25" height="25" align="absmiddle" style="border: none;"/></a> <a href="http://www.linkedin.com/groups?about=&gid=4002529&trk=anet_ug_grppro" style="color:#fff;" target="_blank">LinkedIn</a></td>
    </tr>
    <tr>
    <td style="vertical-align: middle; padding: 7px 0; font-size: 12px;"><a href="http://www.nova-design.co.uk/blog/?feed=rss2" target="_blank"><img src="http://www.nova-design.co.uk/images/rss.gif" alt="RSS" width="25" height="25" align="absmiddle" style="border: none;" /></a> <a href="http://www.nova-design.co.uk/blog/?feed=rss2" style="color:#fff;" target="_blank">RSS Feeds</a></td>
    </tr>
    </table></td>
    </tr>
    </table>
    </body>
    </html>

  • Help needed with creating a script

    This is what I try to achieve:
    Creating sequentially numbered files (any files) by dragging the original to a folder.
    It should work like this:
    drag a file ( i.e. myphoto.jpg) to a folder and the script attached to that folder would duplicate the file and number it (myphoto001.jpg)
    I can't get it to work... does anyone know of a ready-made script or is willing to advise on how-to?
    Thanks for feedback.

    Hello
    Here's some script you may try.
    (Copy code from this web page, not from subscribed email text, for I escaped some characters for posting.)
    Broadly speaking, it will do what you wish. But not exactly as you described.
    A few things to note.
    • It will rename file 'image1.jpg' to 'image1.001.jpg', e.g., (note period between 'image1' and '001') in order to make script simple.
    (If the file name is 'image1' without extension, it will be renamed to, e.g., 'image1.001._' by adding dummy extension '_' in order to make script simple and consistent)
    • It will move the file that is drag-n-dropped to the Folder Actioned folder A to an inner sub-folder B and rename the file in B. This is because renaming file in A will trigger the Folder Action, which detects renamed file as newly added file (under OSX), that is problematic.
    • If the following script is used as Folder Action, you'll have to drag-n-drop the file with option key down to copy it to the Folder Actioned folder. Without option key held down, the original file will be moved to the folder.
    (If the source and destination volumes are different, drag-n-drop will copy the file and there will be no need to use option key. E.g. If Folder Actioned folder resides in an external volume and original files are in an internal volume, simple drag-n-drop will copy the files.)
    Please see comments in script for more details.
    Hope this may help.
    H
    --SCRIPT
      Assumptions and behaviours:
        1) The destination folder B where renamed items are stored is in a root folder A.
          • A is determined as the folder where this Folder Action is attached or this droplet resides; and
          • B's name is given as property destinationFolderName in main().
        2) Target file F is moved to B and renamed such that -
          if original name of F is "P.R" (P = name stem, R = extension) and
          the max seq. number in name of the file(s) in B which has the same name stem and extension as F is M,
          F is renamed as "P.Q.R", where Q = M + 1.
          • Number format is given as property numberFormat in main().
          e.g. File named "name1.jpg" will be renamed to "name1.003.jpg",
            if file named "name1.002.jpg" in destination has the max seq. number with the same name stem and extension.
      Usage:
        1) As Folder Action,
          • save this as compiled script and attached it to folder A; and
          • drag-n-drop target files into A and it will move them in folder B and rename them as intended.
          (Use option-drag-n-drop (i.e. copy, not move) to keep the original file or it will be moved and renamed.)
        2) As droplet,
          • save this as application (or application bundle) in folder A; and
          • drag-n-drop target files onto the droplet and it will duplicate them to folder B and rename them as intended.
          (Exception. If target files are in A, they will be moved, not copied, to folder B.)
    on adding folder items to da after receiving aa
    main(da, aa)
    end adding folder items to
    on open aa
    tell application "Finder" to set da to container of (path to me) as alias
    main(da, aa)
    end open
    on main(ra, aa)
      alias ra : root folder
      list aa : items to be processed
    script o
    property destinationFolderName : "Renamed items"
    property numberFormat : "000" -- seq. number will be 001, 002, etc (if n > 999, use n as is)
    property nlen : count numberFormat
    property nmax : (10 ^ nlen - 1) as integer
    property xx : {}
    property astid : a reference to AppleScript's text item delimiters
    property astid0 : astid's contents
    property NL : return
    property errs1 : NL & NL & "This item will be left as is in: " & NL & NL
    property errs2 : NL & NL & "This item will be left as: " & NL & NL
    property btt1 : {"OK"}
    on decomp(s)
      string s : name string to decompose
      return list : {name stem, sequential number string, name extension}
      e.g. Given s : result
        "name1.001.jpg" : {"name1", "001", "jpg"}
        "name1.jpg" : {"name1", {}, "jpg"} -- [*]
        "name1" : {"name1", {}, {}}
        "name1..jpg" : {"name1", "", "jpg"} -- [*]
        "name1.name2.001.jpg" : {"name1.name2", "001", "jpg"}
        "name1.name2.jpg" : {"name1.name2", {}, "jpg"}
      [*] Note different meanings of {} and "" in result list
    local n, p, q, r
    try
    if s = "" then return {{}, {}, {}}
    set astid's contents to {"."}
    set s to s's text items
    tell s to set {n, r} to {reverse's rest's reverse, item -1}
    if n = {} then set {n, r} to {s, {}}
    tell n to set {p, q} to {reverse's rest's reverse, item -1}
    if p = {} then set {p, q} to {n, {}}
    try
    q as number
    set p to "" & p
    on error
    set {p, q} to {"" & (p & q), {}}
    end try
    set astid's contents to astid0
    on error errs number errn
    set astid's contents to astid0
    error "decomp():" & errs number errn
    end try
    return {p, q, r}
    end decomp
    on nextname(n)
      string n : source name
      property xx : names in pool
      property numberFormat, nlen, nmax: number format string, its length, max value respectively
      return string : new name with next sequential number
      e.g.
        Provided that n = "name1.jpg" and the name that has max seq. number
         with the same stem and extension as n in destination folder is "name1.005.jpg",
         resurt = "name1.006.jpg"
    local p, q, r, a, b, c, b1
    set {p, q, r} to decomp(n)
    if r = {} then set r to "_" -- give dummy extension if none (to handle it correctly)
    set b1 to 0
    repeat with x in my xx
    set x to x's contents
    if x starts with p then
    set {a, b, c} to decomp(x)
    if {a, c} = {p, r} then
    set b to 0 + b
    if b > b1 then set b1 to b
    end if
    end if
    end repeat
    set b1 to b1 + 1
    if b1 > nmax then
    return p & "." & b1 & "." & r
    else
    return p & "." & (numberFormat & b1)'s text -nlen thru -1 & "." & r
    end if
    end nextname
    try
    set da to (ra as Unicode text) & destinationFolderName & ":" as alias
    on error -- da not present
    tell application "Finder" to ¬
    set da to (make new folder at ra with properties {name:destinationFolderName}) as alias
    end try
    --set my xx to list folder da without invisibles -- this is faster but 'list folder' is deprecated in AS2.0.
    tell application "Finder" to set my xx to name of items of da as vector -- [1]
      [1] Finder (at least under OS9) returns [] (empty linked list) when returning empty list.
      This will cause error -10006 in 'set end of my xx to ...' statement, for linked list does not support it.
      The explicit 'as vector' will handle this case.
    repeat with a in aa
    set a to a's contents
    --set n to (info for a)'s name -- this is faster but 'info for' is deprecated under OSX10.5
    tell application "Finder" to set n to a's name
    if n = destinationFolderName then -- ignore it
    else
    set {n1, _step} to {nextname(n), 0}
    tell application "Finder"
    set sa to a's container as alias
    -- move or duplicate
    try
    if sa = ra then
    (* when run as Folder Action (or as droplet with items in ra) *)
    set a1 to (move a to da) as alias
    else
    (* when run as droplet with items outside ra *)
    set a1 to (duplicate a to da) as alias
    end if
    set _step to 1
    on error errs number errn
    (* name conflict, etc *)
    display dialog errs & " " & errn & errs1 & sa buttons btt1 ¬
    default button 1 with icon 2 giving up after 15
    end try
    -- rename
    try
    if _step = 1 then set {a1's name, _step} to {n1, 2}
    on error errs number errn
    (* name conflict, invalid name, etc; not probable but possible *)
    display dialog errs & " " & errn & errs2 & a1 buttons btt1 ¬
    default button 1 with icon 2 giving up after 15
    end try
    end tell
    if _step = 2 then set end of my xx to n1
    end if
    end repeat
    end script
    tell o to run
    end main
    --END OF SCRIPT
    Message was edited by: Hiroto (fixed typo)

  • Help! with creating a J2ME program using the http connectivity interface

    So this is what I have to do using the http connectivity interface:
    1.Creating two threads – one for communication (receiving and sending) and the other (main) thread will be for interaction with the user.
    2.The main thread will make use of three midlet forms. The first form will ask for web page address (URL) and separately for a delimiter which will separate the words in the URL document, the third form will display the ratio of all symbols on the page and the number of occurrences of the delimiter specified
    3.The second thread should perform http connectivity to the WWW, utilise the web page address supplied and connect to the appropriate web page and read its content, count all symbols on the chosen page, count the number of occurrences of the delimiter given as user input on the same form as the web page address, calculate the ratio between the two and pass this information to the first thread to display.
    I have many questions but my main concerns are:
    *1. How to communicate using HTTP interface within a thread*
    *2. What is a delimiter in the context above and how should it be implemented*
    I've been thrown in at the deep end with little programming experience with this assignment. If anyone can share a similar example or answer my concerns I'd be more than happy.
    Thanks in advance.

    thelane wrote:
    hi thanks for the response.
    As I said I have coded in other languages before, but this is a new for me in java. I needed to get it working quickley. Now I can clean up.
    I will have a look at method and see how I get on.
    ANy similiar examples would be great.
    Thanks.I can certainly give you a similar example.
    Say you have code such as this:
      int a = 10, b = 11;
      int temp = 1;
      for(int i = 2; i < a; ++i) {
       temp *= i;
      System.out.println(a + " factorial is " + temp);
      temp = 1;
      for(int i = 2; i < b; ++i) {
       temp *= i;
      System.out.println(b + " factorial is " + temp);Each section of code takes the factorial of the current variable an outputs it. The factorial code can be placed within a method to be called more easily, as such:
    public void factorial(int num) {
    int temp = 1;
    for(int i = 2; i < num; ++i) {
      temp *= i
    System.out.println(num + " factorial is " + temp);
    }Then, whenever you need to call it, you can just do so:
    int a=10,b=11,c=12;
    factorial(a);
    factorial(b);
    factorial(c);

  • 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?

  • Help needed with creating a new site- having Spry folder issue

    I can not create a new DreamWeaver CS5 site - I get a warning message that the Spry assets folder is not inside the site & to select a valid folder in the local root directory. I've tried creating a folder to no avail, thus can not create the site. Help is appreciated.

    One option if you're a Mac: Is your hard drive named?
    http://forums.adobe.com/thread/654548
    Try also:
    http://forums.adobe.com/thread/672446

  • Please help start with creating venn diagram

    I was wondering if anyone can give me suggestions on what type of java functionalities, resources, etc. to look up for creating a venn diagram application. I want to be able to click on regions and have it highlight and unhighlight. I also want to be able to drag and move circles around the canvas or window. Previously, I had just drawn on a canvas set circles at set locations; then, I had to go through many calculations just to get the area of the two circle overlap. There has to be an easier way... especially when getting to 3 or more circles, calculations would be more complicated. Does anyone have any helpful suggestions? Thanks in advance for your help.

    Yes, the AWT-package contains much useful stuff regarding this topic!
    If you can manipulate these classes, you are almost there!
    RM

  • Help please with creating IF routines

    Hi,
    I am currently trying to create a grading system for my class at school. I have a few ideas of what I would like to create, and was wondering if anybody could help me a bit.
    What I am trying to do is enter test scores into one spread sheet, and then, if a child scores below 87, his name would automatically go into a chart on a second sheet, so that I could monitor the children I need to pay attention to. We test the children twice a year, and so if his score improves he would be taken off the second sheet of course but I would also like on another sheet a record of each child who has ever been on 'special measures'. Thanks in advance if anyone could help in any way.

    Hi - thanks for your interest. I did not consider this - My initial thought as far as the 'ever' children are concerened was that it would be handy to note that a child at one time had been under 'special measures'. Having said that - it would be even better I suppose if it was possible to note the date and score which caused him to be on that list. But thinking further -how would you handle a child that was continually on that special measures list? Hmmmm. You have given me more to consider!!!
    By the way - my memory isn't that bad - that I would forget this info - it is just that we intend to role this idea out school wide eventually - and that each year in school has their own sheet! So it would be handy for a teacher of a 11 year old could for example not that at one time he was under special measures.

  • Problem With Creating a Huge HTML document In Portal

    Hallo,
    I am trying to insert a 735 lines long HTML into Portal. When I press the finish button I get the following error message:
    The requested URL /pls/portal30/PORTAL30.wwv_builder.accept was not found on this server.
    If I then go back and take out one of the forms I have in the HTML file and press the finish button, Portal accepts this.
    I am sure the problem is related to the size and not code because I have tested the form alone in Portal and it works.
    Would anyone know of a way around this problem?

    when i write the tow statements the first one didn't run but the second one run
    SQL> select to_timestamp('02/04/08 11:00:00.00 AM', 'DD/MM/RR HH12:MI:SS.FF PM') from dual;
    select to_timestamp('02/04/08 11:00:00.00 AM', 'DD/MM/RR HH12:MI:SS.FF PM') from dual
    ERROR at line 1:
    ORA-01855: AM/A.M. or PM/P.M. required
    SQL> select to_timestamp('02/04/08 11:00:00.00', 'DD/MM/RR HH24:MI:SS.FF') from dual;
    TO_TIMESTAMP('02/04/0811:00:00.00','DD/MM/RRHH24:MI:SS.FF')
    02/04/08 11:00:00.000000000 Õ
    when i used the second one in the job this error appear
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'first_job',
    job_type => 'executable',
    job_action => 'C:\Documents and Settings\mohamed.sallam\Desktop\Calculator.lnk',
    start_date => 'to_timestamp('02/04/08 11:00:00.00', 'DD/MM/RR HH24:MI:SS.FF')',
    repeat_interval => 'FREQ=HOURLY;INTERVAL=12',
    end_date => 'to_timestamp('02/04/09 11:00:00.00', 'DD/MM/RR HH24:MI:SS.FF')',
    comments => '-------');
    END;
    0552: Bind variable "MI" not declared.

  • Help Me With Creating AutoRun CD Menu

    I'm rather new to flash, I know the basics, I can do all the
    graphics designs and buttons. I know how to make the menu autorun,
    if I had one. I just don't know how to make the buttons open an
    .exe or .pdf file when they're in the root directory with the menu.
    I'm trying to make the menu be a standalone .exe so that it can
    play on computers without flash. Can anyone please link me to a
    tutorial or explain how to make a menu open up exe and pdf files,
    etc, when everything is in the root directory?
    Thanks,
    Bill

    Read this
    http://www.flashjester.com/index.php?section=faq_search&search=autorun#206
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. - www.flashjester.com
    "This has been one of the most impressive and thoroughly
    pleasant
    experiences of customer support I have ever come across -
    astounding!"
    Director - hedgeapple

  • Help needed with creating this "Fur" brush in CS6

    Hi,
    In steps 4 and 5 here, the author is creating a new Fur brush. However I can't do this in CS 6 as almost all the options in the Shape Dynamics tab are disabled:
    Any ideas what am I doing wrong or how can this be done in CS 6?
    Thanks.

    Are you definitely using the sampled brush tip?

  • Can anyone help me to create a header in Dreamweaver CS5 (image included)

    Hi there:
    I have a project to do and i have to create this header:
    i even didn't know how to insert the vertical line (between the logo and the text) so i just cropped this image in fireworks and got the logo and the vertical line and just insert the image in dreamweaver, and when i tried to type the text: compass adventure tours it didnt go to where it is now, it went down and didn't know how to reposition it to its right position so hope that someone can help me with creating this header in dreamweaver.
    Thanks

    You could do this very nicely with CSS styled tables. 
    Copy and Paste the following code into a new, blank HTML document (in code view).
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Nested Table</title>
    <style type="text/css" media="all">
    /**GENERAL STYLES**/
    body {font: 1em/1 Geneva, Arial, Helvetica, sans-serif}
    #table1, #table2, #table3 {
    border:none;
    width:100%;
    text-align:center;
    font-weight:bold;
    /**BACKGROUNDS AND COLORS**/
    #table1{background:#333333; color: #FFFFFF;}
    #table2 {background:#333333; color: #FFFFFF;}
    #table3 {background:#0066CC; color: #99CC00;}
    /**CELL WIDTHS AND BORDERS**/
    #table1 .td1 {
    width: 16.6%;
    border-right: 1px solid silver}
    #table2 .td2 {
    width:50%;
    border-top: 1px solid silver;
    border-right:1px solid silver;}
    #table2 .td3 {
    width:50%;
    border-top: 1px solid silver;}
    #table3 td {
    width: 16.6%;
    border-right: 1px solid silver;}
    /**VERTICAL ALIGNMENT**/
    #table2 tr,
    #table3 tr {vertical-align: bottom;}
    /**LINKS**/
    a img {border:none}
    #table3 a {
    text-decoration:none;
    display:block;
    line-height: 1.5em;}
    #table3 a:link {color:#99CC00}
    #table3 a:visited {color:#CCCCCC}
    #table3 a:hover,
    #table3 a:active
    #table3 a:focus {background: maroon; color:#FFFFFF}
    </style>
    </head>
    <body>
    <table id="table1">
    <tr>
    <td class="td1">your logo goes here</td>
    <td>
    <!--begin nested table -->
    <table id="table2">
    <tr>
    <td colspan="2">
    <h1>COMPASS ADVENTURE TOURS</h1>
    </td>
    </tr>
    <tr>
    <td class="td2">
    <h2>HOME</h2>
    </td>
    <td class="td3">
    <h2>BANNER </h2>
    </td>
    </tr>
    </table>
    <!--end nested table -->
    </td>
    </tr>
    </table>
    <!--begin navigation table -->
    <table id="table3">
    <tr>
    <td><a href="#">HOME</a></td>
    <td><a href="#">DRIVING</a></td>
    <td><a href="#">CYCLING</a></td>
    <td><a href="#">DESTINATIONS</a></td>
    <td><a href="#">RESERVATIONS</a></td>
    <td><a href="#">CONTACT</a></td>
    </tr>
    </table>
    </body>
    </html>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Create GL/AR/AP documents

    Hi SAP Experts,
    I am a technical consultant. I need to test a GST report for that i need some data to create in Development server. Please help me to create GL/AR/AP documents for testing.
    Regards,
    kishore

    go to your finance functional consultant
    tell him your requirement and ask to provide those accounts
    creating this is a matter of 5 min

  • HELP NEEDED BADLY, creating Block Avoider game.

    Could anyone please help me with creating a game called block avoider, i have a link here to show what the game should look like. I need alot of help with it so if anyone is good a coding and see`s this as an easy project helping me would be greatly appreciated.
    LINK TO SIMILAR GAME:
    http://scratch.mit.edu/projects/timo4932/82326

    We can help, but we won't do it for you. Start the game, and post a question if you are stuck and need help.

Maybe you are looking for