2 Replies Latest reply on Apr 23, 2006 3:54 PM by DavidMLevine

    question

    Level 7
      hi,

      why i have undefined in my trace when i do that ?

      loadMovie(photo.attributes.fichier, ecran);
      trace(ecran._with);
      ecran._x = (470 - ecran._with)/2;

      I would like center my picture ecran when i do a loadMovie

      thank you for your help


        • 1. Re: question
          Level 7
          "Dave" <frsingles@ifrance.com> wrote in message news:e2gauu$f7h$1@forums.macromedia.com...
          > hi,
          >
          > why i have undefined in my trace when i do that ?
          >
          > loadMovie(photo.attributes.fichier, ecran);
          > trace(ecran._with);
          > ecran._x = (470 - ecran._with)/2;

          The loading process is far too slow to get the loading picture's width by the next code line. You have to wait until at least the
          image's header comes in before looking for width and height information. The most reliable way is to use a preloader that checks
          the bytes loaded.
          tralfaz


          • 2. Re: question
            DavidMLevine Level 1
            dont you need to use _width? It appears to be quite a typo too