dcsimg
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Resizing a game?

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Resizing a game?

    Hi!
    Can anyone help... I am editing an already existing game from flashkit for an assignment..as we are allowed to do this. Anyway, in the game, using the arrow keys the user moves the character around with a rectangle and collects items, whilst avoiding the killer items. The original dimensions were tiny so i re-sized the game. My teacher was able to work out how to change the boundaries for the character, so it can only move within the rectangle. However, we are unsure how to do this for the 2 other items.
    Does anyone know how to do this? If so can i email you the file as It is 100kb too big to upload! Sooooooo annoying! It will become clearer what i am asking once you see the game.
    Please...im am desperate for help.
    Ta.
    Melissa

  2. #2
    Odisey Odisey's Avatar
    Join Date
    Apr 2004
    Location
    WV
    Posts
    213
    Melissa,

    If you cannot upload game--try pointing to it if it is already on this server. Then make comments as to what you are interested in learning how to do.


    ODC
    Much to learn.... Much to learn....

  3. #3
    Junior Member
    Join Date
    Oct 2005
    Posts
    16
    Thanks Odisey
    The game is here:

    http://www.flashkit.com/movies/Games...9628/index.php

    when u resize the movie... u will notice the characters still stay in the same area. I can get the character the user controls to move within the new area but not the others.. any ideas?

  4. #4
    Odisey Odisey's Avatar
    Join Date
    Apr 2004
    Location
    WV
    Posts
    213
    Melissa,

    It looks pretty simply here. I only looked at the code though I did not edit it. On frames 2 and 3 they have x and y variables. You know this is how wide something is and how tall something is on stage, or the limits of what happens on the stage. The smaller the numbers, the more confined the stage area. So, look at each of the first four frames and the action script attached to each. IN the action script you will find X and Y variables. I would first edit one and test your movie for any noticable differences. Once you find the correct numbers to edit, reset the x and y variable to fit your movie size. This should take little time of edit and test to get it right.

    Hint: If you edit the number 130 on frame 2 also edit it to the same on frame 3.

    Notice y variables and notice ymax.


    I am a teacher. So since this is a school project, I think you can figure it out with that -- don't want to actually do it for you.

    ODC
    Much to learn.... Much to learn....

  5. #5
    Junior Member
    Join Date
    Oct 2005
    Posts
    16
    Thanks heaps for ur willingness to help!

    in frame 2 i put the values as:
    xmin=70;
    xmax=420;
    ymin=60;
    ymax=360;

    however i am unsure what to put for this bit in frame 2:it._visible = false;
    for (n=1; n<50; n++) {
    I[n]._x = random(400)+50;
    I[n]._y = random(400)+20;

    and frame 3:


    if (dot == 0) {
    goal._x = random(400)+50;
    goal._y = random(400)+15;
    dot = 1;
    I[max]._visible = true;
    while (Math.abs(I[max]._x-me._x)<30 || Math.abs(I[max]._y-me._y)<30) {

    I[max]._x = random(48)+50;
    I[max]._y = random(80)+20;
    }
    Last edited by NotASillyGirl; 10-21-2005 at 08:58 AM.

  6. #6
    Junior Member
    Join Date
    Oct 2005
    Posts
    16
    also... some of the 'killer' characters are getting stuck on the edges and just sort of bobbing and cant move.. any ideas?

  7. #7
    Odisey Odisey's Avatar
    Join Date
    Apr 2004
    Location
    WV
    Posts
    213
    I fixed this -- it is easy.
    Much to learn.... Much to learn....

  8. #8
    Junior Member
    Join Date
    Oct 2005
    Posts
    16
    serious?
    i got no idea

  9. #9
    Odisey Odisey's Avatar
    Join Date
    Apr 2004
    Location
    WV
    Posts
    213

    Fixed

    I fixed it in HTML, Flash movies stretch without loosing quality.

    Put the html file and the flash file into 'one' new folder. Open the folder and open the html file.

    Good luck with your project.
    Much to learn.... Much to learn....

  10. #10
    Odisey Odisey's Avatar
    Join Date
    Apr 2004
    Location
    WV
    Posts
    213
    Here
    Attached Files Attached Files
    Much to learn.... Much to learn....

  11. #11
    Member
    Join Date
    Oct 2005
    Location
    CA
    Posts
    49
    does any one know how to save a video on ur comp if so please tell me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center