
12 About Flash Asset Xtra for Flash Player 8
To use a class in Flash ActionScript, you can import the package and then instantiate the
object, as follows:
// Import the package file.
import flash.filters.BlurFilter;
// Instantiate that object.
var tMyFilter:BlurFilter = new BlurFilter(...);
You can also use the full package name to instantiate an object and import the package in the
same line of code, as follows:
var tMyFilter:flash.filters.BlurFilter = new flash.filters.BlurFilter(...);
To use an ActionScript object in Director, you must use the full package name. The following
Lingo examples instantiate a BlurFilter class:
// Instantiate a global Flash object.
tMyFilter = newObject("flash.filters.BlurFilter", ...)
// Instantiate a Flash object within a Flash sprite.
tMyFilter = sprite("SWF").newObject("flash.filters.BlurFilter", ...)
However, if you know that a Flash sprite is playing a SWF file in which Flash has imported
the
flash.filters package, you can refer to the class directly in Lingo and JavaScript syntax,
as follows:
tMyFilter = sprite("SWF").newObject("BlurFilter", ...)
Publishing Flash content for Flash Asset
Xtra
The Flash Asset Xtra wraps Flash Player 8 and therefore supports the same backward
compatibility as Flash Player 8. Flash content published as any Flash Player version (Flash
Player 1-8) should play correctly in Flash Player 8.
If you want Flash Asset Xtra to properly execute and display content that contains Flash
Player 8 features, you must publish the Flash content as Version 8.
NOTE
You cannot refer to an ActionScript object directly with global Flash objects because the
global Flash Player instance cannot import package files.
Comentarios a estos manuales