5 Replies Latest reply on Jul 3, 2015 12:26 PM by kglad

    Mixing up 3 jsfl codes

    ricar2

      Hi guys, I'm no coder but I get by and I'd like some help to mix up some of the main codes I use frequently.

      What I'd like to happen is, with all the files open in flash, first it turns on all the allowsmooth in the images, than put the playhead at the last frame so it can publish the swf and the jpg for the files and publish it.

       

      Here's my set allow smooth to all images:

      var i = 0;

      var libItems = [].concat(flash.getDocumentDOM().library.items);

      while(libItems.length)

      {

        item = libItems.pop();

         if(item.itemType === "bitmap")

        item.allowSmoothing = true;

         i++;

      }

       

       

      The set the playhead to the last frame

      var countNum = fl.getDocumentDOM().getTimeline().frameCount-1;

      fl.getDocumentDOM().getTimeline().setSelectedFrames(countNum, countNum);

       

      And the publish all open files.

      var docs = fl.documents;

      while(docs.length)

        docs.pop().publish();

       

      I'd like it to run on all files that are currently open, can anyone help?

      Tks