Deleting Pictures - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
// draw current image, created in parseBox()
}
//register the handler with the box object
function initializeModule() {
var myBox = boxes[myboxname];
myBox.addEventListener( 'paintEvent', myDrawBox);
}
Your boxResized method must provide similar code. For an example, see the Custom Box sample
provided with the SDK.

Deleting pictures

A picture object can require significant amounts of memory. For best performance, dispose of
unneeded references as soon as possible. If you do not delete unused picture objects, all of the memory
dedicated to them is freed when GoLive quits. However, deleting pictures as soon as they are no longer
needed can improve performance and minimize memory requirements.
To delete a picture, call the disposePicture global function:
myPict = createPicture (Images/myImage.jpg);
...
//when finished with the image
disposePicture (myPict);
draw.frameRect(1, 1, box.width-2, box.height-2);
box.myPict.width = box.width;
box.myPict.height = box.height;
box.myPict.draw(1,1); //offset by one pixel
Adobe GoLive CS2 SDK
Custom Elements
93

Advertisement

Table of Contents
loading

Table of Contents