Classes

The Java API for AIR native extensions defines one abstract class, FREContext, that allows you to define the extension context. The API also defines several concrete classes, FREObject and its subclasses, which represent objects shared between the Java and ActionScript sides of a native extension. An extension must implement at least one concrete subclass of FREContext.

FREArray

Package:

com.adobe.fre

Inheritance

Runtime version

AIR 3

The FREArray class represents an ActionScript Array or Vector object.

Method

Description

public static FREArray newArray (String classname, int numElements, boolean fixed)

Creates an ActionScript Vector array object.

public static FREArray newArray (int numElements)

Creates an ActionScript Array object.

public long getLength()

Gets the number of elements in the array.

public void setLength( long length )

Changes the array length.

public FREObject getObjectAt( long index )

Gets the object at the specified index.

public void setObjectAt( long index, FREObject value )

Puts an object into the array at the specified index.

You can work with an FREArray object using the methods defined in the FREArray class, as well as the methods defined in the FREObject class (which is the FREArray’s super class). Use the FREObject getProperty() and setProperty() methods to access or modify the ActionScript-defined properties of the Array and Vector classes. Use callMethod() to call the ActionScript-defined methods.

Method details

newArray

public static FREArray newArray (String classname, int numElements, boolean fixed)

Creates an ActionScript Vector array object.

Parameters:

classname

The fully-qualified name of the ActionScript class of the members of the Vector array.

numElements

The number of elements to allocate for the array.

fixed

If true, the vector length cannot be changed.

Returns:

FREArray

An FREArray object associated with an ActionScript Vector array object.

Example:

FREArray vector = FREArray.newArray( "flash.geom.Matrix3D", 4, true );

newArray

public static FREArray newArray (int numElements)

Creates an ActionScript Array object.

Parameters:

numElements

The number of elements to allocate for the array. The elements are undefined.

Returns:

FREArray

An FREArray object associated with an ActionScript Array object.

Example:

FREArray array = FREArray.newArray( 4 );

getLength

public long getLength()

Gets the number of elements in the array.

Returns:

long

The length of the array.

Example:

long length = asArray.getLength();

setLength

public void setLength( long length )

Changes the length of this array. If the new length is shorter than the current length, the array is truncated.

Parameters:

length

The new length for the array.

Example:

asArray.setLength( 4 );

getObjectAt

public FREObject getObjectAt( long index )

Gets an element from the array.

Parameters:

index

The position of the element to retrieve. (0-based)

Returns:

FREObject

The FREObject instance associated with the ActionScript object in the array.

Example:

FREObject element = asArray.getObjectAt( 2 );

setObjectAt

public void setObjectAt( long index, FREObject value )

Puts an object into the array at the specified index.

Parameters:

index

The position in the array at which to put the object. (0-based)

value

An FREObject containing the primitive value or ActionScript object to insert.

Example:

FREObject stringElement = FREObject.newObject("String element value"); 
FREArray asVector = FREArray.newArray( "String", 1, false ); 
asVector.setObjectAt( 0, stringElement );

FREByteArray

Package:

com.adobe.fre

Inheritance

Runtime version

AIR 3

The FREByteArray class represents an ActionScript ByteArray object.

Method

Description

public static FREByteArray newByteArray()

Creates an empty ActionScript ByteArray object.

public long getLength()

Returns the length of the byte array in bytes.

public ByteBuffer getBytes()

Gets the contents of the ActionScript ByteArray object as a Java ByteBuffer.

public void acquire()

Acquires a lock on the ActionScript object.

public void release()

Releases a lock on the ActionScript object.

Access the data in the ByteArray object by calling getBytes(). Before accessing the byte data in an array referenced by ActionScript, you must call acquire() to lock the object. After you are done accessing or modifying the data, call release() to release the lock.

While you have a lock on the array, you can modify the existing data in the buffer, but you cannot change the size of the array. To modify the array size, release the lock and change the ActionScript-defined length property using the setProperty() method (defined by the FREObject super class). You can use the getProperty(), setProperty(), and callMethod() functions to access any of the properties and methods defined by the ActionScript ByteArray class.

Method details

newByteArray

public static FREByteArray newByteArray()

Creates an empty ActionScript ByteArray object and its associated Java FREByteArray instance.

Returns:

FREByteArray

The FREByteArray object representing an ActionScript ByteArray.

Example:

FREBytearray bytearray = FREByteArray.newByteArray();

acquire

public void acquire()

Acquires a lock on this object so that the data cannot be modified or disposed by the runtime or application code while you are accessing it. When you have a lock, you cannot read or modify any of the ActionScript-defined properties of the object.

getLength

public long getLength()

Returns the number of bytes in the byte array. You must call this object’s acquire() function before calling this method.

Returns:

long

The number of bytes in the byte array.

getBytes

public ByteBuffer getBytes()

Returns the byte data in the array. You must call acquire() to lock the object before calling this method. The buffer is only valid while you have a lock.

java.nio.ByteBuffer

The data in the byte array.

Example:

FREByteArray bytearray = FREByteArray.newByteArray(); 
bytearray.acquire(); 
ByteBuffer bytes = bytearray.getBytes(); 
bytes.putFloat( 16.3 ); 
bytearray.release();

release

public void release()

Releases the lock obtained by acquire(). You must release the lock before accessing any FREByteArray properties other than the data returned by getBytes().

FREBitmapData

Package:

com.adobe.fre

Inheritance

Runtime version

AIR 3

The FREBitmapData class represents an ActionScript BitmapData object.

MethodsMethods

Method

Description

public static FREBitmapData newBitmapData (int width, int height, boolean transparent, Byte[] fillColor)

Creates an ActionScript BitmapData object.

public int getWidth()

Gets the bitmap width.

public int getHeight()

Gets the bitmap height.

public boolean hasAlpha()

Indicates whether the bitmap has an alpha channel.

public boolean isPremultiplied()

Indicates whether the bitmap colors are already multiplied by the alpha value.

public int getLineStride32()

Gets the number of 32-bit values per bitmap scan line.

ByteBuffer getBits()

Gets the bitmap pixels.

public void acquire()

Acquires a lock on the ActionScript object.

void invalidateRect( int x, int y, int width, int height )

Marks a rectangle within the bitmap as in need of update.

public void release()

Releases a lock on the ActionScript object.

Added in AIR 3.1:

public boolean isInvertedY

Indicates the order in which the rows of image data are stored.

Most properties of an FREBitmapData object are read only. For example, you cannot change the width or height of a bitmap. (To change these properties, create a new FREBitmapData object with the desired dimensions.) You can, however, access and modify an existing bitmap’s pixel values using the getBits() method. You can also access the ActionScript-defined properties of the BitmapData object using the FREObject getProperty() and setProperty() methods and call the object’s ActionScript methods with the FREObject callMethod() function.

Before calling getBits() on FREBitmapData object that is referenced by ActionScript code, lock the bitmap using the acquire() method. This prevents the AIR runtime or the application from modifying or disposing the bitmap object while your function is running (possibly in another thread). After modifying the bitmap, call invalidateRect() to notify the runtime that the bitmap has changed and release the lock with release(). You cannot use ActionScript-defined properties and methods while you have acquired a lock.

The AIR runtime defines pixel data as a 32-bit value containing three color components, plus alpha in the order: ARGB. Each component within the data is one byte. Valid bitmap data is stored with the color components premultiplied by the alpha component. (However, it is possible to receive a technically invalid BitmapData in which the colors have not been premultiplied. For example, rendering bitmaps with the Context3D class can produce such an invalid bitmap. In this case, the isPremultiplied() method still reports true.)

Method details

newBitmapData

public static FREBitmapData newBitmapData (int width, int height, boolean transparent, Byte[] fillColor)

Creates an FREBitmapData object, which can be returned to the ActionScript side of the extension as a BitmapData instance.

Parameters:

width

The width in pixels. In AIR 3+, there is no arbitrary limit to the width or height of a bitmap (other than the maximum value of an ActionScript signed integer). However, practical memory limits still apply. Bitmap data occupies 32 bits of memory per pixel.

height

The height in pixels.

transparent

Specifies whether this bitmap uses the alpha channel. This parameter corresponds to the hasTransparency() method of the created FREBitmapData and the transparent property of the ActionScript BitmapData object.

fillColor

The 32-bit, ARGB color value with which to fill the new bitmap. If the transparent parameter is false, the alpha component of the color is ignored.

Returns:

FREBitmapData

The FREBitmapData object associated with an ActionScript BitmapData object.

Example:

Byte[] fillColor = {0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf}; 
FREBitmapData bitmap = FREBitmapData.newBitmapData( 320, 200, true, fillColor );

getWidth

public int getWidth()

Returns the width, in pixels, of the bitmap. This value corresponds to the width property of the ActionScript BitmapData class object. You must call this object’s acquire() function before calling this method.

Returns:

int

the number of pixels across the horizontal axis of the bitmap.

getHeight

public int getHeight()

The height, in pixels, of the bitmap. This value corresponds to the height property of the ActionScript BitmapData class object. You must call this object’s acquire() function before calling this method.

Returns:

int

The number of pixels across the vertical axis of the bitmap.

hasAlpha

public boolean hasAlpha()

Indicates whether the bitmap supports per-pixel transparency. This value corresponds to the transparent property of the ActionScript BitmapData class object. If the value is true, then the alpha component of the pixel color values is used. If the value is false, the alpha component of the color is not used. You must call this object’s acquire() function before calling this method.

Returns:

boolean

true if the bitmap uses an alpha channel.

isPremultiplied

public boolean isPremultiplied()

Indicates whether the bitmap pixels are stored as premultiplied color values. A true value means the red, green, and blue components of a pixel color are premultiplied by the alpha component. ActionScript BitmapData objects are currently always premultiplied (but future changes to the runtime could make it possible to create a bitmap that is not premultiplied). For more information about premultiplied color values, see BitmapData.getPixel() in the ActionScript 3.0 Reference for the Adobe Flash Platform. You must call this object’s acquire() function before calling this method.

Returns:

boolean

true if the pixel color components are already multiplied by the alpha component.

getLineStride32

public int getLineStride32()

Specifies the amount of data in each horizontal line of the bitmap. Use this value with the byte array returned by getBits() to parse the image. For example, the position of the pixel immediately below a pixel located at position n in the byte array is n + getLineStride32(). You must call this object’s acquire() function before calling this method.

Returns:

int

The amount of data for each horizontal line in the image.

Example:

The following example moves the position of the byte array containing the pixels colors to the beginning of the third line in a bitmap:

Byte[] fillColor = {0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf}; 
FREBitmapData bitmap = FREBitmapData.newBitmapData( 320, 200, true, fillColor ); 
int lineStride = bitmap.getLineStride32(); 
bitmap.acquire(); 
ByteBuffer pixels = bitmap.getBits(); 
pixels.position( lineStride * 3 ); 
//do something with the image data 
bitmap.release();

getBits

ByteBuffer getBits()

Returns an array of pixel color values. You must call acquire() before using this method and call release() when you are done modifying the data. If you make changes to the pixel data, call invalidateRect() to notify the AIR runtime that the bitmap has changed. Otherwise, the displayed graphics are not updated.

Returns:

java.nio.ByteBuffer

The image data.

Example:

FREBitmapData bitmap = FREBitmapData.newBitmapData( 320, 200, true, fillColor ); 
bitmap.acquire(); 
ByteBuffer pixels = bitmap.getBits(); 
//do something with the image data 
bitmap.release();

acquire

public void acquire()

Acquires a lock on the image so that the data cannot be modified or disposed by the runtime or application code while you are accessing it. You only need to acquire a lock for bitmaps passed to the function from the ActionScript side of the extension.

While you have a lock, you can only access the data returned by the getBits() function. Accessing or attempting to modify the other properties of the FREBitmapData results in an exception.

invalidateRect

void invalidateRect( int x, int y, int width, int height )

Notifies the runtime that you have changed a region of the image. The screen display of a bitmap data object is not updated unless you call this method. You must call this object’s acquire() function before calling this method.

Parameters:

x

The upper-left corner of the rectangle to invalidate.

y

the upper-left corner of the rectangle to invalidate.

width

the width of the rectangle to invalidate.

height

the height of the rectangle to invalidate.

release

public void release()

Releases the lock obtained by acquire(). You must release the lock before accessing any bitmap properties other than the pixel data returned by getBits().

isInvertedY

public boolean isInvertedY()

Indicates the order in which the rows of image data are stored. If true, then the last row of image data appears first in the buffer returned by the getBits() method. Images on Android are normally stored starting with the first row of data, so this property is typically false on the Android platform.

Added in AIR 3.1.

FREContext

Package:

com.adobe.fre

Inheritance

java.lang.Object

Runtime version

AIR 3

The FREContext class represents a Java execution context defined by an AIR native extension.

Method

Description

public abstract Map<String,FREFunction> getFunctions()

Called by the AIR runtime to discover the functions provided by this context.

public FREObject getActionScriptData()

Gets any data in the actionScriptData property of the ActionScript ExtensionContext object associated with this FREContext.

public void setActionScriptData( FREObject )

Sets the actionScriptData property of the ActionScript ExtensionContext object associated with this FREContext.

public abstract void dispose()

Called by the AIR runtime when the ActionScript ExtensionContext object associated with this FREContext instance is disposed.

public android.app.Activity getActivity()

Returns the application Activity.

public native int getResourceId( String resourceString )

Returns the ID for an Android resource.

public void dispatchStatusEventAsync( String code, String level )

Dispatches a StatusEvent to the application via the ExtensionContext object associated with this FREContext instance.

Your extension must define one or more concrete subclasses of the FREContext class. The createContext() method in your implementation of the FREExtension class creates instances of these classes when the ActionScript side of the extension invokes the ExtensionContext.createExtensionContext() method.

You can organize the contexts provided by an extension in various ways. For example, you could create a single instance of a context class that persists for the lifetime of the application. Alternately, you could create a context class that is closely bound to a set of native objects with limited lifespan. You could then create a separate context instance for each set of these objects and dispose the context instance along with the associated native objects.

Note:

If you have called the acquire() method of any FREByteArray or FREBitmapData object, then you cannot call the methods defined by the FREObject class of any object.

Method details

getFunctions

public abstract Map<String,FREFunction> getFunctions()

Implement this function to return a Java Map instance that contains all the functions exposed by the context. The map key value is used to look up the FREFunction object when a function is invoked.

Returns:

Map<String, FREFunction>

A Map object containing a string key value and a corresponding FREFunction object. The AIR runtime uses this Map object to look up the function to invoke when the ActionScript part of the extension invokes the call() method of the ExtensionContext class.

Example:

The following getFunctions() example creates a Java HashMap containing three hypothetical functions. You can invoke these functions in the ActionScript code of the extension by passing the string, “negate”, “invert”, or “reverse” to the ExtensionContext call() method.

@Override 
    public Map<String, FREFunction> getFunctions() { 
        Map<String, FREFunction> functionMap = new HashMap<String, FREFunction>(); 
        functionMap.put( "negate", new NegateFunction() ); 
        functionMap.put( "invert", new InvertFunction() ); 
        functionMap.put( "reverse", new ReverseFunction() ); 
        return functionMap; 
}

getActionScriptData

public FREObject getActionScriptData()

Gets the ActionScript data object associated with this context. This data object can be read and modified by both Java and ActionScript code.

Returns:

FREObject

An FREObject representing the data object.

Example:

FREObject data = context.getActionScriptData();

setActionScriptData

public void setActionScriptData( FREObject object )

Sets the ActionScript data object associated with this context. This data object can be read and modified by both Java and ActionScript code.

Parameters:

value

An FREObject containing a primitive value or an ActionScript object.

Example:

FREObject data = FREObject.newObject( "A string" ); 
context.setActionScriptData( data );

getActivity

public android.app.Activity getActivity()

Gets a reference to the application Activity object. This reference is required by many APIs in the Android SDK.

Returns:

android.app.Activity

The Activity object of the AIR application.

Example:

Activity activity = context.getActivity();

getResourceID

public native int getResourceId( String resourceString )

Looks up the resource ID of a native Android resource.

Specify the string identifying the resource in the resourceString parameter. Follows the naming conventions for resource access on Android. For example a resource that you would access in Android native code as:

R.string.my_string

would have the following resourceString:

"string.my_string"

This method will throw Resources.NotFoundException if the resource specified by resourceString cannot be found.

Parameters:

resourceString

A string identifying the Android resource.

Returns:

int

The ID of the Android resource.

Example:

int myResourceID = context.getResourceID( "string.my_string” );

dispatchStatusEventAsync

public void dispatchStatusEventAsync( String code, String level )

Call this function to dispatch an ActionScript StatusEvent event. The target of the event is the ActionScript ExtensionContext instance that the runtime associated with this FREContext object.

Typically, the events this function dispatches are asynchronous. For example, an extension method can start another thread to perform some task. When the task in the other thread completes, that thread calls dispatchStatusEventAsync() to inform the ActionScript ExtensionContext instance.

Note:

The dispatchStatusEventAsync() function is the only Java API that you can call from any thread of your native implementation.

The runtime does not dispatch the event in the following cases:

  • The runtime has already disposed of the ExtensionContext instance.

  • The runtime is in the process of disposing of the ExtensionContext instance.

  • The ExtensionContext instance has no references. It is eligible for the runtime garbage collector to dispose of it.

Set the code and level parameters to any string values. These values can be anything you want, but coordinate them with the ActionScript side of the extension.

Parameters:

code

A description of the status being reported.

level

The extension-defined category of message.

Example:

context.dispatchStatusEventAsync( "Processing finished", "progress" );

dispose

public abstract void dispose()

Called by the AIR runtime when an associated ActionScript ExtensionContext object is disposed and this FREContext object has no other references. You can implement this method to clean up context resources.

Class Example

The following example creates a subclass of FREContext to return context information:

package com.example; 
import java.util.HashMap; 
import java.util.Map; 
import android.util.Log; 
import com.adobe.fre.FREContext; 
import com.adobe.fre.FREFunction; 
 
public class DataExchangeContext extends FREContext { 
    private static final String CTX_NAME = "DataExchangeContext"; 
    private String tag; 
 
    public DataExchangeContext( String extensionName ) { 
        tag = extensionName + "." + CTX_NAME; 
        Log.i(tag, "Creating context"); 
    } 
    @Override 
    public void dispose() { 
        Log.i(tag, "Dispose context"); 
    } 
    @Override 
    public Map<String, FREFunction> getFunctions() { 
     Log.i(tag, "Creating function Map"); 
     Map<String, FREFunction> functionMap = new HashMap<String, FREFunction>(); 
     functionMap.put( NegateBooleanFunction.NAME, new NegateBooleanFunction() ); 
     functionMap.put( InvertBitmapDataFunction.NAME, new InvertBitmapDataFunction() ); 
     functionMap.put( InvertByteArrayFunction.NAME, new InvertByteArrayFunction() ); 
     functionMap.put( InvertNumberFunction.NAME, new InvertNumberFunction() ); 
     functionMap.put( ReverseArrayFunction.NAME, new ReverseArrayFunction() ); 
     functionMap.put( ReverseStringFunction.NAME, new ReverseStringFunction() ); 
     functionMap.put( ReverseVectorFunction.NAME, new ReverseVectorFunction() ); 
 
    return functionMap; 
    } 
 
    public String getIdentifier() 
    { 
        return tag; 
    } 
}

FREObject

Package:

com.adobe.fre

Inheritance

java.lang.Object

Runtime version

AIR 3

The FREObject class represents an ActionScript object to Java code.

MethodsMethods

Method

Description

public static FREObject newObject( int value)

Creates an FREObject containing a 32-bit signed integer value.

public static FREObject newObject( double value)

Creates an FREObject that contains a Java double value, which corresponds to the ActionScript Number type.

public static FREObject newObject( boolean value)

Creates an FREObject that contains a boolean value.

public static FREObject newObject( String value)

Creates an FREObject that contains a string value.

public int getAsInt()

Accesses the data in the FREObject as a Java int value.

public double getAsDouble()

Accesses the data in the FREObject as a Java double value.

public Boolean getAsBool()

Accesses the data in the FREObject as a Java boolean value.

public String getAsString()

Accesses the data in the FREObject as a Java String value.

public static native FREObject newObject( String className, FREObject[] constructorArgs )

Creates an FREObject referencing a new instance of an ActionScript class.

public FREObject getProperty( String propertyName )

Gets the value of an ActionScript property.

public void setProperty( String propertyName, FREObject propertyValue )

Sets the value of an ActionScript property.

public FREObject callMethod( String methodName, FREObject[] methodArgs )

Invokes an ActionScript method.

Use FREObjects to share data between the Java and the ActionScript code in an extension. The runtime associates an FREObject variable with the corresponding ActionScript object. You can access the properties and methods of the ActionScript object associated with an FREObject using the getProperty(), setProperty(), and callMethod() functions.

An FREObject is a general purpose object. It can represent a primitive value or a class type. If you access the object in a way that is incompatible with the data in the object, an FRETypeMismatchException is thrown.

FREObjects can be used to represent any ActionScript object. In addition, the subclasses FREArray, FREBitmapData, and FREByteArray provide additional methods for handling specific kinds of data.

You can pass data from Java to ActionScript code by returning an FREObject from the call() method of an FREFunction instance. The ActionScript code receives the data as an ActionScript Object, which can be cast to the appropriate primitive or class type. You can also set the properties and call the methods of an ActionScript object for which you have an FREObject reference. When setting a property or the parameter of an ActionScript method, you use an FREObject.

You can pass data from ActionScript to Java code as the parameter to the call() method of an FREFunction instance. The argument is encapsulated in an FREObject instance when the call() method is invoked. If the argument is a reference to an ActionScript object, the Java code can read the property values and call the methods of that object. These properties and function return values are provided to your Java code as FREObjects. You can use the FREObject methods to access the data as Java types and, when appropriate, downcast the object to an FREObject subclass such as FREBitmapData.

Method details

newObject( int )

public static FREObject newObject( int value )

Creates an FREObject containing a 32-bit signed integer value.

Parameters:

value

A signed integer.

Returns:

FREObject

An FREObject.

Example:

FREObject value = FREObject.newObject( 4 );

newObject( double )

public static FREObject newObject( double value )

Creates an FREObject that contains a Java double value, which corresponds to the ActionScript Number type.

Parameters:

value

A double.

Returns:

FREObject

An FREObject.

Example:

FREObject value = FREObject.newObject( 3.14156d );

newObject( boolean )

public static FREObject newObject( boolean value )

Creates an FREObject that contains a boolean value.

Parameters:

value

true or false.

Returns:

FREObject

An FREObject.

Example:

FREObject value = FREObject.newObject( true );

newObject( String )

public static FREObject newObject( String value )

Creates an FREObject that contains a string value.

Parameters:

value

A string.

Returns:

FREObject

An FREObject.

Example:

FREObject value = FREObject.newObject( "A string value" );

getAsInt

public int getAsInt()

Accesses the data in the FREObject as a Java int value.

Returns:

int

The integer value.

Example:

int value = FREObject.getAsInt();

getAsDouble

public double getAsDouble()

Accesses the data in the FREObject as a Java double value.

Returns:

double

The double value.

Example:

double value = FREObject.getAsInt();

getAsBool

public Boolean getAsBool()

Accesses the data in the FREObject as a Java boolean value.

Returns:

boolean

true or false

Example:

boolean value = FREObject.getAsInt();

getAsString

public String getAsString()

Accesses the data in the FREObject as a Java String value.

Returns:

String

The string value.

Example:

String value = FREObject.getAsInt();

newObject( String, FREObject[] )

public static native FREObject newObject( String className, FREObject[] constructorArgs )

Creates an FREObject referencing a new instance of an ActionScript class.

Parameters:

className

The fully-qualified ActionScript class name.

constructorArgs

The arguments to pass to the ActionScript class constructor as an array of FREObjects. Set to null if the class constructor has no parameters.

Returns:

FREObject

An FREObject representing a new instance of an ActionScript class.

Example:

FREObject matrix = FREObject.newObject( "flash.geom.Matrix", null );

getProperty

public FREObject getProperty( String propertyName )

Gets the value of an ActionScript property.

Parameters:

propertyName

The name of the property to access.

Returns:

FREObject

The value of the specified property as an FREObject.

Example:

FREObject isDir = fileobject.getProperty( "isDirectory" );

setProperty

public void setProperty( String propertyName, FREObject propertyValue )

Sets the value of an ActionScript property.

Parameters:

propertyName

The name of the property to set.

propertyValue

An FREObject containing the new property value.

Example:

fileobject.setProperty( "url", FREObject.newObject( "app://file.txt" ) );

callMethod

public FREObject callMethod( String methodName, FREObject[] methodArgs )

Invokes an ActionScript method.

Parameters:

methodName

The name of the method to invoke.

methodArgs

An array of FREObjects containing the arguments for the method in the order in which the method parameters are declared.

Returns:

FREObject

The method result. If the ActionScript method returns an Array, Vector, or BitmapData object, you can cast the result to an appropriate subclass of FREObject.

Example:

FREObject[] args = new FREObject[1] 
args[0] = FREObject.newObject( "assets/image.jpg" ); 
FREObject imageFile = directoryobject.callMethod( "resolvePath", args );
Adobe logo

Sign in to your account