What’s new in the JavaScript API



In Flash CS4, some objects, methods, and properties have been added while others have been removed. These changes are summarized below.

If you have not used the JavaScript API before, you might want to skip this section and go directly to JavaScript API objects).

New objects

The following objects are new in Flash CS4:

presetPanel object

presetItem object

swfPanel object

New methods and properties

The following methods and properties for existing objects are new in Flash CS4:

  • BitmapItem object

    • bitmapItem.exportToFile()

    • bitmapItem.fileLastModifiedDate

    • bitmapItem.originalCompressionType

    • bitmapItem.sourceFileExists

    • bitmapItem.sourceFileIsCurrent

    • bitmapItem.sourceFilePath

    • bitmapItem.useDeblocking

  • Contour object

    • contour.fill

  • Document object

    • document.addNewPrimitiveOval()

    • document.addNewPrimitiveRectangle()

    • document.exportPublishProfileString()

    • document.externalLibraryPath

    • document.importPublishProfileString()

    • document.libraryPath

    • document.pathURI

    • document.rotate3DSelection

    • document.setStageVanishingPoint()

    • document.setStageViewAngle()

    • document.sourcePath

    • document.translate3DCenter()

    • document.translate3DSelection()

  • Edge object

    • edge.cubicSegmentIndex

    • edge.stroke

  • Fill object

    • fill.bitmapIsClipped

    • fill.bitmapPath

  • flash object (fl)

    • fl.externalLibraryPath

    • fl.flexSDKPath

    • fl.isFontInstalled()

    • fl.libraryPath

    • fl.presetPanel

    • fl.sourcePath

    • fl.swfPanels

  • FLfile object

    • FLfile.platformPathToURI()

    • FLfile.uriToPlatformPath()

  • fontItem object

    • fontItem.bitmap

    • fontItem.bold

    • fontItem.embedVariantGlyphs

    • fontItem.font

    • fontItem.isDefineFont4Symbol

    • fontItem.italic

    • fontItem.size

  • Shape object

    • shape.getCubicSegmentPoints()

    • shape.members

    • shape.numCubicSegments

  • SoundItem object

    • soundItem.exportToFile()

    • soundItem.fileLastModifiedDate

    • soundItem.originalCompressionType

    • soundItem.sourceFileExists

    • soundItem.sourceFileIsCurrent

    • soundItem.sourceFilePath

  • Text object

    • text.embedVariantGlyphs

  • Timeline object

    • timeline.getGuidelines()

    • timeline.setGuidelines()

  • VideoItem object

    • videoItem.exportToFLV()

    • videoItem.fileLastModifiedDate

    • videoItem.sourceFileExists

    • videoItem.sourceFileIsCurrent

Other changes

The following property has a new supported value in Flash CS4:

The following objects, methods, and properties are no longer available in Flash CS4:

  • Project object

  • ProjectItem object

  • fl.openProject()

  • fl.closeProject()

  • fl.createProject()

  • fl.getProject()

  • Effect object

  • configureEffect()

  • executeEffect()

  • removeEffect()

  • fl.activeEffect

  • fl.effects

  • fl.enableImmediateUpdates()

  • fl.reloadEffects()