5 Replies Latest reply on Jul 22, 2008 12:42 AM by alex485947

    movie for full screen

    alex485947
      Hi!

      How can I make, that in mvovie (site) one clip snap to the top left corner, another clip - to the top right, another to the down right, another to the down right and another to the left center?
        • 1. Re: movie for full screen
          evrardBlom
          1- Create the clips with registration point at (0,0) i.e the small black rectangle should be @ top left when defining symbol.

          2- Name each clip instances logically. Like clip1, clip2,....clipX.

          3- If the clips have consistent length and height (l and h), and if C is how many clips to place per column, then:

          4- (j:number = o, use while loop to cycle j){

          (for i:number = o, i < numOfClips, i++) {

          if (i < C+1) {

          clipi.x = j*l;
          clipi.y = i*h;

          }else {

          j++;

          }

          }

          }

          NOTE: notice i suppose here that you place your clips in two dimensions. If you simply place them in one dimension (either verticaly or horinzontaly) then no need to run double loop. In this case forget the J and simply run the for loop with clipi.x always = 0, only clipi.y updating as i increases.
          • 2. Re: movie for full screen
            evrardBlom Level 1
            Oops forget my previous post (except for design prerequisites). In fact what you want is simpler, just three clips positionning:

            clip1.x = clip1.y = 0; (top left corner)

            clip2.x = stage.width - l ; (stage width minus clip width)
            clip2.y = stage.length - h; (stage height - clip heigth )

            clip3.x = 1/2 (stage.width - l);
            clip3.x = 1/2 (stage.length - h); That would place the third exactly in middle of stage.

            Now i dunno how they call stage in AS 3.0 LOL.

            • 3. movie for full screen
              alex485947 Level 1
              Sorry, but I dont know the AS properly. Could you please write the full code for positioning (top left, top right, down left, down right and center) this five clips at he stage?

              I have done, what you told me but it didnt work.
              see the file: http://alex-pro.net/fullscreen.fla

              Thank you
              • 4. Re: movie for full screen
                evrardBlom Level 1
                Ok, lemme make sure i understand what you want properly:

                You want to position 5 clips: one top-left, the second top-right, the third in the middle, next on bottom left, and the last one bottom right. They must stay positionned there when the movie is viewed full screen. Right? If it is then here is the code i can offer:

                It will be in AS 2.0 so if you code in AS 3.0 you will have to adapt since i dont know 3.0 yet.

                - first create the clips with instance names clip1....clip5 (or however you wish, but i'll use this naming for demonstration purpose). Set registration point top-left on each.

                - No need to use loop for this, we will simply position them manually one after another:

                clip1._x = 0;
                clip1._y = 0;


                clip2._x = stage.witdh - clip1.width;
                clip2._y = 0;

                clip3._x = 1/2 (stage.witdh - clip3.width);
                clip3._y = 1/2 (stage.heigth - clip3.heigth);

                clip4._x = 0;
                clip4._y = stage.height - clip4.height;

                clip5._x = stage.witdh - clip1.width;
                clip5._y = stage.heigth - clip5.heigth;

                Notice that i consider your middle clip is a square, any other geometrical figure would require another factor then 1/2.
                • 5. Re: movie for full screen
                  alex485947 Level 1
                  Thank you!