• User Newbie

    proiettore flash comando fmcommand

    salve a tutti!
    lavoro con mac su flash mx
    ho pubblicato con flash un proiettore mac
    in realtà il mio proiettore dovrebbe richiamare altri proiettori ( il contenuto è un sito realizzato in flash che richiama altri swf in nuove finestre)
    le indicazioni che ho trovato sui forum sono di utilizzare fmcommand exec ma dopo svariati tentativi falliti ho capito che il metodo è per windows....

    fai una cartella, nella stessa cartella in cui c'è il proiettore, chiamata fscommand.
    Dentro ci metti il secondo proiettore (non swf, per farlo aprire in un'altra finestra devi fare un proiettore) e un file fatto con notepad e salvato come tutti i files, con estensione bat, e dentro:

    @echo off
    start altroproiettore.exe
    @exit

    Sul tasto:

    on (release) {
    fscommand("exec", "nomefile.bat");
    }

    utilizzando un .bat è ovviamente windows!

    dopo altra ricerca ho trovato queste indicazioni per mac.... che non funzionano!

    Option 1)
    Use FSCommand to open documents, but use Macintosh path syntax.
    So if you wanted to open a file in a "data" folder:
    FSCommand("exec","data:myfile.pdf");

    OS X users should use the standard slash (/) notation, as this is the normal syntax, (the same as a URL) which will work fine.

    [ci-berpages, edited by SJT]

    Option 2)
    You can also create a custom applescript and compile it as an application which flash can then launch.
    Copy the following code into Script Editor, found in the Applescript folder in your Apple Extras folder.

    Code:
    --set the name of the file to open
    property fileName : "thedocument.pdf"
    --get the path to the containing folder
    set myPath to (path to me as string)
    set AppleScript's text item delimiters to ":"
    set the parentFolder to ¬
    ((text items 1 thru -2 of myPath) & "") as string
    set AppleScript's text item delimiters to ""
    -- find the flash file
    try
    set targetFile to alias (the parentFolder & fileName)
    on error
    --ie if there's no file here by this name, it will quit.
    return quit
    end try
    tell application "Finder"
    open file targetFile
    end tell

    In the second line of the code there is a variable declared called fileName, you need to change the value between the double quotes to the name of your document.
    Then choose Save As in Script Editor.
    Change the dropdown menu to read "Application" and set the checkboxes so that "Never show splash screen" is checked and "Stay open" is unchecked.
    Save your script as a useful name, then put it in the folder with the document you want to open.

    Finally, in your flash file enter the FSCommand and use the name of your script as the name of the application.
    e.g. fscommand("exec",myscript);

    come faccio?

    come faccio a richiamare da un proiettore altri proiettori per mac?
    o meglio, qualcuno conosce la soluzione che funzioni su mac e windows?
    grazie