5 Replies Latest reply on Jun 19, 2006 6:24 PM by kglad

    beyond myself

    _gary_ Level 1
      the following (at bottom), works great
      ideally I need the files which are currently jpgs, and will be swfs, to
      fade in from 0 alpha to 100 alpha, the movie runs at 30 fps and I would like
      the fade to be about 2/3 second (20 frames visually), I can do this with the swf, but i would like to do with action script (can that happen if using jpgs ?).
      I have no idea how to do that in Action Script.

      Secondly, this is not showing up in my preloading, is that because it comes from seperate directory?
      How to do that?

      Thirdly, I would love to have an intervval timer so this will replay after about 30 seconds.

      Lastly, is this type of thing possible with the image in the library and the linkage set to export for actionScript?

      All this is way beyond my AS limits

      anyOne willing to help me?

      thanks for looking

      filename = ["1.jpg", "2.jpg", "3.jpg","4.jpg","5.jpg"];
      path = "";
      i = filename.length;
      k = Math.ceil(Math.random()*i);
      //k = Math.floor(Math.random()*i);
      loadMovie(path+filename[k], movieTarget);

        • 1. Re: beyond myself
          kglad Adobe Community Professional & MVP
          1. initiate a loop that increments your movieTarget's _alpha in the required time span AFTER loading is complete.
          2. the directory is irrelevent (as long as it's correct). you have shown no preloader code to critique.
          3. put your code in a function and use setInterval() to call the function every 30 seconds AFTER loading is complete
          4. it makes no sense to use a preloader on library items because they are already loaded onto the user's computer when your swf starts. you can certainly fade-in an attached movieclip, though.
          • 2. Re: beyond myself
            _gary_ Level 1
            thanks for the reply,

            I am uncertain, and confused on how to specify the directory if the items are from the library, as opposed to the way they are set up now.

            I Can(yes) understand to import the swfs to the library and then set linkage to export for AS(? first frame or Not ?)
            filename = ["1.jpg", "2.jpg", "3.jpg","4.jpg","5.jpg"];
            path = "";

            i suppose I could leave the filename as is, but how to specify path/dir as library items?? I don't know..


            • 3. Re: beyond myself
              kglad Adobe Community Professional & MVP
              you can't import anything into the library using actionscript and you can't set a linkage id using actioncript. you can import and set a linkage id in the authoring environment.

              you can't use loadMovie() to instantiate a movieclip that's in your library. you would use attachMovie() and you would use the linkage id to specify the movieclip that's to be attached. there is no path to your library.
              • 4. Re: beyond myself
                _gary_ Level 1
                • 5. Re: beyond myself
                  kglad Adobe Community Professional & MVP
                  you're welcome.