MMExecute

its been 2 days now....i just cant run my jsfl file from
action script....i just wanna write a file....
hers code....
savebutton.onRelease = function()
MMExecute('fl.runScript("file:///C|/Program
Files/Macromedia/flash projects/xml parsing/savescript.jsfl");');
i tried using all the different combinations of this
function....
my swf file is in windowsswf folder.....i can run the file
manually but it just dont run from action script......
please help me.....

there are significant restrictions on MMExecute().  it can't be used in test movie or a browser.
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000581.html

Similar Messages

  • AIR Intrinsic Classes-Tried and Proven Approach to building AIR applications   in the Flash CS3 IDE

    Hi everyone,
    For all of you out there who would like to develop AIR
    applications
    from the Flash CS3 IDE but aren't sure how to get those pesky
    intrinsic
    classes working, I have a technique that you can work with to
    create
    your classes and make fully functional AIR applications.
    First of all, those solutions out there that list
    "intrinsic" functions
    in their class definitions won't work. That keyword has been
    taken out
    and simply won't work. The "native" keyword also doesn't work
    because
    Flash will reject it. The solution is to do dynamic name
    resolution at
    runtime to get all the classes you need.
    Here's a sample class that returns references to the "File",
    "FileStream", and "FileMode" classes:
    package com.adobe{
    import flash.utils.*;
    import flash.display.*;
    public class AIR extends MovieClip {
    public static function get File():Class {
    try {
    var classRef:*=getDefinitionByName('flash.filesystem.File');
    } catch (err:ReferenceError) {
    return (null);
    }//catch
    return (classRef);
    }//get File
    public static function get FileMode():Class {
    try {
    var
    classRef:*=getDefinitionByName('flash.filesystem.FileMode');
    } catch (err:ReferenceError) {
    return (null);
    }//catch
    return (classRef);
    }//get FileMode
    public static function get FileStream():Class {
    try {
    var
    classRef:*=getDefinitionByName('flash.filesystem.FileStream');
    } catch (err:ReferenceError) {
    return (null);
    }//catch
    return (classRef);
    }//get FileStream
    }//AIR class
    }//com.adobe package
    I've defined the package as com.adobe but you can call it
    whatever you
    like. You do, however, need to import "flash.utils.*" because
    this
    package contains the "getDefinitionByName" method. Here I'm
    also
    extending the MovieClip class so that I can use the extending
    class
    (shown next) as the main Document class in the Flash IDE.
    Again, this is
    entirely up to you. If you have another type of class that
    will extend
    this one, you can have this one extend Sprite, Math, or
    whatever else
    you need (or nothing if it's all the same to you).
    Now, in the extending class, the Document class of the FLA,
    here's the
    class that extends and uses it:
    package {
    import com.adobe.AIR;
    public class airtest extends AIR{
    public function airtest() {
    var field:TextField=new TextField();
    field.autoSize='left';
    this.addChild(field);
    field.text="Fileobject="+File;
    }//constructor
    }//airtest class
    }//package
    Here I'm just showing that the class actually exists but not
    doing much
    with it.
    If you run this in the Flash IDE, the text field will show
    "File
    object=null". This is because in the IDE, there really is no
    File
    object, it only exists when the SWF is running within the
    Integrated
    Runtime. However, when you run the SWF as an AIR application
    (using the
    adl.exe utility that comes with the SDK, for example), the
    text field
    will now show: "File object=[object File]". Using this
    reference, you
    can use all of the File methods directly (have a look here
    for all of
    them:
    http://livedocs.adobe.com/labs/flex/3/langref/flash/filesystem/File.html).
    For example, you can call:
    var appResource:File=File.applicationResourceDirectory;
    This particular method is static so you don't need an
    instance. If you
    do (such as when Flash tells you the property isn't static),
    simply
    create an instance like this:
    var fileInstace:File=new File();
    fileInstance.someMethod('abc'); //just an example...read the
    reference
    for actual function calls
    Because the getter function in the AIR class returns a Class
    reference,
    it allows you to perform all of these actions directly as
    though the
    File class is part of the built in class structure (which in
    the
    runtime, it is!).
    Using this technique, you can create references to literally
    *ALL* of
    the AIR classes and use them to build your AIR application.
    The beauty
    of this technique is its brevity. When you define the class
    reference,
    all of the methods and properties are automatically
    associated with it
    so you don't need reams of code to define each and every
    item.
    There's a bit more that can be done with this AIR class to
    make it
    friendlier and I'll be extending mine until all the AIR
    classes are
    available. If anyone's interested, feel free to drop me a
    line or drop
    by my site at
    http://www.baynewmedia.com
    where I'll be posting the
    completed class. I may also make it into a component if
    there's enough
    interest. To all of you who knew all this already, I hope I
    didn't waste
    your time.
    Happy coding,
    Patrick

    Wow, you're right. The content simply doesn't show up at all.
    No
    JavaScript or HTML parsing errors, apparently. But no IE7
    content.
    I'll definitely have to look into that. In the meantime, try
    FireFox :)
    I'm trying to develop a panel to output AIR applications from
    within the
    Flash IDE. GSkinner has one but I haven't been able to get it
    to work
    successfully. Mine has exported an AIR app already so that's
    a step in
    the right direction but JSFL is a tricky beast, especially
    when trying
    to integrate it using MMExecute strings.
    But, if you can, create AIR applications by hand. I haven't
    yet seen an
    application that allows you to change every single option
    like you can
    when you update the application.xml file yourself. Also, it's
    a great
    fallback skill to have.
    Let me know if you need some assistance with AIR exports.
    Once you've
    done it a couple of times, it becomes pretty straightforward.
    Patrick
    GWD wrote:
    > P.S. I've clicked on your link a few times over the last
    couple of days to
    > check it out but all I get is a black page with a BNM
    flash header and no way
    > to navigate to any content. Using IE7 if that's any
    help.
    >
    >
    >
    http://www.baynewmedia.com
    Faster, easier, better...ActionScript development taken to
    new heights.
    Download the BNMAPI today. You'll wonder how you ever did
    without it!
    Available for ActionScript 2.0/3.0.

  • Using Flash in DW extension - Security Settings

    I have a Flash SWF in my Dreamweaver extension, and I pass values between the SWF and DW using the DW API.
    However, to get it to work locally, I need to add the SWF file as a security exception, which is quite inconvenient to potential end-users.
    Is there a way to use Flash in my extension without requiring the end-user to update their security exceptions (or that provides an easy way to do so)?
    Thanks!

    Does anyone have any idea how this is done? The start page
    for Dreamweaver is also a Flash SWF file called welcome.swf, that
    in turn invokes various dw API calls. Trouble is, I have no idea
    what command they are using MMExecute, getURL, fscommand?

  • Embed Flash in DW Extension

    Anyone Help!?
    I'm trying to embed a Flash SWF in a DW extension. So far, so
    good ( I put it in my Command html page between form tags and it
    appears). Now I'd like it to communicate back with the JavaScript
    engine inside DW.
    Anyone know how? I know that Neil Clark made an extension a
    while back that somehow invoked another Command html page and even
    passed parameters. I downloaded it and took it apart but could not
    look inside the swf source. Did he use fscommand? Is AS3 supported
    via ExternalInterface? I've had no luck! Good 'ol fscommand seems
    to throw an obscure error: "document.embeds has no properties".

    Does anyone have any idea how this is done? The start page
    for Dreamweaver is also a Flash SWF file called welcome.swf, that
    in turn invokes various dw API calls. Trouble is, I have no idea
    what command they are using MMExecute, getURL, fscommand?

  • Finding an object's "path"

    Hello,
    I'm trying to write a plug-in for Flash CS5 that will display the "instances path" for a selected object. I'm trying to work with JSFL.
    I manged to get all selected objects using fl.getDocumentDOM().selection. I iterate over the array I get and look at the objects. I am able to get each of the objects' name. What I need to do is construct the "path" to that object (e.g., scene.scene.instance4.myText). Can anyone think of a way to do that? Is there a way to get the object that contains a certain object?
    Thanks,
    Zohar.

    yes, I am using AS3, but that's only for the Flash component's code. To get the project's data I am using JSFL (it is being invoked from within the AS3 code with MMExecute). If there's any other way of doing this - I'll be glad to know...
    Thanks,
    Zohar.

  • How to Call C functions within Flash?

    I have a bunch of functions written in C++. I would like to
    be able to call these functions within my flash application so that
    I can pass data to the functions and get the returned values. Is
    this possible with Flash 8?
    If this is not possible then is there a way that I can have
    Flash share memory space with another stand-alone application? This
    way, a C++ program could read and write data to the shared memory
    and Flash could also read and write to it.

    you can write a dll and then call mmexecute in the flash IDE,
    but I
    think in the player it is not possible.
    mProjector on windows will let you write c plugins that you
    can call from Flash
    http://www.screentime.com/software/mprojector/plugins.html
    give it a look - it might do what you need...
    On 2006-05-04 15:50:24 -0400, "mmakrzem"
    <[email protected]> said:
    > I have a bunch of functions written in C++. I would like
    to be able to
    > call these functions within my flash application so that
    I can pass
    > data to the functions and get the returned values. Is
    this possible
    > with Flash 8?
    >
    > If this is not possible then is there a way that I can
    have Flash
    > share memory space with another stand-alone application?
    This way, a
    > C++ program could read and write data to the shared
    memory and Flash
    > could also read and write to it.
    John Pattenden
    Screentime Media
    Flash Screen Saver, Application and Wallpaper tools
    http://www.screentime.com

  • When i export the project as swf

    I have this code in scene4 and when i play it from the project with ctrl+enter the kuler in this scene play and load the color theme correctly. When i export the project as swf the scene4 with this code play but they do not load the color theme. why?
    stop();
    button_12.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene1);
    function fx_ClickToGoToScene1(event:MouseEvent):void
      MovieClip(this.root).gotoAndPlay(1, "Scene1");
    button_13.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene2);
    function barca_ClickToGoToScene2(event:MouseEvent):void
      MovieClip(this.root).gotoAndPlay(1, "Scene2");
    button_14.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene3);
    function dfdfs_ClickToGoToScene3(event:MouseEvent):void
      MovieClip(this.root).gotoAndPlay(1, "Scene3");
    import com.pixelfumes.kuler.*;
    import flash.events.Event;
    import fl.managers.StyleManager;
    StyleManager.setStyle("scrollBarWidth",11);
    var kuler:JSFLKuler = new JSFLKuler();
    var devKey:String = "29CE344635AB36DB7F2A50B3C8AC7E55";
    kuler.loadFeed("http://kuler-api.adobe.com/rss/get.cfm?listtype=recent&key="+devKey);
    preloader_mc.gotoAndPlay(2);
    kuler.addEventListener(com.pixelfumes.kuler.JSFLKuler.FEED_LOADED, onFeedReady);
    kuler.addEventListener(com.pixelfumes.kuler.JSFLKuler.FEED_FAILED, onFeedFailed);
    var stubMC:MovieClip = new MovieClip();
    sp.source = stubMC;
    function onFeedReady(e:Event):void{
      if(kuler.getItemCount() < 1){
      feedControl_mc.status_txt.text = "No Results";
      }else{
      for(var i:uint=0;i<kuler.getItemCount();i++){
      var ki = new KulerItem();
      stubMC.addChild(ki);
      ki.y = i*60;
      ki.setLabel(kuler.getItem(i).title);
      ki.setSwatchColors(kuler.getItem(i).hexColor)
      ki.setRating(kuler.getItem(i).rating);
      sp.refreshPane();
      hidePreloader()
    function onFeedFailed(e:Event):void{
      feedControl_mc.status_txt.text = "Feed Load Failed";
      hidePreloader();
    function removeKulerItems():void{
      stubMC = null;
      stubMC = new MovieClip();
      sp.source = stubMC;
    function hidePreloader():void{
      preloader_mc.visible = false;
    function showPreloader():void{
      preloader_mc.visible = true;
    var kulerTF:TextFormat = new TextFormat();
    kulerTF.color = 0xFFFFFF;
    kulerTF.font = "Arial";
    StyleManager.setComponentStyle(TextInput, "textFormat", kulerTF);
    search_btn.addEventListener("mouseDown",onSearch);
    function onSearch(e:Event):void{
      if(search_txt.text != ""){
      feedControl_mc.gotoAndStop(4);
      removeKulerItems();
      showPreloader();
      kuler.loadFeed("http://kuler-api.adobe.com/rss/search.cfm?searchQuery="+search_txt.text+"&startIndex=0&itemsPerPage=100&key="+devKey);
    search_txt.addEventListener("keyDown",onKeyDownEvent);
    function onKeyDownEvent(e:KeyboardEvent):void{
      if(e.keyCode == 13){
      onSearch(e);
    //JSFL
    function executeJSFL(args){
      var file = args.shift();
      var func = args.shift();
      var result;
      if( args.length > 0 ){
      var arg = args.join( "\',\'" );
      result = MMExecute(((((("fl.runScript(fl.configURI+\'Commands/" + file) + "\',\'") + func) + "\',\'") + arg) + "\');");
      else{
      result = MMExecute(((("fl.runScript(fl.configURI+\'Commands/"+ file) + "\',\'") + func) + "\');");
      return( result );
    function flTrace(str){
      MMExecute("fl.trace(unescape(\""+ escape(str)+"\"));");
    this.addEventListener(com.pixelfumes.kuler.KulerItem.ITEM_SELECTED, onItemSelected);
    function onItemSelected(e:Event):void{
      var args:Array = e.target.swatchColors;
      args.push(escape(e.target.schemeName));
      trace(e.target.swatchColors);
      executeJSFL(["kuler/kuler.jsfl","addSwatches",args]);
    info_btn.addEventListener("mouseDown",onInfoClick);
    function onInfoClick(e:Event):void{
      executeJSFL(["kuler/kuler.jsfl","showInfo"]);

    probably because you're trying to use a cross-domain load (and violating a security barrier) without giving permission, Adobe - Flash Player : Settings Manager - Global Security Settings panel

  • MXExecute

    its been 2 days now....i just cant run my jsfl file from
    action script....i just wanna write a file....
    hers code....
    savebutton.onRelease = function()
    MMExecute('fl.runScript("file:///C|/Program
    Files/Macromedia/flash projects/xml parsing/savescript.jsfl");');
    i tried using all the different combinations of this
    function....
    my swf file is in windowsswf folder.....i can run the file
    manually but it just dont run from action script......
    please help me.....

  • Major JFSL Bug with addNewText

    If I make a JSFL file with this in it and run it using Run
    Command..., it works:
    fl.getDocumentDOM().addNewText({left:10, top:10, right: 100,
    bottom:30}); fl.getDocumentDOM().setTextString("Hello World");
    If I make a WindowSWF panel with the same thing in it,
    wrapped in MMExecute, it doesn't:
    MMExecute("fl.getDocumentDOM().addNewText({left:10 , top:10,
    right: 100, bottom:30})");
    MMExecute("fl.getDocumentDOM().setTextString(\"Hel lo World\")");
    It will addNewRectangle, it will addNewOval, etc. It WILL NOT
    addNewText no matter what I do, no matter how many ways I tried it.
    This looks totally broken to me. Can anyone verify it?

    StevenBlitz.
    > I figured it out, too.
    >
    > You must have the panel docked. If the panel isn't
    > docked and is free floating, addNewText doesn't
    > work.
    I hate to sound disagreeable, but I have to disagree. That's
    not it.
    ;) It works in both cases.
    > That's a bug no matter how you cut it.
    It's *seems* like a bug, I agree, but I believe what has
    happened here
    is that you haven't grasped how WindowSWF content works. When
    you go to
    Window > Other Panels > [name of custom WindowSWF], you
    load the SWF in
    question into memory. When it is first loaded into memory,
    the MMexecute()
    content in that SWF's timeline runs -- once. If you close
    that window again
    and open it in a single sitting (one "session," as it were),
    you're not
    actually reloading it, but only showing and hiding it. Make
    sense?
    If you trigger that MMexecute() content with a button, it'll
    work every
    time -- docked or undocked.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

Maybe you are looking for

  • Dynamic retion by choice

    Hi I am new to SPRY - i must say it rocks. I am working on and trying out new things over products demo spry example. I am wonder how to add a Dropdown category list and Search option in it. Can someone help me please. Thanks krs

  • ISight failure on 3.06 iMac

    Hi Everyone, I have just received my latest 24 inch iMac a 3.06 Ghz with 8800 GS graphics. Its really fine but there is just one problem with the iSight camera I do not get with my two white 2.16 Ghz 24 inch iMacs. I have Skype on all three machines

  • How to deactivate PSE 13

    I am trying to deactivate PSE 13 from my current PC so that I can add it to my new PC, but when I go to the uninstall, there is no option to deactivate, I have searched all the "help" tabs and have done several "searches" but nothing is helping. (my

  • Dimension reordering problem !!

    Hi all, Second last dimension is not moving up when i am trying to reorder my dimension in my outline of a planning application . i am doing this through performance setting tab of hyperion planning. any idea why...and any other alternative to reorde

  • OS X Server Deleted My Website and Configuration Changes

    I have a small website I'm using from within my LAN on my MacMini under OS X 10.9.4, using html pages and one Python wsgi script.  I ran into an issue with the databases in SQLite and rebooted.  (I kept getting errors with the database being locked.)