4 Replies Latest reply on Jan 16, 2008 6:28 AM by lou_bra

    URGENT variables in mcs

    lou_bra Level 1
      Hello everybody.. we are having trouble here to get centered the jpegs ( variables from database) we ask to load inside a mc.... we are using the action below.

      Our mc is called "imagenesm" and is has registration point "centered".. it seems it does not make any difference... we have jpgs in different sizes, but all of them have as maximum 360 px. good sized but we need each one of them to load at center, and it is as defaut loading at left of the mc..

      Please, any help is welcome.... thanks a lot!!!
        • 1. Re: URGENT variables in mcs
          Greg Dove Level 4
          you're probably better off using MovieClipLoader and the onLoadInit event handler. That's the way I would do it.

          But perhaps you can also do it easily by loading into a child clip of imagenesm if all your images are the same size. Try doing that and just using imagenesm as the positioning clip.

          e.g.
          your the child clip is called container then have _root.imagenesm.container.loadMovie(".... etc

          _root.imagenesm._x=350;
          _root.imagenesm._y=180;




          • 2. Re: URGENT variables in mcs
            lou_bra Level 1
            problem is our images has not the same size. just at maximun width 360 px and all have the same height (fixed in) 350px...

            problem is centering the images considering they have different widths...

            this thing you said using MovieClipLoader and the onLoadInit event handler... how would be the action using it? (sorry if seems too much asking for that)

            i'm a designer helping programmer who does not speak english (and we are working together at this project), and i dont know how to explain how would it to be changed.. and if using it (the other event handler), would we have the chance so especify positioning? how would it look like?

            and thank you a lot
            • 3. Re: URGENT variables in mcs
              kamckng Level 1
              it's ok if your images arent the same size, dont hard code the values, load the movies into an empty movie clip inside the movie clip you want... so if you have movieClip A, then load the images into movieClip B inside of A... then center B, using

              A.B._x = -A.B._width/2;

              and

              A.B._y = -A.B._height/2;

              and i would use the MovieClipLoader class also. It has good documentation. The onLoadInit is an event called from the movieClipLoader when it has been loaded and the first frame of actions has been done
              • 4. Re: URGENT variables in mcs
                lou_bra Level 1
                thanks a lot:)

                i'll get it in the programmer's hands and see if he can deal with that.. but it seams logic at first sight..

                tell you latter and thanks once more..