Made to Order Software Corporation Logo

Implements

SWF Action
Action Category: 
Objects
Action Details: 
0
Action Identifier: 
44
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (o), pop 1 (i), pop i2 (o)
Action Operation: 
o1 := pop();
i2 := pop();
for (idx := 3; idx <= i2 + 2; ++idx) {
  oidx := pop();
}
o1 implements o3, o4, o5, ... , o(i2 +2)
Action Flash Version: 
7

This action declares an object as a sub-class of one or more interfaces. The syntax here is simple, the real implementation is quite unbelievably difficult to fathom.

The following shows you how you can add an implements of interfaces "A" and "B" to the class "C". Notice that class "C" needs to already exist. Here we assume that all classes are defined in the global scope.

	push data "_global"
	get variable
	push data "A"
	get member
	push data "_global"
	get variable
	push data "B"
	get member
	push data 2
	push data "_global"
	get variable
	push data "C"
	get member
	implements

This is useful to pass C as if it were of type A or B which some functions may expect. Frankly, in the old ActionScript scheme functions do not declare the type of their parameters, so it does not matter that much.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.