Professional Web Applications Themes

Problem with FileIO xtra in projector - Macromedia Director Lingo

Hi! In my project i have one projector that invokes movies (*.dir). With buddyAPI creates short- cuts in Start Menu: one for run app, second to delete from HD. I want to make text file on HD (with FileIO, it works!) to get the right app path, and when user starts delete icon (unwise.exe) from start menu to do the job. This part of code is in unwise.exe (projector): global myFile if objectP(myFile) then set myFile = 0 --Deletes the instance if it already exists set theFile = the text of field "Unw" -- Puts some text into a variable ...

  1. #1

    Default Problem with FileIO xtra in projector

    Hi!
    In my project i have one projector that invokes movies (*.dir). With buddyAPI creates short-
    cuts in Start Menu: one for run app, second to delete from HD. I want to make text file on HD (with FileIO, it works!) to get the right app path, and when user starts delete icon (unwise.exe) from start menu to do the job. This part of code is in unwise.exe (projector):

    global myFile
    if objectP(myFile) then set myFile = 0 --Deletes the instance if it already exists
    set theFile = the text of field "Unw" -- Puts some text into a variable
    set myFile = new(xtra "fileio")
    if the moviePath = "" then
    beep
    alert "No moviePath!"
    else
    createFile( myfile, the moviepath&"unwise.txt" )
    openFile( myFile, the moviepath&"unwise.txt",0)
    setfinderinfo(myFile, "TEXT ttxt")
    writeString( myFile, theFile)
    alert "Status: "&error(myFile,status(myFile))
    end if
    closeFile (myFile) -- Closes the file
    set myFile = 0 -- Disposes of the instance

    Projector allways says: script error? In authoring, everithing is OK!!!!
    What I'm doing wrong?
    Tnx!



    Lery webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Problem with FileIO xtra in projector

    Hi,

    Jus check and see whether you've closed you if's properly... director maynot catch this in authoring....think that's where the problem lies...


    Vj
    vij010 Guest

  3. #3

    Default Problem with FileIO Xtra in Projector

    Hello !
    I have the following problem. I read the text into the MIAW.
    Everyrhing is good in the authoring mode:

    global myFile
    on startMovie
    set myFile = new(Xtra"fileio") -- Create an instance of FileIO
    openFile(myFile,"master.txt", 0) -- Open the file
    theFile = readFile(myFile) -- Read the file and return a string to Lingo
    closeFile(myFile) -- Close the file
    set myFile = 0 -- Dispose of the instance
    member("text").text = theFile
    end

    But when I then run the Projector and call this MIAW the "Script error" message appeares. I choose
    "continue" and everything works good. So the problem appeares only during the first open of the MIAW. Please, can anybody tell me what the problem is ?
    Thank you.



    radchenko webforumsuser@macromedia.com Guest

Similar Threads

  1. Can't Find Xtra File When Creating Projector
    By 84square in forum Macromedia Director Basics
    Replies: 2
    Last Post: April 28th, 06:04 PM
  2. FILEIO XTRA QUESTION
    By Buzzone webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 6
    Last Post: November 5th, 08:20 PM
  3. fileIO and DirectImage xtra
    By Pixel Pusher webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 7
    Last Post: October 30th, 10:18 PM
  4. fileio xtra long path problem
    By Khaldoun webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 3
    Last Post: July 18th, 02:21 AM
  5. reading a 1MB text file from lingo using the fileIO Xtra
    By Lister in forum Macromedia Director Lingo
    Replies: 1
    Last Post: July 8th, 04:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139