Guides Overview

Guides are invisible horizontal and vertical lines that are automatically resized when your SWF Studio application window changes size. The edges of your ActiveX controls as well as the Browser and WMVideo objects can be set up to align themselves guides to provide smooth automatic resizing. See ActiveX.setGuides for details.

When you create a guide you give it a name to make it easy to refer to that guide later. Every application starts with four default guides called "top", "left", "bottom" and "right" which correspond to the top, left, bottom and right sides of your application window respectively. Your first guides will be bounded by two the four default guides.

As a simple example, we'll create an instance of the Acrobat Reader ActiveX control and a vertical guide that separates the player window into two halves.

// create an instance of AcroPDF.PDF (the Acrobat Reader ActiveX control)
ssCore.ActiveX.createObject({object:"Reader1", progId:"AcroPDF.PDF"});

// create a vertical guide down the center of the window
ssCore.Guides.create({name:"vertical", lower:"left", upper:"right", orientation:"vertical", offset:"50%"});

// make the Acrobat Reader window snap to the right half of the player window
ssCore.Reader1.setGuides({topGuide:"top", leftGuide:"vertical", bottomGuide:"bottom", rightGuide:"right"});

// load a PDF file into the Acrobat Reader
ssCore.Reader1.LoadFile({fileName:"c:\\test.pdf"});

// make the Acrobat Reader control visible
ssCore.Reader1.setVisible({visible:"true"});

And the result should look like this: