Chapter 3. C-Level Extensibility

 < Day Day Up > 

The C-level extensibility mechanism lets you implement Macromedia Flash extensibility files using a combination of JavaScript and custom C code. You define functions using C, bundle them in a dynamic linked library (DLL) or a shared library, save the library in the appropriate directory, and then call the functions from JavaScript using the Macromedia Flash JavaScript API.

For example, you might want to define a function that performs intense calculations more efficiently than JavaScript does, which improves performance, or when you want to create more advanced tools or effects.

This extensibility mechanism is a subset of the Macromedia Dreamweaver API. If you are familiar with that API, you might recognize the functions in this API. However, this API differs from the Dreamweaver API in the following ways:

  • This API does not contain all the commands in the Dreamweaver API.

  • All declarations of type wchar_t and char in the Dreamweaver API are implemented as unsigned short declarations in this API, to support Unicode when strings are passed.

  • The JSVal JS_BytesToValue() function in this API is not part of the Dreamweaver API.

  • The location where DLL or shared library files must be stored is different (see "Integrating C functions" on page 534).

     < Day Day Up > 


    Developing Extensions for Macromedia Flash 8
    Developing Extensions for Macromedia Flash 8
    ISBN: 032139416X
    EAN: 2147483647
    Year: 2005
    Pages: 81

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net