From Gnash Project Wiki

Jump to: navigation, search

When placing a character on stage using PlaceObject* tags you get an instance. Not all instances can be acted on by ActionScrip. We call those that can "ScriptableCharacters".


Scriptable instances

When placing an instance of a scriptable character w/out specifying a name in the PlaceObject2 tag, the player will syntetize a name for it in the form 'instance#'.

Heres a list of characters whose instances can be scriptable:

  • MovieClip/Sprite
  • Dynamic text (edit_text_character - defined by tag 37)
  • Buttons
  • VideoStream

Non-scriptable instances

When placing an instance of a character which is NOT scriptable, any name given in the PlaceObject2 tag will refere to the parent instead (the instance that will contain the newly placed instance).

Here's a list of characters whose instances can NOT be scriptable

  • Shape
  • Morph
  • Static text (text_character - defined by tag 11 or 33)

Other characters (that we still dunno about)

List here other definable chars (characters for which a definition tag exist) for which we dunno wheter they are AS referenciable or not.

What's special about Scriptable characters

Scriptable characters are likely the only ones that need a _target member, and the only ones what would need to be managed by a GC, and the only one which need to derive from as_object.