Made to Order Software Corporation Logo

include

Insert Node Usage

Syntax

The Insert node tag syntax is:

   [node:<name of node> <parameters>]

Name of node

The <name of node> can either be

  • The name of the node, i.e. it's URL without the protocol and domain1, or
  • The node identifier (the number you see in your URL when you edit the node), or
  • An asterisk (*) in which case the current node applies2
    • 1. For instance, to insert this very node, I would use the name doc_insert_node_usage.
    • 2. The asterisk is useful to repeat something from the node in a block. This could be the title of the node or a CCK field. I would suggest ...

Coming back at the right place when adding/editing/deleting Comments

It is now possible (See #418004: Comments included --> Back after reply) to have Drupal send you back to the page that inserts the node instead of the inserted node. Say you create node A and B. You include node A inside node B. You are looking at node B now. You decide to add a comment on node A (that you see from within node B.) Click on the Add new comment link, write the comment and click Save. At that point, you probably want to come back to node B instead of node A.

This feature is only necessary if you have the links at the bottom of the node and allow comments to show up.

The ...

Upgrading from version 1.0/1.1 to 1.2 or newer (or -dev) for Drupal 6.x users

I changed the name of the module back to InsertNode (although I did not want to, I did not want to jeopardize the Drupal 5 version... which would probably have been fine, but well...)

So, the newer version of the D6 module is again called InsertNode.

To upgrade you will want to keep the other version running until you get the new version as the replacement (although you can manage your site the way you'd like this procedure let you switch from the previous version to the new version without having to turn off your site for a little while.)

  1. Extract the new version, it adds InsertNode ...

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.

Goto Expression

SWF Action
Action Category: 
Movie
Action Details: 
0
Action Identifier: 
159
Action Structure: 
unsigned char    f_play;
Action Length: 
1 byte(s)
Action Stack: 
pop 1 (a)
Action Operation: 
a1 := pop();
goto(a1);
Action Flash Version: 
4

Pop a value or a string and jump to that frame. Numerical frame numbers start at 0 and go up to the number of frames - 1. When a string is specified, it can include a path to a sprite as in:

/Test:55

When f_play is ON (1), it wakes up that sprite (movie, thread). Otherwise, the frame is shown in stop mode (it does not go past the Show Frame tag.) This action can be used to playback a sprite from another given a set of events.

Get Variable

SWF Action
Action Category: 
Variables
Action Details: 
0
Action Identifier: 
28
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (s), push 1 (a)
Action Operation: 
s1 := pop();
r := *s1;
push(r);
Action Flash Version: 
4

Pop one string, search for a variable of that name, and push its value on the stack. This action first checks for local variables in the current function. If there isn't such a variable, or the execution is not in a function, then the corresponding global variable is read.

The variable name can include sprite names separated by slashes and finished by a colon as in. Only global variables are accessible in this way.

Example:

Get Member

SWF Action
Action Category: 
Objects
Action Details: 
0
Action Identifier: 
78
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (a), pop 1 (o), push 1 (a)
Action Operation: 
a1 := pop();
o2 := pop();
r := o2[a1];
push(r);
Action Flash Version: 
5

Pop one string or an integer (member name), pop an object reference, define the value of that object member and push the result back on the stack.

Objects include some special members such as:

DefineSceneAndFrameData

Tag Info
Tag Number: 
86
Tag Type: 
Define
Tag Flash Version: 
9
Brief Description: 

Define raw data for scenes and frames.

Tag Structure: 
struct swf_definesceneandframedata {
	swf_tag				f_tag;		/* 86 */
	unsigned char			f_data[tag size];
};

This tag is used to define some raw data for a scene and frame. It is often used to include XML files in Flash animations.

f_data is an array of bytes.

DoABCDefine

Tag Info
Tag Number: 
72
Tag Type: 
Action
Tag Flash Version: 
9
Brief Description: 

New container tag for ActionScripts under SWF 9. Includes only actions. This tag is not defined in the official Flash documentation.

Tag Structure: 
struct swf_doabc {
	swf_tag			f_tag;		/* 72 or 82 */
	if(f_tag == DoABC) {
		unsigned long	f_action_flags;
		string		f_action_name;
	}
	swf_action3		f_action_record[variable];
};

*the version specified here is the version in which the tags appeared—however, actions of higher versions can be used with older version tags and thus this version doesn't indicate the version of all the actions used in this tag

The DoABC and DoABCDefine are available since version 9. These are similar to the old DoAction and DoInitAction, yet the actions use a way different declaration scheme and they include flags and a name. This new scheme helps greatly in simplifying the definitions of ECMAScript classes and accelerate the access to the code tremendously.

Note that the ...

DefineScalingGrid

Tag Info
Tag Number: 
78
Tag Type: 
Define
Tag Flash Version: 
8
Brief Description: 

Define scale factors for a window, a button, or other similar objects.

Tag Structure: 
struct swf_definescalinggrid {
	swf_tag				f_tag;		/* 78 */
	unsigned short			f_button_id_ref;
	swf_rect			f_rect;
};

This definition is used so the scaling factors applied on an object affects only the center of the object fully. The borders are only affected in one direction and the corners are not scaled (note, restrictions apply, see below.) This is quite useful to draw a scalable button or window.


Fig 1 — Sample button being scaled with a scaling grid