Made to Order Software Corporation Logo

method

Handling of Pop-up Windows by SimpleMenu

Feature

By default, SimpleMenu is not shown on pop-up windows. There is a flag in the SimpleMenu settings that can be unchecked to avoid this side effect. The pop-up capability is often detected when you open a new tab from the current window. It will depend on the browser and the link being clicked1.

Quick Fix

When the menu is only used by the administrators, it is possible to simply open a new tab and copy and paste the URL from the existing window with the missing menu to the ...

  • 1. We are trying to ameliorate the code, but it is not easy to make it work properly 100% of the time.

Set Target (dynamic)

SWF Action
Action Category: 
Movie
Action Details: 
(dynamic)
Action Identifier: 
32
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (s)
Action Operation: 
s1 := pop();
set_target(s1);
Action Flash Version: 
3

Pop one string from the stack. If the string is the empty string, then the next actions apply to the main movie. Otherwise it is the name of a Sprite1 and the followings actions apply to that Sprite only.

  • 1. Note that the name of a sprite is specified in the PlaceObject2 tag so as to be able to include the same DefineSprite tag multiple times and still be able to distinguish each instance.

String

SWF Action
Action Category: 
String and Characters
Action Details: 
0
Action Identifier: 
75
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (a), push 1 (s)
Action Operation: 
a1 := pop();
r := a1.toString();
push(r);
Action Flash Version: 
5

Pops one item and transform it into a string.

For strings, this action has no effect.

For numbers, it works as expected, it transforms them in a string (see the sprintf(3C) manual pages).

For a user defined object, the method named toString() is called.

This is similar to a Cast Object operation, although it is available in version 5 and obviously it only works for strings. It is most certainly preferable to use a Cast Object operation since version 7.

Set Target

SWF Action
Action Category: 
Movie
Action Details: 
(dynamic)
Action Identifier: 
139
Action Structure: 
string   f_target;
Action Length: 
-1 byte(s)
Action Stack: 
n.a.
Action Operation: 
set_target(f_target);
Action Flash Version: 
1

If the string f_target is the empty string, then the next actions apply to the main movie.

Otherwise it is the name of a Sprite and the followings actions apply to that Sprite only.

In order to use a dynamic name for the target, use Set Target (dynamic) instead.

Number

SWF Action
Action Category: 
Arithmetic
Action Details: 
0
Action Identifier: 
74
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (a), push 1 (n)
Action Operation: 
a1 := pop();
r := a1.valueOf();
push(a1);
Action Flash Version: 
5

Pop one item and transform it into a number (integer or floating point.) If a1 is already a number, it is simply pushed back on the stack.

For strings it works as you would expect (see the strtof(3C) manual pages).

For a user defined object, the method named valueOf() is called. You can declare that function on your own objects to get this action to retrieve the value.

New Method

SWF Action
Action Category: 
Objects
Action Details: 
0
Action Identifier: 
83
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 2 (s), pop 1 (i), pop i3 (a), push (o)
Action Operation: 
s1 := pop();
s2 := pop();
i3 := pop();
for(idx := 4; idx <= i3 + 3; ++idx) {
  aidx := pop();
}
o := new s2;
if (s1.length > 0) {
  o.s1(a4, a5, a6, ... , a(i3 + 3));
}
else {
   o.s2(a4, a5, a6, ... , a(i3 + 3));
}
push(o);
Action Flash Version: 
5

Pop the name of a method (can be the empty string), pop an object1 (created with the Declare Object,) pop the number of arguments, pop each argument, create a new object, then call the specified method (function s1 if defined, otherwise function s2) as the constructor function of the object, push the returned value on the stack. This allows for overloaded constructors as in C++.

  • 1. Yes. This contradicts the definition above. I will have to confirm which is correct.

Get URL2

SWF Action
Action Category: 
Movie
Action Details: 
0
Action Identifier: 
154
Action Structure: 
unsigned char    f_method;
Action Length: 
1 byte(s)
Action Stack: 
pop 2 (s)
Action Operation: 
s1 := pop();
s2 := pop();
s1.load(s2, f_method);
Action Flash Version: 
4

Pop two strings, the URL (s2) and the target name (s1).

All the usual HTML target names seem to be supported (_top, _blank, <frame name>, etc.) You can also use the special internal names _level0 to _level10. _level0 is the current movie. Other levels, I'm still not too sure how these can be used.

Get Property

SWF Action
Action Category: 
Properties
Action Details: 
0
Action Identifier: 
34
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (n), pop 1 (s), push 1 (a)
Action Operation: 
n1 := pop();
s2 := pop();
r := s2[n1];
push(r);
Action Flash Version: 
4

Query the property n1 of the object named s2 (a field in a structure if you wish), and push the result on the stack. Note that since version 5, it is preferable to use Get Member or Call Method when a corresponding variable or function member is available on the object.

The following is the list of currently accepted properties or fields for the Get Property and the Set Property actions. Note that the properties can be specified with either an integer (type 7, requires V5.0+) or a single precision floating point (type 1, V4.0 compatible). And since strings are automatically transformed in a value when required, one can use a string to represent the property number (type 0). It works with a double value, I even tested a Boolean and null and it works. Obviously it isn't a good idea to use these. The default should be a single precision float. Please, see the Push Data action for more information about data types.

WARNING: Adobe is trying to phase out this functionality. It is very likely not working in ABC code and it is not necessary since objects have member functions that can be used for the exact same purpose and it is a lot cleaner to use those instead.

 

Float Decimal Name Comments Version
0x00000000 0 x x position in pixels (not TWIPs!) 4
0x3F800000 1 y y position in pixels (not TWIPs!) 4
0x40000000 2 x scale horizontal scaling factor in percent (50 — NOT 0.5 — represents half the normal size!!!) 4
0x40400000 3 y scale vertical scaling factor in percent (50 — NOT 0.5 — represents half the normal size!!!) 4
0x40800000 4 current frame the very frame being played; one can query the root current frame using an empty string ("") as the name of the object; note that the first current frame is number 1 and the last is equal to the total number of frames; on the other hand, the Goto instruction expects a frame number from 0 to the number of frames - 1 4
0x40A00000 5 number of frames total number of frames in movie/sprite/thread 4
0x40C00000 6 alpha alpha value in percent (50 — NOT 0.5 — means half transparent) 4
0x40E00000 7 visibility whether the object is visible 4
0x41000000 8 width maximum width of the object (scales the object to that width) 4
0x41100000 9 height maximum height of the object (scales the object to that height) 4
0x41200000 10 rotation rotation angle in degrees 4
0x41300000 11 target return the name (full path) of an object; this can be viewed as a reference to that object 4
0x41400000 12 frames loaded number of frames already loaded 4
0x41500000 13 name name of the object 4
0x41600000 14 drop target object over which this object was last dropped 4
0x41700000 15 url URL linked to that object 4
0x41800000 16 high quality whether we are in high quality mode 4
0x41880000 17 show focus rectangle whether the focus rectangle is visible 4
0x41900000 18 sound buffer time position (or pointer) in the sound buffer; useful to synchronize the graphics to the music 4
0x41980000 19 quality what the quality is (0 - Low, 1 - Medium or 2 - High) 5
0x41A00000 20 x mouse current horizontal position of the mouse pointer within the Flash window 5
0x41A80000 21 y mouse current vertical position of the mouse pointer within the Flash window 5
0x46800000 16384 clone this flag has to do with the depth of sprites being duplicated 4

Declare Function (V7)

SWF Action
Action Category: 
Control
Action Details: 
(256 variables)
Action Identifier: 
142
Action Structure: 
string     f_name;
unsigned short   f_arg_count;
unsigned char   f_reg_count;
unsigned short   f_declare_function2_reserved : 7;
unsigned short   f_preload_global : 1;
unsigned short   f_preload_parent : 1;
unsigned short   f_preload_root : 1;
unsigned short   f_suppress_super : 1;
unsigned short   f_preload_super : 1;
unsigned short   f_suppress_arguments : 1;
unsigned short   f_preload_arguments : 1;
unsigned short   f_suppress_this : 1;
unsigned short   f_preload_this : 1;
swf_params   f_params[f_arg_count];
unsigned short   f_function_length;

WARNING: the preload/suppress flags are defined on a short and thus the bytes in a Flash file will look swapped.

Action Length: 
-1 byte(s)
Action Stack: 
n.a.
Action Operation: 
create a function on the current target
Action Flash Version: 
7

Declare a function which can later be called with the Call Function action or Call Method action (when defined as a function member.) The f_function_length1 defines the number of bytes that the function declaration uses after the header (i.e. the size of the actions defined in the function.) All the actions included in this block are part of the function body.

  • 1. A function is limited to 65535 bytes.

Call Method

SWF Action
Action Category: 
Control
Action Details: 
0
Action Identifier: 
82
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (s), pop 1 (o), pop 1 (i), pop i3 (a)
Action Operation: 
s1 := pop();
o2 := pop();
i3 := pop();
for(idx := 4; idx < i3 + 4; ++idx) {
  aidx := pop();
}
if(s1.length) {
  // call method s1
  r := o2.s1(a4, a5, a6...a(i3+3));
}
else {
  // call constructor o2
  r := o2(a4, a5, a6...a(i3+3));
}
push(r);
Action Flash Version: 
5

Pop the name of a method (can be the empty string), pop an object, pop the number of arguments, pop each argument, call the method (function) of the object, push the returned value on the stack.

When the string is empty, the constructor is called. This is used by the system right after a new operator was called and most of the time the return value is simply discarded.