Steve Gordon wrote

> hi
> Is there any way to set up a movie where the person running the movie can
> insert a picture from their hard drive into the movie?
> steve g


Sure, 

Step 1: Create a dialog box for the user to select the file
Step 2: Set the path of a linked cast member to the chosen file


Step 1. 
There are many ways of generating a dialog. You can use FileIO Xtra,
FileXtra, MUI Xtra, Buddy API Xtra for example (the first 3 are free and are
included with Director. Buddy API should be part of Director).

If you use the File Xtra, you can 'filter' which files show up in the
dialog. For example, this handler will generate a file selection dialog only
showing JPEGS and PICTS (you could change it to include any other image
formats 

on getFilePathToPicture defaultPath
  if the platform contains "Macintosh" then
    filterStr = "JPEG/PICT"
    res = FileOpenDialog(defaultPath, filterStr)
  else
    filterStr = "Jpeg Files/*.jpg/Pict Files/*.pct"
    res = FileOpenDialog(defaultPath, filterStr, "Open File", 0, 1)
  end if
  if stringP(res) then return res
  else return ""
end

Step 2. 
One you have the path to the picture file, you can set the 'fileName' of a
linked cast member to that path. For example

on mouseUp me
  newPath = getFilePathToPicture(the moviePath)
  if fileExists(newPath)= 0 then
   member("Placeholder").fileName = newPath
   -- this next line forces the member to update itself
   member("Placeholder").picture =  member("Placeholder").picture
  end if
end


Luke
-- 

__________________________________________________________________________
Mecca Medialight Pty Ltd

Mecca Medialight:                       Medialight Sound Studio:
111 Moor Street                         1 Bakehouse Lane
Fitzroy, Vic. 3065                      North Fitzroy, Vic. 3068
Tel +613 9416 2033                      Tel +613 9416 2033
Fax +613 9416 2055                      Fax +613 9416 2055

http://www.medialight.com.au
__________________________________________________________________________



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to