How to get the external file linking in as3

I want to open files outside different format (*.mp4, *.wmv, *.pdf, * .ppt,.doc etc.) on the click event, I try that for *.wmv but I received an error.

--------------------------------------------------------------------------------

package {}

to import flash.display.SimpleButton;

import flash.events.MouseEvent;

import flash.net.navigateToURL;

import flash.net.URLRequest;

public class button click extends SimpleButton {}

public void clickbutton() {}

this.addEventListener (MouseEvent.CLICK, clickF);

}

private void clickF(e:MouseEvent):void {}

var nc:NetConnection = new NetConnection();

NC. Connect (null);

var ns:NetStream = new NetStream (nc);

videoPlayer.attachNetStream (ns);

var listener: Object = new Object();

listener.onMetaData = function(evt:Object):void {};

NS.client = listener;

NS. Play ("video_test.wmv");

}

}

}

--------------------------------------------------------------------------------

Please tell me the correct code

you don't need the swf file.

you create a projection file (.exe).

If you know users will have default settings to open the types of files and programs, you can use fscommand to open them (as long as they files are located in a subdirectory of fscommand).

you will need to use an executable support, too: http://www.northcode.com/blog.php/2007/08/07/Conquering-FSCommand-EXEC-Part-1-Proxy

Tags: Adobe Animate

Similar Questions

  • How to get the mov files to play on ms media player

    Hello how is what we all mov files by our cameras when we're doing videos, that I can up load on youtube very well, but my Media Player will not play. Please don't tell me about codecs unless you include the link to get the mov files. Thank you

    Right-click on the mov file and point to open with, click Windows movie maker,

    Rotation is on the top / center and Save is on the top / right.

  • How to get the bak files?

    Original title: Bak files.

    How to retrieve the bak files. They were e-mail messages that went somehow in the trash. I got the files, but they have bak next to them. Nothing I do will open to them. Thank you

    Microsoft MSDN can help, try this link.

    http://social.msdn.Microsoft.com/search/en-us?query=opening%20BAK%20Files&emptyWatermark=true&AC=5

  • How to get the gif file hosted by using the Http connection?

    Hello

    I have an application that downloads animation gif from a server by using the http connection. Here is the code I use to download the image.

    try {
    
                httpConnection = (HttpConnection) Connector.open(url, Connector.READ_WRITE);            httpConnection.setRequestMethod(HttpConnection.GET);
    
                if (httpConnection.getResponseCode() == HttpConnection.HTTP_OK) {                DataInputStream dS = httpConnection.openDataInputStream();
    
                    byte[] data = new byte[dS.available()];                dS.read(data);
    
                    gifImage = (GIFEncodedImage) EncodedImage.createEncodedImage(data, 0,data.length);
    
                } else {                throw new Exception("ResponseCode:" + httpConnection.getResponseCode());            }        } catch (Exception e) {                        gifImage = null;            e.printStackTrace();        }
    

    the problem with this code is, when the gif file is 1175 bytes above, it does not load the gif.

    example:-If the gif on the server is 1500 bytes, this code retrieves only 1175 bytes.

    I think that the rest of the bytes are sent in a different package. But how to get them.

    can someone please provide a code for buffering the inputstream?

    any help is appreciated.

    Dieye

    Hmm, nobody seems to know how to do, it seems. Here's how I did it.

                httpConnection = (HttpConnection) Connector.open(url, Connector.READ_WRITE);
                httpConnection.setRequestMethod(HttpConnection.GET);
    
                int responseCode = httpConnection.getResponseCode();
                if (responseCode == HttpConnection.HTTP_OK) {
                    inputStream = httpConnection.openInputStream();
                    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    
                    byte[] buffer = new byte[256];
                    int len = 0, imageSize = 0;
    
                    while (-1 != (len = inputStream.read(buffer))) {
                        byteArrayOutputStream.write(buffer);
                        imageSize += len;
                    }
    
                    byteArrayOutputStream.flush();
                    byte[] imageData = byteArrayOutputStream.toByteArray();
                    byteArrayOutputStream.close();
    
                    gifImage = (GIFEncodedImage) EncodedImage.createEncodedImage(imageData, 0, imageSize);
    
  • How to get the external hard drive to connect to VMWare Player?

    Hi all

    I currently have VMWare Player 3.1.4 and that you have a VM installed on an external SSD that works very well.

    The guest operating system is XP and host operating system is OpenSuSE 11.4.

    The problem is that I have another external hard drive that I want to connect to the virtual machine to store files and other (WD Scorpio Black 320 GB).

    So what I tried was when I opend VMWare Player, I went to add a new SCSI device, found the hard drive, I wanted to use and created it. But when I go in-> "VM" > "Removable devices" > "generic SCSI (SCSI 0:1) ' > 'Connect'-> I get the below error message.

    Device virtual scsi0:1: could not open the device host "/ dev/sdc": not sufficient permissions to access the file. Please make sure that the virtual device is configured to use a Linux generic SCSI device (/ dev/sg *), and that the physical device works normally on the host computer.
    Cannot connect the device virtual scsi0:1.

    Does anyone know if I'm doing something wrong? What are the permissions are they talking about?

    Thanks in advance,

    Matt

    Are back at the office and tested on a variety of Linux Ubuntu and was able to add a second drive HARD/dev/sdb as a physical and even disc was also able to boot from it even if it needs to be dismantled first and I had to start VMware Player using sudo, because I was using a standard account both add the disk and run the virtual machine with the added disk.

  • How to get the mobileprovision file for air for ios

    I created a small application. I want to publish this .ipa file when I try to publish the ide flash asking the .moblieprovision file. How can I get this file. Is it need to BUY.

    That may have changed with CS6, but in the past, you had to buy an Apple Developer iOS development plan (they have a Mac development as well).  Visit the website of apple to http://developer.apple.com .

  • How to get the current file name and & or path

    How can I get the current path or the file name?

    I have really found the answers in the net. This.Path or app.path have been proposed, but I couldn't make it work.

    Thanks in advance for your answer!

    LiveCycle Designer ARE 8.2.1.3144.1.471865

    Hello

    event.target.path.toString ();  will give the full path, including the file name.

    event.target.documentFileName.toString ();  will give the file name only.

    Good luck

    Niall

  • How to get the CSV file, RTF model output DATA

    Hi, Jorge

    Thanks for your help.

    as in the link you gave the model RTF can have the type of output CSV DATA but in the preview, I see only html, powerpoint, pdf, html, excel.

    How to see the result in SCV, DATA format using my RTF model do I have to do a specific design for these outputs.

    Thnaks in advance

    This is because it has been preconfigured with these outputs.
    Edit and add types of outputs more simply go to:

    1. change your report
    2. click on 'Display list' (upper right corner)
    3. click on the "output formats" (corresponding to your page layout) and
    4. check the formats (add) additional output you want your report to have.

    see you soon

    Jorge

  • How to update the external file fields?

    Hello

    I am new to trying to use pdf files for further editing of the text fields, but I'm trying to be sent in the right direction for the next job.

    I have an original field, lets say project #.  When that is filled, I want that the PDF file to automatically fill in other areas related to this project # from an external file/source.

    Where should I start to do such a thing, and what software should be used?  Also, what external file/source is best?

    Thank you very much, I really appreciate it that I can start learning/teaching myself

    Priyank Patel

    You should probably start with some books and documentation - perhaps the

    Manual of Acrobat or the Bible of PDF (Padova & Okamoto) forms.

    A few quick responses.

    -You will need to start with JavaScript, since logically form in a PDF document is

    in JavaScript.  There are many resources online and catalogue for this.

    try PDFScripters.com as a good starting point.

    -Depending on your environment and the environment of your users, you can

    Watch SOAP or ODBC to your methods of communication.

  • How to get the jar file without knowing his name and any class on the inside?

    Hello, everyone!

    I would like to know if there is a way to get a reference programmatically in the original container without knowing his name and any class it contains. I mean by "initial pot" the pot that was called in the prompt, like this:
    java -jar jarfile.jar
    or in another way, in a graphics system. To be honest, what I really want is to get a reference to the manifest of the jar, but I know that if I can get a reference to the jar I can get a reference to its manifest file. Or if you know a way to get the manifest directly, it would also be useful. So, is there a way to do this?

    Thank you.

    Marcos

    Ah, so you want to find the calling class and get its source code.

    I managed to get the class calling on occasion, but this is probably a somewhat fragile solution. You must extend SecurityManager because getClassContext() is a protected method.

        private static class CallerFetch extends SecurityManager {
    
            public Class getCallerClass() {
                return getClassContext()[3];
            }
        }
        private static CallerFetch callerFetch =
                new CallerFetch();
    
        /**
         * Find the class of the code which called the
         * method that invokes this method.
         * @return The class of the caller's caller
         */
        public static Class getCallerClass() {
            return callerFetch.getCallerClass();
        }
    
  • How to get the $HTML_TOP file / apps

    Guy

    In fact, we work on the i-recruitment Module and must change in the form of CV according to my customer need, to change, go file resumes from as object directory mentioned to obtain and update the summary format.

    So kindly help me how to join this directory because HTML_TOP is not mentioned in the batch file that auto move in particular folder.

    Thank you

    Hello

    So kindly help me how to join this directory because HTML_TOP is not mentioned in the batch file that auto move in particular folder.

    You are not sure if I understand you correctly, but what are you referring to the $OA_HTML directory? If so, connect to the source file the application as a user applmgr env, node-level application and issue of "echo $OA_HTML" or "echo $COMMON_TOP/html.

    Thank you
    Hussein

  • How to get the localeChain for links

    Hello

    I have a flex app where I can change the language on the fly. It works well. I have one problem with image of switching folders. I have some image files under "images/app/de_DE/image1.png" for German, "images/app/en_US/image1.png" for English and so on. I load the images with

    "{" < mx:Image source="images/app/{resourceManager.localeChain.join" ("")} / image1.png "id ="image1"/ >

    .Comes method is only a workaround that I found to get the countycode to the format of the string.

    The picture changes not on the fly, but when I reload the page, it also worked well. I also get a warning: data binding will not be able to detect assignments to "localeChain. This is no big problem because it works for me, I tried a lot of ways to do things, but I have not found "the right way".

    Can someone show me the "right way"?

    Thank you

    Hans

    In general, the localeChain can be a list of locales in which search for localized resources, such as ["fr_CA", "en_US", "en_US"]. By calling join() you are assuming that there is never more than one entry in this table, so I do not recommend that. One of the features of the ResourceManager is the ability to make LONG relief so that, for example, if it is not a resource in French for the Canada, you get the French France resource. You're doing impossible with your approach.

    I recommend leaving the ResourceManager to do its normal work of the localeChain looking for you... in other words, faced with localized images in the same way you treat localized strings.

    If you include pictures, then in your fr_CA images.properties file, declare a resource that represents the image:

    Image1=embed("images/app/fr_ca/Image1.png")

    and use the ResourceManager to fetch the class that got incorporated in order to represent this image:

    If you load images from a URL, then in your fr_CA images.properties file, declare a resource that represents the string URL:

    Image1=images/app/fr_ca/Image1.PNG

    and use the ResourceManager to fetch this URL as a string:

    Gordon Smith

    Adobe Flex SDK team

  • How to get the NetConnection off an in AS3 flvplayback component?

    http://www.Flashcomguru.com/index.cfm/2009/8/14/FLVPlayback-obtain-NC-reference

    I followed the above example in AS2, but only get the error:

    Call to a possibly undefined method getNetConnection through a reference with static type fl.video:INCManager.


    Here is my code:

    this.addEventListener (Event.ENTER_FRAME,
    function() {}
    If ((nc = player.ncMgr.getNetConnection ())! = undefined)
    {
    trace (NC);
    }
    });

    Someone knows how to do it in AS3?

    Hello

    Drag the flvplayback component on the stage and 'vidplayer' name in the properties panel. Then, you can use the following code example:

    import flash.utils.setInterval;
    import flash.utils.setTimeout;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.events. *;

    Import fl.video.FLVPlayback;
    Import fl.video.VideoPlayer;
    Import fl.video.VideoEvent;

    import flash.display.MovieClip;

    VideoPlayer.iNCManagerClass = fl.video.NCManagerNative;
    vidplayer.isLive = false;
    vidplayer.isDVR = false;
    vidplayer.source = "rtmp://localhost/vod/sample";

    var videoplayer:VideoPlayer;
    var flvplayback:FLVPlayback;
    FLVPlayback = FLVPlayback (this.getChildByName ("vidplayer"));
    VideoPlayer = flvplayback.getVideoPlayer (0);
    setTimeout (initMonitor, 5000);

    function initMonitor (): void
    {
    If (videoplayer.netStream! = null)
    {
    trace ("video plays!");
    If (VideoPlayer.NetConnection)
    {
    trace ("Got NetConnection!");
    }
    }
    on the other
    {
    trace ("Main.as:" + "not connected to FMS yet - try again...")
    setTimeout (initMonitor, 5000);
    }
    }

    Kind regards

    Amit

  • How to get the indesign files subfolder

    Hi experts

    How can I tell the script what I get is the subfolders but not sub sub folder or sub sub sub... folder files.

    my script like this:

    function GetFiles (theFolder) {}
    var = [] files,
    fileList = theFolder.getFiles (),
    i, file;

    for (i = 0; i < fileList.length; i ++) {}
    file = list of files [i];
    If {(instanceof file folder)
    files = files.concat (GetFiles (file));
    }
    ElseIf (file instanceof file & & file.name.match(/\.indd$/i)) {}
    files.push (file);
    }
    }

    return files;
    }

    How can it change?

    Thank you

    Respect of

    John

    Hi John,.

    Try this code...

    The Final PDF files stored in the desktop / folder PDF

    //======================================================================================
    var gScriptName = "Batch export INDD-files to PDF"; // Name of the script
    var gScriptVersion = "1.0"; // Version
    var gSet = GetSettings();
    var flag=0,files = [];
    var fileLs=[];
    CreateDialog();
    //===================================== FUNCTIONS  ======================================
    function CreateDialog() {
    var pdfPresetsList =app.pdfExportPresets.everyItem().name;
    var win = new Window("dialog", gScriptName + " - " + gScriptVersion);
    win.p = win.add("panel", undefined, "");
    win.p.alignChildren = "right";
    win.p.alignment = "fill";
    
    win.p.g = win.p.add("group");
    win.p.g.st = win.p.g.add("statictext", undefined, "PDF-presets:");
    win.p.g.ddl = win.p.g.add("dropdownlist", undefined, pdfPresetsList);
    win.p.g.ddl.selection = gSet.selectedPdfPresetIndex;
    win.p.g.ddl.preferredSize.width = 220;
    win.buttons = win.add("group");
    win.buttons.orientation = "row";
    win.buttons.alignment = "center";
    win.buttons.ok = win.buttons.add("button", undefined, "OK", {name:"ok" });
    win.buttons.cancel = win.buttons.add("button", undefined, "Cancel", {name:"cancel"});
    var showDialog = win.show();
    if (showDialog == 1) {
      gSet.selectedPdfPresetIndex = win.p.g.ddl.selection.index;
      app.insertLabel("Kas_" + gScriptName + gScriptVersion, gSet.toSource());
      Main();
    }
    }
    //---------------------------------------------------------------------------------------- ----------------------------------------------------------------
    function Main() {
    var folder = Folder.selectDialog("Select a folder with InDesign files to export");
    if (folder == null) exit();
    var files = GetFiles(folder);
    var pdfFolder = new Folder(Folder.desktop+ "/" + "PDF");
    if (files.length == 0) {
      alert("No files to open.", gScriptName + " - " + gScriptVersion);
      exit();
    }
    if(!pdfFolder.exists)pdfFolder.create();
    //VerifyFolder(pdfFolder);
    var pdfPresets =app.pdfExportPresets.everyItem().getElements();
    var selectedPdfPreset = pdfPresets[gSet.selectedPdfPresetIndex];
    var count = 1;
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
    // Progress bar -----------------------------------------------------------------------------------
    var progressWin = new Window ("window", gScriptName + " - " + gScriptVersion);
    var progressBar = progressWin.add ("progressbar", [12, 12, 350, 24], 0, files.length);
    var progressTxt = progressWin.add("statictext", undefined, "Starting exporting files");
    progressTxt.bounds = [0, 0, 340, 20];
    progressTxt.alignment = "left";
    progressWin.show();
    // Progress bar -----------------------------------------------------------------------------------
    for (var i = 0; i < files.length; i++) {
      var currentFile = files[i];
    
      try {
       var doc = app.open(currentFile, false);
       var docName = doc.name;
       // Progress bar -----------------------------------------------------------------------------------
       progressBar.value = count;
       progressTxt.text = String("Exporting file - " + docName + " (" + count + " of " + files.length + ")");
       // Progress bar -----------------------------------------------------------------------------------
       var file = new File(pdfFolder + "/" + GetFileName(docName) + ".pdf");
       if (file.exists) {
        var increment = 1;
        while (file.exists) {
         file = new File(pdfFolder + "/" + GetFileName(docName) + "(" + increment++ + ").pdf");
        }
       }
    
       doc.exportFile(ExportFormat.pdfType, file, false, selectedPdfPreset);
       doc.close(SaveOptions.NO);
       count++;
      }
      catch(e) {}
    }
    // Progress bar -----------------------------------------------------------------------------------
    progressWin.close();
    // Progress bar -----------------------------------------------------------------------------------
    alert("Done.", gScriptName + " - " + gScriptVersion);
    }
    //---------------------------------------------------------------------------------------- ----------------------------------------------------------------
    function VerifyFolder(folder) {
    if (!folder.exists) {
      var folder = new Folder(folder.absoluteURI);
      var array1 = new Array();
      while (!folder.exists) {
       array1.push(folder);
       folder = new Folder(folder.path);
      }
      var array2 = new Array();
      while (array1.length > 0) {
       folder = array1.pop();
       if (folder.create()) {
        array2.push(folder);
       } else {
        while (array2.length > 0) {
         array2.pop.remove();
        }
        throw "Folder creation failed";
       }
      }
    }
    }
    //---------------------------------------------------------------------------------------- ----------------------------------------------------------------
    function GetFiles(theFolder) {
        var file,filesub;
            fileList = theFolder.getFiles();
        for (i = 0; i < fileList.length; i++) {
            file = fileList[i];
            if(file.name==".DS_Store") continue;
            if (file instanceof Folder) {
              fileLs = file.getFiles();
              alert(fileLs.length);
                for (j = 0; j < fileLs.length; j++) {
                    filesub = fileLs[j];
                    if (filesub instanceof File && filesub.name.match(/\.indd$/i)) {
                       files.push(filesub);
                    }
                }
            }
          else if (file instanceof File && file.name.match(/\.indd$/i)) {
           files.push(file);
          }
        }
        return files;
        }
    //---------------------------------------------------------------------------------------- ----------------------------------------------------------------
    function GetFileName(fileName) {
    var string = "";
    var result = fileName.lastIndexOf(".");
    if (result == -1) {
      string = fileName;
    }
    else {
      string = fileName.substr(0, result);
    }
    return string;
    }
    //---------------------------------------------------------------------------------------- ----------------------------------------------------------------
    function GetSettings() {
    var set = eval(app.extractLabel("Kas_" + gScriptName + gScriptVersion));
    if (set == undefined) {
      set = { selectedPdfPresetIndex : 0 };
    }
    return set;
    }
    
  • Lightroom for mobile: how to get the DNG file

    Hello

    Does anyone know how to download a file DNG from iPhone to PC?

    Thank you

    Lightroom Mobile synchronizes with a desktop version of Lightroom.

    When shooting with the camera in Lightroom, the images are synchronized on your Adobe account:

    www.Lightroom.adobe.com

    When you open a catalog on a Mac/PC, you can synchronize only one catalog. To do this, turn on sync:

    Now your images will be transferred to your computer.

Maybe you are looking for

  • Qosmio x 300 - 15r: after said windows recovery: worg/incorrect product key?

    Hi guys. Well, that's what happened. When I bought my laptop Qosmio x 300 - 15r, I did a recovery cd.But I lost the cd and burn another cd of a recovery. Now that I formatted my windows with the recovery cd, and I want to connect to give He the error

  • DV6-6135dx RAM upgrade: dv6-6135dx ram upgrade

    I have a Pavillion dv6-6135dx upgrade ram using a 2.4GHz/1.5GHz VISION A8 Technology from AMD with AMD Quad-Core A8 - 3500 M accelerated processor.  The specs say it supports an upgrade to 16 GB but all sets of ram I used fail after a short period of

  • Updates Office 2016

    I'm unable to install updates from Microsoft for Mac Office 2016. It doesn't install automatically updates and when I try to download the installer, even that does not work. Can someone help with this problem?

  • How to accompany all the symbols of currency last in SQL Server 2008 for Windows 7?

    Hello I need support for all currency symbols last in SQL Server 2008? Is there an update to this?

  • Ccmuser and remote Destinations

    Hi all I'm trying to get a unique ring to work with cell phones.  Currently, if the remote Destination profile and the remote Destination are implemented CCMadmin, after the display disabled button is activated all works well.  However, I allow users