A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: problem with function SmartExec(target)

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    222

    problem with function SmartExec(target)

    Hey guys:

    In need of your DESPERATE HELP. I can't get this function to work on the PC.

    I have put on the first frame of my movies:

    function SmartExec(target) {
    platform = $version.slice(0, 3);
    if (platform == "WIN") {
    fscommand("exec", target+".exe");
    } else {
    fscommand("exec", target+"");
    }
    }

    And then on the button links I have put

    on (release) {
    _parent.SmartExec("01smp_bud_spread");
    }

    as the button is in a nested_MC.

    I tested it before hand on a smaller scale and it worked for both the mac/pc but when I started to implement, I checked it on the PC and it doesn't work! However, when I create a projector file of each seperate movie file it works, but I don't want to do that. I have a main projector files that loads each movie, so it should work, right?

    PLEASE HELP ME, I AM DESPERATE!

    Cheers,
    Jag
    You have to think in Flash

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    I wrote the little SmartExec function SPECIFICALLY to make it easy to call EXEC on either platform to run EXE files or AppleScript scripts. If you just want to load SWF files you can use loadMovie and load the SWF file into your projector. loadMovie works the same on both platforms so there's nothing special you have to do there.

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Posts
    222
    hey northcode,

    the problem wasn't with the loadmovie. It's just when I used the loadmovie command, your function stopped working as for some reason, on the PC, flash player wasn't recognizing that the movie being loaded was in a projector...

    Anyhow, I managed to fix it. I basically called the function on the parent projector and it works fine now.

    THANKS!
    You have to think in Flash

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