actionScript Element

The actionScript element allows writing ActionScript code in your ActiveSWF project. ActiveSWF ActionScript compiler supports ActionScript 2.0 for Flash players up to Flash Player 10.0.

Syntax

<actionScript [event="eventType"] [src="some_script.as"] [id="scriptObjectId"]>
   <![CDATA[ActionScript code goes here...]]>
</actionScript>

Attributes

Name

Description

Value type

Optional

Default Value

event

Event that triggers this script. Actual only when action is owned by button element.

event

yes

press

src

Local path or HTTP url to the location of the external ActionScript module.
If both src attribute and CDATA are specified, CDATA section content is ignored.

string

yes

-

id

Idebtifier of ActionScript object. May be useful for checking errors in embedded ActionScript.

id

yes

-

Parent Elements

button element, actions collection

Notes

actionScript tag is available since ActiveSWF version 2.0

See Also

XML Schema Reference