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
ScrollPane
component from the Components panel onto the stage and give the instance a name using the Property inspector. As with theLoader
andWindow
components, naming theScrollPane
is optional, but recommended. Naming the instance allows you to use it in conjunction with other components, such as aProgressBar
.With the
ScrollPane
component 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
contentPath
parameter of theScrollPane
instance to the URL of the content you want to load. As with theLoader
orWindow
components, the URL can be relative or absolute.Resize the
ScrollPane
instance as appropriate. You ...
Get Flash 8 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.