Determining which classes are automatically imported in Flash CS3 and Flash CS4

by Peter deHaan on October 25, 2008

in General

I’ve been checking out the Flash CS4 release lately and was reminded of some Flash Quick Starts I recently updated for the Flash Developer Center:

Creating a new Label instance
To create a new instance of the Label class using ActionScript, drag a copy of the component from the Components panel into your current Flash document’s library. Next, import the fl.controls.Label class using the import statement. This step is required because the component files are not implicitly imported, like the other flash.* packages. Once you import the Label class into your current document, you can create a new Label instance using the new operator. Finally, add the new Label instance to the display list using the addChild() method.
Note: To see which files are implicitly imported, see the following XML file: C:\Program Files\Adobe\Adobe Flash CS4\Common\Configuration\ActionScript 3.0\implicitImports.xml

So if you ever wanted to know why you do not need to import the flash.text.TextField class, but you do need to import the fl.controls.TextInput class, there you go.

To see exactly which classes get imported automatically, check out the following locations for Flash CS3 and Flash CS4:

  • Flash CS3: C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\ActionScript 3.0\implicitImports.xml
  • Flash CS4: C:\Program Files\Adobe\Adobe Flash CS4\Common\Configuration\ActionScript 3.0\implicitImports.xml

Flash CS3 implicitImports.xml:

<implicitImportsList>
  <implicitImport name="adobe.utils.*"/>
  <implicitImport name="flash.accessibility.*"/>
  <implicitImport name="flash.display.*"/>
  <implicitImport name="flash.errors.*"/>
  <implicitImport name="flash.events.*"/>
  <implicitImport name="flash.external.*"/>
  <implicitImport name="flash.filters.*"/>
  <implicitImport name="flash.geom.*"/>
  <implicitImport name="flash.media.*"/>
  <implicitImport name="flash.net.*"/>
  <implicitImport name="flash.printing.*"/>
  <implicitImport name="flash.system.*"/>
  <implicitImport name="flash.text.*"/>
  <implicitImport name="flash.ui.*"/>
  <implicitImport name="flash.utils.*"/>
  <implicitImport name="flash.xml.*"/>
</implicitImportsList>

Flash CS4 implicitImports.xml:

<implicitImportsList>
  <implicitImport name="adobe.utils.*"/>
  <implicitImport name="flash.accessibility.*"/>
  <implicitImport name="flash.data.*" swfVersion="0" airVersion="1.0"/>
  <implicitImport name="flash.desktop.*" swfVersion="10" airVersion="1.0"/>
  <implicitImport name="flash.display.*"/>
  <implicitImport name="flash.errors.*"/>
  <implicitImport name="flash.events.*"/>
  <implicitImport name="flash.external.*"/>
  <implicitImport name="flash.filesystem.*" swfVersion="0" airVersion="1.0"/>
  <implicitImport name="flash.filters.*"/>
  <implicitImport name="flash.geom.*"/>
  <implicitImport name="flash.html.*" swfVersion="0" airVersion="1.0"/>
  <implicitImport name="flash.media.*"/>
  <implicitImport name="flash.net.*"/>
  <implicitImport name="flash.printing.*"/>
  <implicitImport name="flash.profiler.*"/>
  <implicitImport name="flash.sampler.*" airVersion="0"/>
  <implicitImport name="flash.security.*" swfVersion="0" airVersion="1.0"/>
  <implicitImport name="flash.system.*"/>
  <implicitImport name="flash.text.*"/>
  <implicitImport name="flash.text.engine.*" swfVersion="10" airVersion="0"/>
  <implicitImport name="flash.ui.*"/>
  <implicitImport name="flash.utils.*"/>
  <implicitImport name="flash.xml.*"/>
</implicitImportsList>

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Previous post:

Next post: