16.2. Loading External SWF/JPEG Content into a Draggable Window

Problem

You want to load an external .swf file or image into a draggable window at runtime.

Solution

Use the custom Flash 8 Cookbook Window component.

Discussion

Loading content into a draggable window has the same benefits as loading content into a Loader component discussed in Recipe 16.1, but with the added benefit that the user can move the loaded content around the screen. The Macromedia v2 Window component does not correctly accomplish this task at the time of this writing. Due to a bug in the component, the content may or may not be correctly masked. You may want to check to see if Macromedia has updated the Window component so as to fix the malfunctioning. However, you can download and use the custom Flash 8 Cookbook Window component instead. The Flash 8 Cookbook Window component looks and functions much like the Macromedia Window component, utilizing the same parameters. That means that if Macromedia does correct the error in their Window component and you later decide that you would prefer to use the Macromedia version, you will not need to learn new information to work with their component.

When you’ve downloaded and installed the Flash 8 Cookbook Window component (see the Preface), you can use the Window component in your Flash applications. To do so, complete the following steps:

  1. Drag an instance of the Flash 8 Cookbook Window component from the Components panel onto the stage and name the instances using the ...

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.