Skip to main content
December 3, 2025
Question

Questioning about exportMedia() function javascript

  • December 3, 2025
  • 1 reply
  • 1470 views

Hey, I can't make work this function to import the sound of my .fla in .wav, if anyone know how to make it work. Usually the script seem to lauch the export but it never launch it in AME.

 

 

here is the developpers doc

document.exportMedia()

Availability

Adobe Animate2020.

Usage

document.exportMedia (fileURI, format, preset [,bTransparent [, bRunBatch [, sceneName [, startFrame [, endFrame]]]]]).

Parameters

fileURI: A string, expressed as a file:/// URI, that specifies the output file path (without file extension)

format: A string that specifies the format of the file to be exported

preset: A string that specifies the preset to be used.

bTransparent: Boolean that specifies whether to ignore the stage colour.It is Optional. Default valu is false.

bRunBatch: Boolean that specifies whether to run AME batch automatically.It is Optional. Default value is true.

sceneName: A string that specifies the name of the scene if only that specific scene should be exported.It is Optional. By default all scenes will be exported.

startFrame: An integer, index of start frame in specific scene. Applicable only when a specific scene is exported.It is Optional. By default it will be either first frame of timeline or the start frame of the timeline loop range if defined.

endFrame: An integer, index of end frame in specific scene. Applicable only when a specific scene is exported.It is Optional. By default it will be last frame of timeline or the end frame of the timeline loop range if defined.

Returns

nothing.

Description

Method;generates the required media from the document by making use of Adobe Media Encoder.

    1 reply

    kglad
    Community Expert
    Community Expert
    December 3, 2025

    you're creating a canvas document?

    you're using javascript in that document?

    you're trying to export that document to ame and expecting the javascription to do something?

    December 3, 2025

    I Try to automatize exports, so i try with a script to export a .wav 

    kglad
    Community Expert
    Community Expert
    December 3, 2025

    can you answer the 3 previous questions?