Developer's Kit



 
CLOSE
Command
The PointRoll Close command is used to make the current panel disappear.  A Close command can be added to a panel regardless of whether it is set to only close upon explicit user click of a close button.  Close command functionality should be added as follows:
 •  As an HTML Anchor
Add this exact anchor tag around an image or text:
 <a href=# onclick='prClose();return false;'>
Don't forget to add the matching </a> at the end of the image or text.
Here is a complete example:
 <a href=# onclick='prClose();return false;'>
 <img src='close.gif' width=50 height=15 border=0></a>
 •  Within Flash
To add a clickable Close event in Flash, add this exact action to a button object:
 on (release) {
    getURL ("javascript:prClose()");
 }

To close the panel at the end on an animation or movie piece (especially useful for PointRoll BadBoys and TowelBoys), add this action to the appropriate frame:
 getURL ("javascript:prClose()");
Note that there must be no "Window" target parameter passed.
PIN
Command
The PointRoll Pin command causes the panel to remain open until the user clicks a Close command button or some other clickable region in the panel that causes the launching of a new URL.  Pinning is unnecessary if a panel is already set to force an explicit close click by the user (as set on the Design > Panels screen in AdPortal).  However, a Close button (see above) must be provided in any panel that uses pinning so the user can still close once its been pinned.  Pinning functionality can be added in a couple ways: via a clickable Pin button, or upon the beginning of filling out form elements within the panel, as described below:
 •  Via a Pin Button
Add this exact anchor tag around an image or text:
 <a href=# onclick='prPin();return false;'>
Don't forget to add the matching </a> at the end of the image or text.
Here is a complete example:
 <a href=# onclick='prPin();return false;'>
 <img src='pin.gif' width=20 height=15 border=0></a>
 •  Upon a Typing Event
Some event attributes of certain HTML elements can be used to cause pinning to occur when the user begins to enter information or interact with form elements in a panel.
Add this attribute to any text input, textarea, or select:
 onfocus='prPin()'
 •  Within Flash
For pinning to occur upon clicking a button in Flash, add this script to the action for the event:
   getURL ("javascript:prPin()");
Including pinning in Flash 5 form field is a two step process:
1)  Create a rectangular movie clip the same size, shape, fill color and placement as the text/input field, on a layer directly below the text/input field to pin.
2)  Add the following code in the actions panel of this movie clip:
 onClipEvent (mouseDown) {
    if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
       getURL ("javascript:prPin()");
    }
 }
ACTIVITY
Tracking
The PointRoll Activity command allows for the tracking of "internal" events, meaning actions that do not result in a click-thru to a new URL.  Each of the Activities within a panel must be assigned a unique ID which is just an incrementing number (the first activity is 1, a second activity would be 2, and so on).  Activity tracking can be added in 2 different ways.  One is a standard HTML script event attribute and the other is within Flash, as described below:
 •  As an HTML Event Attribute
Add this into the value of the event attribute that is to be tracked as an activity:
 prActivity(x);
Where x is the unique integer identifier you assigned to that activity.
Here is a complete example:
 <a href=# onmouseover='prActivity(1);'>
 <img src='pic.gif' width=30 height=20 border=0></a>
 •  Within Flash
To add a trackable Activity event in Flash, add this script code into the ActionScript for the event:
  getURL ("javascript:prActivity(x)");
Where x is the unique integer identifier you assigned to that activity.
Note that there must be no "Window" target parameter passed.
Here is a complete example (for activity #2 which is an internal mouse-out):
 on (rollOut) {
   ...your ActionScript for the event goes here...
   getURL ("javascript:prActivity(2)");
 }

Activity tracking should never be used in conjunction with a click-thru event.  See the Flash click tracking section of the Flash Specs for click-thru events.
Note: Because rollOver is a continuously fired event, the on(rollOver) event can ONLY include a prActivity call if it is appropriately wrapped with a variable test to limit the Activity call to the first occurance.  For example:
 on (rollOver) {
   ...your ActionScript for the event goes here...
   if (bDone2 != 1) {
     bDone2 = 1;
     getURL ("javascript:prActivity(2)");
   }
 }
Note that each activity needs to use a different variable to test for first occurance (for example: bDone1 for activity 1, bDone2 for activity 2).
PUSH
Command for PushDown
The PointRoll Push command is used to keep publisher content, usually overlapped by a panel, visible by pushing page content down when a panel expands, and moving pushed content back to its original location upon panel close.  Push provides visual effects for a PushDown enabled panel: snap down, snap back, animate down, and animate back.  The function providing Push functionality is prPush() which has two parameters and returns no value:  prPush(time, height).  The first parameter time is the number of milliseconds for the duration of the animation or in the case of no animation this value is 0 (zero).  The second parameter height is the amount of distance in the y direction to push content; a positive value moves content down and a negative value moves content back to the original location.  It is important to note that prClose() is not necessary when unexpanding a panel; prPush() always executes prClose() when snapping or animating back.  Push command functionality should be added as follows:
 •  Within Flash
To add a snap down effect pushing page content down 120 pixels when the panel expands, add this action to the first frame in Flash:
  getURL("javascript:prPush(0,120)");
 
To add a snap back effect pushing page content back 120 pixels
(-120) when the panel contracts, add this action to the last frame in Flash:
  getURL("javascript:prPush(0,-120)");
 
To add the effect of animating page content down while the panel animates open, add this action to the frame beginning the panel expansion in Flash:
  getURL("javascript:prPush(300,120)");
 
To add the effect of animating page content back to the original location while the panel animates closed, add this action to the frame beginning the panel contraction in Flash:
  getURL("javascript:prPush(300,-120)");
 
Note: The number of PushDown enabled ads per page usually depends on publisher specifications and approval.  In special cases, PushDown may not automatically work on publisher pages requiring either publisher modification or small amount of special coding, therefore prior publisher testing and approval is necessary.