Professional Web Applications Themes

problems with file paths - Macromedia Director Lingo

Hello - was wondering whether anyone can help me out, I have a stub projector located in a folder which also contains a subfolder of various linked media (mainly aiff sound files). I have been having great difficulty getting creating a projector that knows where to find these links. Even when I have everything in one folder (ie all the linked movies and sound files and the projector) it still can?t find the links once burnt to cd and played on another computer. I?m trying to create a pc/mac hybrid (authoring on a mac for the most part). After trouble ...

  1. #1

    Default problems with file paths

    Hello - was wondering whether anyone can help me out, I have a stub projector located in a folder which also contains a subfolder of various linked media (mainly aiff sound files). I have been having great difficulty getting creating a projector that knows where to find these links. Even when I have everything in one folder (ie all the linked movies and sound files and the projector) it still can?t find the links once burnt to cd and played on another computer.

    I?m trying to create a pc/mac hybrid (authoring on a mac for the most part).

    After trouble shooting extensively I?m now at the point where my knowledge of applying Lingo is still pretty weak, but getting closer. I may be wrong but would the best way to solve this problem be to :

    insert a script in the stub that spells out the path of the first linked movie, assuming that it will safely find all the other links (as they are all in the same folder) or do I have to spell it out each time one movie jumps to the next ?

    The script I have in my stub at the moment (which doesn?t work) is:

    on exitFrame me
    go to movie ":HOME:source files:WIDE"

    end

    [?HOME? being the main folder, ?source files? being the sub folder, and ?WIDE? being the file I want to open].

    Any tips ?


    thanks


    gofton webforumsuser@macromedia.com Guest

  2. #2

    Default Re: problems with file paths

    If home is a folder in the same folder as your projector, you could write something like the following

    global gdelimiter

    on startmovie
    --find out the platform and delimiter
    if the platform contains "mac" then
    gdelimiter = ":"
    else
    gdelimiter = "\"
    end if

    end

    on exitFrame me
    fullfilePath = the moviePath & "HOME" & gdelimiter & "source_files" & gdelimiter &"WIDE"
    go to movie fullfilePath

    end exitFrame me

    Note I changed the "source files" directory name. Spaces can cause problems with some external files(acrobat) on some platforms so it's better to stay away from them.

    You should also set the searchpaths in the projector, so any other linked media can be found. See the lingo dictionary entry for an example.



    phosphorAngel webforumsuser@macromedia.com Guest

  3. #3

    Default Re: problems with file paths

    Thanks so much for your help, I think I'm almost there....but still need a bit of help,...please...don't leave me now!!!

    This is what code I put in the script channel of my stub:

    global gdelimiter

    on startmovie
    -- find out the platform and delimiter
    append the searchpaths, the moviePath & "source_files"
    if the platform contains "mac" then
    gdelimiter = ":"
    else
    gdelimiter = "\"
    end if
    end


    on exitFrame me
    filePath = the moviePath & "source_files" & gdelimiter & "WIDE"
    go to movie filePath

    end exitFrame me


    *** note that "HOME" is the name of the CD (or will be once burned) and within this will be the projector and one folder of all linked members (the folder "source_files")

    ****Problem : I get this error message now:

    "Where is "Macintosh:Users:artstart:Desktop:HOME:source_file sWIDE?"............

    By the sounds of this Director is not understanding that "source_files" and "WIDE" are two seperate entities..why is it doing this when i put the path delimter thingy in ?



    I put " append the searchpaths, the moviePath & "source_files"" as per the tech note under "changing linked file paths"...is this correct in terms of what you said i should do for search paths ?

    Please help me...so close yet so far...


    gofton webforumsuser@macromedia.com Guest

  4. #4

    Default Re: problems with file paths

    thanks for your speedy reply.....ummm...so I'm a bit slow on the whole global variable thing....how do i declare the global variable for the exit frame I'm calling ??? isn't the gdelimiter the only global factor in that whole script ?

    thanks again, i'm going crazy here with this never ending project !


    gofton webforumsuser@macromedia.com Guest

  5. #5

    Default Re: problems with file paths

    Hi,
    just write it at the top of the script as follows:


    global gdelimiter

    on exitFrame me
    filePath = the moviePath & "source_files" & gdelimiter & "WIDE"
    go to movie filePath

    end exitFrame me


    or

    on exitFrame me
    global gdelimiter
    filePath = the moviePath & "source_files" & gdelimiter & "WIDE"
    go to movie filePath

    end exitFrame me


    phosphorAngel webforumsuser@macromedia.com Guest

  6. #6

    Default Re: problems with file paths

    it still came up with the same error message, saying that it couldn't find "source_filesWIDE".... this is the code I have inserted in the script channel of the score, nothing else is in the stub.

    Have I done it wrong ? Since your last post I just rearranged the two bits of code, as what you just wrote I already had in the channel. This is what it looks like now:


    global gdelimiter

    on exitFrame me
    filePath = the moviePath & "source_files" & gdelimiter & "WIDE"
    go to movie filePath

    end exitFrame me

    on startmovie
    -- find out the platform and delimiter
    append the searchpaths, the moviePath & "source_files"
    if the platform contains "mac" then
    gdelimiter = ":"
    else
    gdelimiter = "\"
    end if
    end


    gofton webforumsuser@macromedia.com Guest

  7. #7

    Default Re: problems with file paths

    You need 2 types of script, a movie script, which has the startmovie code in it, and a frame script, which has the exitframe script.
    Both scripts must declare the global.

    The startmovie script is executed before the framescript.
    If there is nothing else in the stub, put the framescript in the second or third frame.



    phosphorAngel webforumsuser@macromedia.com Guest

  8. #8

    Default Re: problems with file paths

    thanks so much for sticking with me, I really appreciate your help. I haven't had a chance to implement your advice yet, but I'm still concerned about that error message, in so far as it doesn't seem to recognise that "source_files" and "WIDE" are two seperate entities. This is despite putting in the delimiter.

    Thanks again


    gofton Guest

  9. #9

    Default Re: problems with file paths

    I think your global is not being set.
    If you want to put it all in one frame script, put:

    global gdelimiter

    on exitFrame me
    if the platform contains "Mac" then
    gdelimiter = ":"
    else
    gdelimiter = "\"
    end if

    filePath = the moviePath & "source_files" & gdelimiter & "test2"
    put filePath
    go to movie filePath

    end exitFrame me


    phosphorAngel webforumsuser@macromedia.com Guest

Similar Threads

  1. #39970 [NEW]: is_writable() has problems with valid unix paths
    By karibu at gmx dot net in forum PHP Bugs
    Replies: 1
    Last Post: December 28th, 10:36 AM
  2. Replies: 4
    Last Post: September 29th, 02:07 AM
  3. File paths and File names generated by Contribute
    By Hi There in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: August 31st, 07:50 PM
  4. Getting rid of file paths
    By Rena_Tucker@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 5
    Last Post: July 9th, 08:41 PM
  5. Verity Indexing problems on Greek paths in Multilanguagecollections
    By Tekes Stavros in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: June 23rd, 10:37 AM

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