Difference between revisions of "Category:Symbols"

From Organic Design wiki
(Modularise common code so it can be implimented easily in macromedia env)
m
Line 6: Line 6:
  
 
;Usage
 
;Usage
 +
A global function has been added allowing symbols to be created from the pre-compiled library if they exist, or using their creation function if not.
 
:<tt>createSymbol( contextRef, symbolName, instanceName, layer, [parameters...] )</tt>
 
:<tt>createSymbol( contextRef, symbolName, instanceName, layer, [parameters...] )</tt>
  

Revision as of 22:06, 24 March 2006

The items in this category are all actionscript symbols imported using the #include syntax from within the ActionScript code.

These symbol scripts should be in the form of functions which extend and accept the same parameters as the createEmptyMovieClip() method.


Usage

A global function has been added allowing symbols to be created from the pre-compiled library if they exist, or using their creation function if not.

createSymbol( contextRef, symbolName, instanceName, layer, [parameters...] )


Notes
  • The name of the creation function should be create.symbolName
  • The function can have extra parameters after name, layer
  • The function should return a reference to the newly created symbol
Common code supplied by swf.php and swf.pl at compile time.

If you want to impliment thses scripts in the Macromedia environment, you'll need to include this code at the beginning of your script.

+compile.as

Pages in category "Symbols"

The following 8 pages are in this category, out of 8 total.