A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Projectors with MAC Applescript - Read this if you're stuck

  1. #1
    Junior Member
    Join Date
    Aug 2008
    Posts
    2

    Projectors with MAC Applescript - Read this if you're stuck

    I've just spent about a day and a half of my life, along with others in our studio trying to get a HYBRID CD ROM projector working.
    Its a simple project - just a frontend GUI with a set of buttons to open up folders on the disc with relevent content in them.

    I had issues with getting the Applescript code to work from the projector. I could run the script in script editor no probs, but clicking through from the flash projector didn't work.

    The problem? Flash CS3.
    I'd set my publish settings to flash player 8 and actionscript 2, but this didn't help.
    To solve it, i saved the whole .fla as a flash 8 document, opened it on an older machine in flash 8, published from there and it works fine.

    It annoyed me on here when people just said 'i've sorted it, thanks', so decided to post back and help out anyone who's stuck like me. So below i've pasted all the code and links that helped me out.


    I've been using this forum massively - this post:
    Northcodes Proxy

    To open folders on windows:
    Code:
    drv = _url.substr(8,1);
    getURL(drv+":\\folder"); // change the folder name to whatever you need
    Northcodes SmartExec function works a treat along with his proxy application:
    Code:
    function SmartExec(target)
    {
       platform = $version.slice(0,3);
       if (platform == "WIN") {
          fscommand("exec", target + ".exe");
       } else {
          fscommand("exec", target + "_script");
       }
    }
    and if you're using an actionscript version that doesn't support slice, then:
    Code:
    function SmartExec(target)
    {
       platform = substring(getVersion(), 1,3);
       if (platform == "WIN") 
       {
          // we're running on Windows, target an EXE file
          fscommand("exec", target + ".exe");
       } 
       else 
       {
          // we're running on a MAC, target an AppleScript file
          fscommand("exec", target + "_script");
       }
    }
    Applescripting walkthrough here:
    Morgadinho

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    You won't be pleased to hear this, but you've run headlong into a known issue.

    Adobe badly bruised the EXEC function when they released CS3 as I mentioned on my blog in this post almost a year ago... FSCommand EXEC is Broken in Flash CS3.

    The latest copy of my Proxy utility (version 3.0) fixes this for Windows but I haven't created a solution for the Mac yet

  3. #3
    Junior Member
    Join Date
    Aug 2008
    Posts
    2

    ho hum...

    Hi Northcode,

    I'd actually read your blog post on that subject, but didn't really digest it properly!
    Since you'd stated that it works in windows with your proxy app, i just assumed foolishly that it would on Mac!

    As they say round here...."chin up!"....

  4. #4
    Junior Member
    Join Date
    Aug 2008
    Posts
    5
    I'm having trouble, and it's not on the pc side. I used this utility called Jstart from ***********.

    but the mac side isn't working. I am working on CS3, I can use our old computer with cs2. but that didn't work.

    I want to just open folders and I do the
    fscommand("exec", "actionscriptname"); but nothing happens. when I run the actionscript it opens the folder... even after I've burned it, I run it and it opens the folder on the cd.

    and for some reason I can't launch a local webpage on the CD. it works when I run the projector locally, but when I burn the CD, it doesn't work... what's with this. (by the way, I'm using geturl)

  5. #5
    Junior Member
    Join Date
    Aug 2008
    Posts
    2
    hey Jrosenbomb,

    I've been away on holiday for a week or so - have you got your problem fixed now?

  6. #6
    Junior Member
    Join Date
    Dec 2008
    Posts
    2
    I have tried to create a hybrid CD which includes installers for both PC and MAC. The PC works like a charm. The MAC side simply doesn't. I have created AppleScripts which work quite well, but the fscommand("exec",whatever) doesn't work. My applescript name is L1. So, I have put in for whatever, "L1", "L1_script", "L1.script", "L1.scpt_script", and "L1_script.scpt" - none of which have worked. I am using CS3 and have copied the fscommand folder into the MacOS folder. I don't know what else to try. Help!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center