inm logo
Corporate Website | Contact | Store | Support | Login  
     


Knowledgebase
View categorized listing of all common frequently asked questions.
Downloads
View our categorized library of downloads for all necessary manuals, software, etc.
 Article Options
Support Center » Knowledgebase » INM Impressario for Director » How to optimize projects by using fewer Impressario members
Support Page Banner
 How to optimize projects by using fewer Impressario members
 
Product: Platform: Area: Versions:
Impressario for Director All Deployment All

Summary


There are two methods to insert PDFs into your Director movie using Impressario.

The simplest method involves inserting an Impressario member in your cast for each PDF you wish to display. This method works fine if you intend to insert just a few PDFs (1 to 10). However, since each of the PDF documents linked to the Impressario cast members is opened at the start of the movie, having more than a few Impressario members in your cast can reduce performance.

For instance, if your movie has 150 separate Impressario members, this means that 150 PDF documents will be open in memory. This will drastically slow down the opening of your movie and, if they are larges files with heavy bitmaps, the memory usage can climb quickly and cause your projector to freeze or simply crash.

Solution


The preferred way to deal with a large number of PDFs (over 10), is to use a single Impressario member (or a few, depending on the display requirements), and to set the filename property of the member when you want to display a different PDF.

Example:

on ChangePDF(IMPMemberName, newFileName)
-- set the filename to empty first, to avoid errors when setting the pathType
member(IMPMemberName).FileName = ""
member(IMPMemberName).PathType = #RelativeToMovie
member(IMPMemberName).FileName = newFileName

end ChangePDF

You can store the various PDF filenames in a list, or have them match the frame labels of your movie, or even store each filename in a separate text member. When you go to display a new PDF you just have to execute the following code (on a mouseUp of a button, or on a prepareFrame script, or whatever event will make the new PDF appear):

Examples:

-- Use this script on a button; the PDF document name is hard-coded

on mouseUp
member("myPDF").FileName = "" -- make sure the fileName is empty to avoid any errors
member("myPDF").PathType = #RelativeToMovie -- set the path type to relative to movie
member("myPDF").FileName = "PDFs/myDoc.pdf" -- loads the PDF dynamically
end

-- Use this script to set the PDF filename to match your frame label
on prepareFrame
member("myPDF").FileName = "" -- make sure the fileName is empty to avoid any errors
member("myPDF").PathType = #RelativeToMovie -- set the path type to relative to movie
member("myPDF").FileName = "PDFs/" & the framelabel & ".pdf" -- loads the PDF dynamically
end



Article Details
Article ID: 5
Created On: 20 Mar 2006 03:06 PM

 This answer was helpful  This answer was not helpful

inm general footer
Services Xtras Go Products Support Gallery Store Download About Us Contact Newsroom