3 Replies Latest reply on Mar 21, 2007 6:37 PM by Newsgroup_User

    JSFL Question

    eric76

      Btw, I'm not sure this is the right forum for JSFL questions, but I do not know any forum here that would be closer.

      I wish to make a jsfl script that exports all bitmaps in the library to AS. But for some reason it doesnt work for Bitmaps (but it does for MC symbols). On a german forum I read:

      das liegt daran das die linkageExport settings für bitmaps nicht greifen.... du müsstest zuvor deine bitmaps in movieclips packen und diese exportieren... da kannst dann auch die ganze linkageExportForAS, linkageExportInFirstFrame und linkageIdentifier props setzen.

      I'm not expert at german, but it sounds to me that he's saying that it just isn't possible to export Bitmaps, that u have to trick it via a movieclip. Anyone know anything about this issue? I also got the impression from that forum, that jsfl is buggy in general. One bad thing I discovered is that jsfl scripts can just stop executing (maybe because of a nullpointer exception or something) without giving any error message - which makes it hard to debug. Anyone who can shed light on the subject?
        • 1. Re: JSFL Question
          Level 7
          eric76,

          > I wish to make a jsfl script that exports all bitmaps in the
          > library to AS. But for some reason it doesnt work for
          > Bitmaps (but it does for MC symbols).

          I just ran a quick test, and I can confirm that ... annoyingly, yes, it
          seems to fail for bitmaps. (That's a bummer!)

          > On a german forum I read:
          > das liegt daran das die linkageExport settings f?r bitmaps
          > nicht greifen....

          Seems to be the case.

          > I'm not expert at german, but it sounds to me that he's
          > saying that it just isn't possible to export Bitmaps, that
          > u have to trick it via a movieclip. Anyone know anything
          > about this issue?

          While I can "hold my own" with JSFL -- I do use it quite a bit -- I
          wouldn't say I'm an expert. If this issue really is what it seems to be,
          I'm afraid I don't have a guru hack handy. That said, it certainly would
          (should) be possible to use JSFL to create the movie clips necessary to get
          these images to export. It would just take a bit more effort, but you could
          even name the clips a similar name to the images, then put them all into a
          Library folder to neaten things up.

          > I also got the impression from that forum, that jsfl is buggy
          > in general.

          I wouldn't say "in general," really. Not any more so (in my experience)
          than any other language. Possibly a *bit* more, because it's used by so few
          people, but I'll put it this way: JSFL has saved by butt a lot more often
          than it has given me a headache.

          > One bad thing I discovered is that jsfl scripts can just stop
          > executing (maybe because of a nullpointer exception or
          > something) without giving any error message - which makes
          > it hard to debug.

          I get errors when scripts time out or fail. It happens in a model alert
          box. You don't get those?


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: JSFL Question
            eric76 Level 1
            Thanks David for the reply,

            I found this post as well which confirms the problem.

            I would be very nice if someone knew and could tell a way around this. You indicated that it would be possible. Are you also suggesting to wrap all bitmaps in MCs?

            Actually I really don't get any error msg. Can this be because I run jsfl scripts from a local folder with Command/Run... instead of placing them in the $localdata/commands folder?
            • 3. Re: JSFL Question
              Level 7
              eric76,

              > I found http://www.feed-squirrel.com/index.cfm?evt=viewItem&ID=18898
              > as well which confirms the problem.

              Yeah, that confirms it to me, too. Good one to know.

              > I would be very nice if someone knew and could tell a way
              > around this. You indicated that it would be possible. Are
              > you also suggesting to wrap all bitmaps in MCs?

              Yeah, that's it. That's what I would do. I would loop through the
              Library looking for bitmap objects, then for each one, create a new movie
              clip and name it after the image, enter its timeline, put that image into
              the movie clip, then give that clip the linkage. At least, that would be my
              attempt. I haven't tried this, personally, but glancing through the JSFL
              API earlier, it looked like that should be possble.

              > Actually I really don't get any error msg. Can this be
              > because I run jsfl scripts from a local folder with
              > Command/Run... instead of placing them in the $localdata/
              > commands folder?

              When I write JSFL, I put it in the folder that belong with that
              particular project, which is different every time. I really can't imagine
              why you wouldn't see error messages.


              David Stiller
              Adobe Community Expert
              Dev blog, http://www.quip.net/blog/
              "Luck is the residue of good design."