16.3. Loading External SWF/JPEG Content into a Scroll Pane
Problem
You want to load external SWF or JPEG content into a scroll pane.
Solution
Use the Flash 8 Cookbook ScrollPane component.
Discussion
When you want to load an external .swf or .jpg file into your Flash application, but you want to display it in an area with smaller dimensions than the content, you can use a Flash 8 Cookbook ScrollPane component. As with the Macromedia v2 Window component, the Macromedia v2 ScrollPane has a bug that prevents it from correctly masking loaded content with consistency.
When you have downloaded and installed the Flash 8 Cookbook ScrollPane, you can use it in your Flash application by completing the following steps:
Drag an instance of the
ScrollPanecomponent from the Components panel onto the stage and give the instance a name using the Property inspector. As with theLoaderandWindowcomponents, naming theScrollPaneis optional, but recommended. Naming the instance allows you to use it in conjunction with other components, such as aProgressBar.With the
ScrollPanecomponent instance selected, open either the Component Inspector panel or the Parameters tab within the Property inspector. Either one will allow you to configure the parameters for the component instance.Set the
contentPathparameter of theScrollPaneinstance to the URL of the content you want to load. As with theLoaderorWindowcomponents, the URL can be relative or absolute.Resize the
ScrollPaneinstance as appropriate. You ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access