GhostWire Loader - Usage
Using the GhostWire Loader component
You can use this component to load external JPEG images as well as SWF files. To use the component, drag and drop an instance of the GhostWire Loader from the components panel onto the stage. Edit the component parameters of the instance to suit your requirements. Note that you should specify the url of the target file to load only if you wish to start the loading process upon startup; otherwise you should use the 'load' method during runtime. Adjust the size of the Loader area using the Flash MX authoring software's Transform tool.
---
How do I use a GhostWire ProgressBar to track the loading progress?
Drag and drop an instance of the GhostWire ProgressBar from the components panel onto the stage and position it wherever you want it to be. In the Loader instance's component parameters panel (or the Component Inspector), make sure that you enter the instance name of the ProgressBar. Both the Loader and the ProgressBar must be at the same level. The ProgressBar will now bind itself automatically to the Loader instance. It is recommended that you set 'autoHide' of the ProgressBar component to 'true' (but this affects the application only visually, so it is really up to you).
---
Can I set the ProgressBar during runtime?
Yes, you can set the 'progressBar' property of the Loader instance via actionscript during runtime. Note that you should enter the path to the ProgressBar instance, and not the instance name. In other words, this property's value should be of the 'movieclip' type and not the 'string' type. Also, unlike setting the progressBar property via the component parameters panel, you do not need to have the ProgressBar instance at the same level as the Loader instance - just make sure you enter the path correctly. Example:
myLoader.progressBar = _root.myProgressBar;
myLoader.load();
---
What is the difference between the 'connectText' property and the 'loadText' property?
Before a file actually starts loading, the Flash Player first establishes a connection with the server. During this time, the Loader component will display the message specified by the 'connectText' property. Once a connection is established, the text that is displayed will switch to that specified by the 'loadText' property.
---
What should I do if I wish to have more control over the formatting of the connecting/loading text?
From the component parameters panel, you can set the font type, font size and font color. If you wish to do more formatting, you may like to note that the text is HTML enabled, which means you would be able to use tags for bold, italics, etc. You can also use line break tags to create multiline loading text. Note however, that you won't be able to change the font type, size and color via HTML tags.
---
What is the 'onTimeout' event for, and how do I use it?
The GhostWire Loader component has an 'onTimeout' event, which is triggered if it does not receive data from the server for a pre-determined amount of time. This can occur if the file does not exist, or the server is too busy, or the user is not connected to the Internet. The 'timeout' property specifies the amount of time to wait. This number is in milliseconds. For example, if you want the component to wait 15 seconds before triggering the 'onTimeout' event, you should enter '15000'. Set the 'timeout' event to zero to disable this event. Note that this feature is disabled by default.
---
How do I access the content loaded into the Loader component?
You can reference the loaded content by referencing the Loader instance's property 'content'. Example:
myLoader.content._alpha = 50; // ** sets the loaded content to be semi-transparent
Note that this property is undefined until the content is fully loaded - you should use the onComplete event to wait for the file to be fully loaded before referencing the content.
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
|