GhostWire TabView - Actionscript API
Help/Reference Panel documentation for this flash component
is available with the installation of the component.
GWTabView.addTab(data)
Parameters
data An object specifying the symbol or url of movieclip to load into the tab; and the label of the tab
Returns
Boolean. True or False indicating success or failure.
Description
Method; appends a tab to the tabView and set it as the active tab. The method takes in a single paramter - an object with the properties data and label. The data specifies the movieclip symbol or url to load, and the label specifies the text to appear on the tab title. You can only add the tab if there is space for it (all the tabs can fit within the predefined tabview width). If you need more tabs than what the tabview can currently accomodate, you should set the size of the tabview first, either during authoring time by using the scaling tools, or during runtime by using the setSize method.
Example
// The following adds a tab to myTabView
myTabView.addTab({data:"stocks.swf",label:"Stocks"});
GWTabView.getTabContent(tabID)
Parameters
tabID A number specifying the tabID of the tab in the tabview
Returns
The reference to the content embedded in the tab identified by tabID.
Description
Method; gets the reference to the content embedded in the tab identified by the tabID. You can thereafter manipulate the content like a movieclip.
Example
// The following will stop the playing of the movieclip loaded into the second tab of myTabview:
myTabView.getTabContent(2).stop();
GWTabView.getSize()
Parameters
None
Returns
An object containing two properties -
width An integer specifying the width of the tabview, in pixels
height An integer specifying the height of the tabview, in pixels
Description
Method; gets the width and height of the tabview. The method returns an object containing the two properties width and height.
Example
// The following will get the width of myTabView
myTabView.getSize().width;
// The following will get the height of myTabView
myTabView.getSize().height;
GWTabView.loadTabContent(url, tabID)
Parameters
url A string specifying the path to the file to load into the tab
tabID A number specifying the tabID of the tab to load the contents into
Returns
Nothing.
Description
Method; loads an external file (swf or jpg) into the tab identified by the tabID.
Example
// The following code loads example.swf into the first tab in myTabView.
myTabView.loadTabContent("example.swf",1);
GWTabView.setSize(width,height)
Parameters
width An integer specifying the width of the tabview, in pixels
height An integer specifying the height of the tabview, in pixels
Returns
Nothing.
Description
Method; sets the width and height of the tabview at runtime. Calling this method overrides any sizing applied during authoring. You should always use this method to resize the tabview during runtime, instead of directly setting the _width and _height properties.
Example
// The following code resizes myTabView to 600x400 pixels at runtime.
myTabView.setSize(600,400);
GWTabView.setTabContent(symbol, tabID)
Parameters
symbol A string specifying the symbol of the movieclip to load into the tab
tabID A number specifying the tabID of the tab to load the contents into
Returns
Nothing.
Description
Method; loads a movieclip from the Library into the tab identified by the tabID. Remember to export the required movieclip when publishing.
Example
// The following code brings the third tab to the front on myTabView.
myTabView.showTab(3);
GWTabView.setDataProvider(data)
Parameters
data An array of objects to pass into the component for setting up the tabs
Returns
Nothing.
Description
Method; registers an object (dataProvider) as the data source for the component. The dataProvider should be an Array object, each element within the Array specify data for a tab. Each element should be an object specifying the data, label and type. The data specifies the movieclip symbol or url to load into the tab. The label specifies the label to appear on the tab title. The type is optional - if not specified, the component will attempt to load an url, otherwise it will attempt to load a symbol.
Example
// The following sets up two tabs on the TabView
var tabs = [{data:"summary",label:"Summary",type:1},
{data:"stocks.swf",label:"Stocks"}]
myTabView.setDataProvider();
GWTabView.showTab(tabID)
Parameters
tabID A number specifying the tabID of the tab to be set active
Returns
Nothing.
Description
Method; sets the tab identified by tabID to active (bring to front).
Example
// The following code brings the third tab to the front in myTabView.
myTabView.showTab(3);
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
|