Home
HomeFlexible, Lightweight and Truly Skinnable Flash ComponentsPHPObject and other Flash ExtensionsForumsBlog JournalLinks
Buy Flash Components
  GhostWire Components - Flash Components for RIAs
redhand GhostWire Window - Usage

Using the Window component
First, drag an instance of the Window component from the Components Panel to the Stage. Give this instance a name, example "myWindow". You can have as many such instances as you need (make sure to give them different names!).

---

How do I attach a Window dynamically during runtime?
If you wish to attach the component to your movie dynamically during runtime, make sure that you export the component in first frame (check Properties) or otherwise have an instance of the component you want to attach on the timeline before the attachMovie script occurs. You attach the Window component dynamically during runtime using the attachMovie method:
attachMovie("GWWindow","newName",depth,intObject);
The initObject parameter is optional; you can pass this parameter to overwrite the default properties of the component. Example:
attachMovie("GWWindow","newName",depth,{allowResize:true});
Note that the depth specified in the attachMovie method will not be enforced - the resulting depth will be auto-computed by the component's own depth management.

---

How do I set the content in a Window (authoring time)?
During authoring time, you can set the content of the Window by specifying the 'Content' parameter in the properties panel. If the value (a string) you enter for this parameter ends with ".swf" or ".jpg", the component will try to load an external file (the parameter value taken as file name), otherwise it will look in the library (the parameter value taken as symbol identifier).

---

How do I set the content in a Window (run time)?
During run time, you can set the content of the Window by using either the loadContent(url) or setContent(id) methods. When using loadContent(url) method, you will be loading an external file into the component. The progress of this loading will be shown on the statusbar of the window. When using setContent(id) method, you will be loading a symbol from the library.

---

How do I set the size of the Window?
You can set the initial size of the Window by using the Transform tool during authoring time. During runtime, you can set the size using the setSize(width,height) method. Note that if you set allowResize to true (default), the user of your application will be able to resize the window during runtime by dragging the sides of the window, or the anchor (bottomleft corner) of the window.

---

How can I embed a ScrollPane in the Window?
The component does not have its built-in scrollpane.  To embed a GhostWire ScrollPane, follow these steps:
(1) Drag and drop an instance of the ScrollPane (barebones version, without frame) onto the stage and name the instance "myScrollPane".
(2) Convert that instance into a symbol and export it. Give the symbol an identifier, let's say "myScrollPane". Delete the symbol on the Stage.
(3) Drag and drop an instance of the Window component onto the Stage and name it "myWindow".
(4) Add the following actionscript to the timeline:
// ** Prepare **
var embeddedScrollPane = myWindow.getContent().myScrollPane;
embeddedScrollPane.setSize(myWindow.getViewableSize().width,myWindow.getViewableSize().height);
myWindow.onResize = function(w,h)
{
embeddedScrollPane.setSize(w,h);
}
// ** Load the content **
// ** Note that now you load into the scrollpane instead of the window **
// EITHER
// embeddedScrollPane.setScrollContent(symbolID);
// OR
// embeddedScrollPane.loadScrollContent(url);


Flash Components
Button :: CheckBox :: CollapsibleMenu :: CollapsiblePane :: ColorPicker :: ComboBox :: ContextMenu :: DialogBox :: InputField :: ListBox :: Loader :: Menu :: SlideMenu :: NumericBox :: Panel :: ProgressBar :: RadioButton :: ScrollBar :: ScrollPane :: SlidePane :: Slider :: TabView :: TextArea :: TreeView :: Window

See also
Documentation :: FAQs :: Testimonials
 
Contact UsSite Map
Copyright © 2003-2006 GhostWire Studios