Again a problem when transferring a project from 8.5 to MX
(on Mac OSX)...
I want to open an image file and import it into a cast
member. The following code works perfectly well in Dir 8.5...
... AND also within Dir MX:
on mouseUp me -- attached to button "Open File"
vfileObj = new(xtra "FileIO")
vFilename = displayOpen(vfileObj)
openFile (vfileObj, vFilename, 1)
if status(vfileObj) <> 0 then
-- alert message if necessary
importFileInto member(3), vFileName
vfileObj = 0
But when the movie is compiled ("published"), I get the
message "Director Player error!"
What's wrong then, since the code works when building the
project in MX?? Any help much appreciated!
Thanks in advance,
Since you are using the fileIO xtra, you need to include that
your project. There are 2 ways to do that.
1) Compile it internally into the projector itself: Click on
Movies, Xtras. In the dialog that shows up, click on Add...
from the list and hit OK. Make sure it has the "Include in
box checked. Hit OK.
2) Include it in an external xtras folder: find the fileIO
xtra on your
computer (generally on PC, it is in the
director\configuration\xtras\scripting folder). Copy that
paste it into a folder named "xtras" which is in the same
your projector (you may need to create the folder if it isn't
There are pros and cons to each method, choose the one that
for you. You can read about managing xtras in the help file.