11 Replies Latest reply on May 1, 2011 11:57 AM by liftedfinger

    Can't print member in Mac projector made with MX 2004 Win

    Professor S. Level 1

      I have been using a homemade educational app for years made in D8 for Windows, but need to make it available for the Mac now.  I also own 8.5 and MX 2004, but never needed any of the features until now. MX 2004 can create a Mac projector, but I have been having one problem after another with this conversion. I had been using POM lite in D8 WIndows, but it will not work in the MX 2004 Mac projector. After spending hours looking for the free POM lite for Mac, it seems that it now costs $150? For such a basic feature that should be native in Director, I need a solution to print members that does not require an extra. Can some please help me?

       

      There is apparently a way to do it using a Flash object  http://dasdeck.de/staff/valentin/lingo/flash_print/, but after spending several days trying to port the applicable code to my app, I could not get it to work. I do not work in Flash although I have tried, so it was a miracle that I got the flash_print as far as I did. If anyone has a working example using just the print member portion or could tell me why I was able to get it to work in author mode but was getting a Director Player Error in the test projector on Windows:

       

      Director Player Error

       

      Handler not found in object

      #getNextHighestDepth

       

      Script Error. Continue?

       

      I would greatly appreciate it.

       

       

      Actually, I am about to cry so at this point so any working solution other than printFrom (because some of my text members are more than one page and are in scroll bars) or paying for an xtra would be greatly appreciated - thank you!

        • 1. Re: Can't print member in Mac projector made with MX 2004 Win
          Chunick Level 3
          There is apparently a way to do it using a Flash object  http://dasdeck.de/staff/valentin/lingo/flash_print/, but after spending several days trying to port the applicable code to my app, I could not get it to work. I do not work in Flash although I have tried, so it was a miracle that I got the flash_print as far as I did. If anyone has a working example using just the print member portion or could tell me why I was able to get it to work in author mode but was getting a Director Player Error in the test projector on Windows:

           

          Director Player Error

           

          Handler not found in object

          #getNextHighestDepth

           

          Script Error. Continue?

           

          I would greatly appreciate it.

          Did you include the Flash Asset Xtra in the Modify --> Movie --> Xtras... menu in Director before publishing?

           

          getNextHighestDepth() is a method of a flash movieclip.

          • 2. Re: Can't print member in Mac projector made with MX 2004 WinI w3
            Professor S. Level 1

            I was thinking the same thing.  Something must be missing if it works in authoring, but not in the projector. I didn't think to add the Flash Asset xtra because I thought it would automatically included (since it's not a 3rd party xtra). I checked the Modify Movie Xtras and found that the Flash Asset was included but the Flash Asset Options and the Flash Agent xtras were not. I added them, created a new projector, and still get the same error - .

             

            I did notice though when I Modify Movie Xtras that the Include in projector box is blocked out and I can't check it.  Could the ones I added not be included.  Something is obviously missing if I get an error saying Handler not found in object.  So where is the handler?  Still need help.

            • 3. Re: Can't print member in Mac projector made with MX 2004 WinI w3
              Sean_Wilson Adobe Community Professional

              The Options and Agent xtras are authoring only - you shouldn't include them in/with your projector.

               

              It's the Flash Asset xtra that you need, and it sounds like it still isn't available, or is the wrong version. You are authoring with DMX2004, right? Do you have the 10.1.1 update in place?

              • 4. Re: Can't print member in Mac projector made with MX 2004 Win
                Professor S. Level 1

                OK, I removed the Flash Agent and Flash Options and the include in projector box is now showing checked.  Yes, I am authoring this in Dir MX 2004.  I am using the Flash Asset xtra that came in Schmidt's demo.  It is newer and the size is different from what I had installed. The Flash Asset in my Dir 2004 installation which is version 10.1 (I seem to have the 10.1 update, but not 10.1.1) is dated 9/9/04 and is 804 KB. The one in the flash_print demo is dated 2/7/06 and is 1560 KB.  When I run one of the .dir files from my app with the 9/9/04 Flash Asset I get an error when I click Print. I can't remember the exact error message, but it sounded like something was missed.  So, I thought maybe I needed the newer Flash Asset.  After, replacing the original Flash Asset with the newer one the error went away and the Print dialog box pops up.  When I create the projector - you both are right something is not there.  Could it be the .1 update that's needed?  Is the Flash Asset in Schmidt's demo Xtras folder not the right one for MX 2004? Could something else be missing?

                 

                Btw, here is the code for my print button:

                 

                -- CREATE INSTANCE     -- I created a parent script with the name PRINT_CLASS .  I also inserted a Flash object named swf on the stage.
                  printDoc = script("PRINT_CLASS").new(sprite("swf"))   
                 
                  -- ACTIVATE AUTO-PAGEBREAK
                  printDoc.mSetAutoPageBreak(true) 
                 
                  -- PAGE 1
                  printDoc.mAddPage() 
                 
                -- ADD LONG TEXT THAT CAUSES AUTOMATIC PAGE-BREAKS
                  tLongText = ""
                  repeat with i = 1 to 1
                    put member("ARListPrint").text after tLongText
                  end repeat
                  tFormat = ["leftMargin": 10]
                  tSettings = ["wordWrap":1, "autoSize":"left"]
                  y = printDoc.mAddText(tLongText, 28, 28, 500, 0, tSettings, tFormat) 
                 
                  -- DEACTIVATE AUTO-PAGEBREAK (for now not compatible with HTML mode!)
                  printDoc.mSetAutoPageBreak(false) 
                 
                  -- ADD HTML TEXT
                  tHtml = member("html").text
                  tFormat = ["leftMargin": 10]
                  tSettings = ["html": 1, "wordWrap":1, "autoSize":"left"]
                  printDoc.mAddText(tHtml, 28, y, 500, 500, tSettings, tFormat) 
                 
                -- PREVIEW -> save all pages as bitmaps in castLib "preview"
                  --  repeat with i = 1 to printDoc.pPageCnt
                  --    img = printDoc.mGetPreview(i, true)
                  --    m = new(#bitmap, member(i, "preview"))
                  --    m.name="Page" && i
                  --    m.image = img
                  --  end repeat 

                 
                  -- PRINT!
                  printDoc.mPrint() 
                 
                  -- CLEAN UP
                  printDoc.mDestroy()
                  printDoc = 0

                • 5. Re: Can't print member in Mac projector made with MX 2004 Win
                  Sean_Wilson Adobe Community Professional
                  The Flash Asset in my Dir 2004 installation which is version 10.1 (I seem to have the 10.1 update, but not 10.1.1) is dated 9/9/04 and is 804 KB. The one in the flash_print demo is dated 2/7/06 and is 1560 KB.

                  I thought I had provided enough prompting, but perhaps I need to be specific: download and install (manually, there is no exectuable patcher) the 10.1.1 update. When you've done that, publish again. If you're still having trouble then take it up here again.

                  • 6. Re: Can't print member in Mac projector made with MX 2004 Win
                    Professor S. Level 1

                    I thought I had provided enough prompting, but perhaps I need to be specific: download and install (manually, there is no exectuable patcher) the 10.1.1 update. When you've done that, publish again. If you're still having trouble then take it up here again.

                     

                    Sorry, I thought that 10.1 was close enough to 10.1.1 where it would not make a difference. Fortunately, most of what Schmidt had packed in his demo included most of the 10.1.1 update.  I did, however, go to the Adobe Director Download page to get the official update. I read the documentation and made sure that everything was in the proper folders.  It seemed that I might have had two dlls in the configuration folder when the docs showed them one level higher. Anyhow, I verified that I did have all of the 10.1.1 update files in place - even though I did not realize it. Launching DMX2004 however still reports 10.1 - is that a problem? Well, it seems that I have all of the new Flash 8 support in place and when I try to flash-print in author mode the Print dialog comes up - but when I create the projector, I am still getting the same script error:

                     

                    Handler not found in object

                    #getNextHighestDepth

                     

                    Also, please note that I am currently testing this projector in Windows.  I have not attempted to create the Max projector yet. I seemed to have covered everything needed to get the flash object to work, so I'm thinking that maybe I did not insert/create the Flash object correctly - but if it works in author mode, I must have implemented it properly.  It's got to be something to do with moving it to the projector and I am stumped - please help.

                    • 7. Re: Can't print member in Mac projector made with MX 2004 Win
                      Sean_Wilson Adobe Community Professional
                      when I create the projector, I am still getting the same script error:

                       

                      Handler not found in object

                      #getNextHighestDepth

                       

                      please help

                      It doesn't matter how many times you ask this question, the answer remains the same: the correct version of the Flash Asset xtra isn't available, or the Flash sprite you are using for a printing stub isn't published to a sufficient version of the Flash Player.

                       

                      Are your xtras external, or packed into the projector? If the latter, locate the folder named "TempFolder.aaa" or similar in your Temp directory and check the version of the Flash Asset xtra that is unpacked into there. Try using the Flash sprite from Valentins's example (copy cast member, close file, open current file, paste into castLib).

                      • 8. Re: Can't print member in Mac projector made with MX 2004 Win
                        Professor S. Level 1

                        Thank you for all the help so far! As it turns out, I verified that I was using the correct version of the xtra and the proper Flash object.  I tried the flash xtra both internal and external and when using it external and renaming it temporarily, the projector reports that a needed xtra is missing.  I also had tried using Valentin's entire cast in my movie when I couldn't get mine to work. I even tried copying my content to a copy of his demo print.dir and it gave the same getNextHighestDepth error, so I concluded it had to be something in my content.  It turned out to be a jpg background that I used in channel two right after the empty Flash 8 object in channel one like Valentin's demo. When I temporarily deleted the jpg,l my error went away in my Windows projector and I can flash_print in Windows. Next, I created a Mac projector and no error.  I get two print dialogs in the Mac version and it prints.  Unfortunately, I only get a small square of my text member printed out in the upper left hand corner of the printout and the rest of the page is black. The obvious question is: did you properly copy the cross platform content from the 10.1.1 update to your MX 2004 installation?  I checked and it seems to be there. I am now at a deadend again and can't print my member in Mac. What else can I check to figure out why I am getting this mostly black page in the Mac?

                        • 9. Re: Can't print member in Mac projector made with MX 2004 Win
                          Sean_Wilson Adobe Community Professional

                          What else can I check to figure out why I am getting this mostly black page in the Mac?

                          Is it possible that the #ink of your Flash sprite isn't #copy. If not, what happens if you change the ink to copy?

                          • 10. Re: Can't print member in Mac projector made with MX 2004 Win
                            Professor S. Level 1

                            Is it possible that the #ink of your Flash sprite isn't #copy. If not, what happens if you change the ink to copy?

                             

                            Yes, I changed the #ink of the Flash sprite to background transparent because the jpg background, that was causing the nextHigherDepth error, had to be moved to channel 1 and the empty8 object to channel 2.  But, when I change it back to copy (the black stuff on the print goes away), but now I have a white flash box showing on top of my page background. To fix, I tried moving the Flash object off the visible screen, but this causes the beloved nextHigherDeath error to pop up again. The best I could think off at this point was to use copy #ink for the Flash object and move it almost off the screen - where just one pixel is showing in the lower right corner of the movie. Not exactly elegant, but it seems to allow the Mac to use flash_print - well almost.  There is one more problem that popped up: my text member is slightly larger than one printed page - and so the bottom of the page is not getting printed. It only prints one page, which is going to be a problem since some of my text members are up to 4 pages long. Any thoughts on why the flash_print is not printing the second page?

                             

                            And, hopefully, one last question on flash_print: I now have to update about eighty files in my app and don't want to include the PRINT_CLASS and Flash object in every movie. If I save the needed cast members from the demo in an external cast, is there a way to use them in my movies without having to import or copy them in?  (I know how to open a cast or import one, but I don't think I know how to link in an external one that would be saved in the app folder)

                            • 11. Re: Can't print member in Mac projector made with MX 2004 Win
                              liftedfinger

                              Came across this post as I am new to director and had the same problem with #getNextHighestDepth

                              Being new to director I didn't realise the flash sprite would have to be on the stage and so had it off stage out of sight.

                              Bringing it back on stage and hidden underneath a backdrop got rid of the error.

                              Obvious really now, it's getting culled when it's off stage.

                               

                              Oh well, thought I'd mention it in case someone else comes across this post with all it's various answers.