Você está na página 1de 6

Yam Computers in Radiology • Computers

Scrollable Movie Loops

An Alternative for Presenting


Interactive Dynamic Data Sets
in Electronic Presentations:
A Scrollable Flash Movie Loop
Chun-Shan Yam1 OBJECTIVE. The purpose of this article is to describe an alternative for creating scrollable
movie loops for electronic presentations including PowerPoint.
Yam CS CONCLUSION. The alternative provided in this article enables academic radiologists to
present scrollable movie loops in PowerPoint. The scrolling capability is created using Flash
ActionScript. A Flash template with the required ActionScript code is provided. Users can sim-
ply download the template and follow the step-by-step demonstration to create scrollable movie
loops. No previous ActionScript programming knowledge is necessary.

ith recent advancements in Instead, presenters can use Adobe Flash

W computing power and imaging


technology (e.g., submillimeter
MDCT scanners), many func-
(.swf) for animations in their e-presentations.
Besides the capability of creating animations,
Flash can also be used to create PowerPoint-
tional and dynamic studies such as cardiac CT style presentations. For instance, since 2005,
angiography that could not be performed eas- presenters at the ARRS annual meetings have
ily in the past are now routine protocols in had the ability to choose between PowerPoint
many radiology settings. As a result, more and Flash as their presentation format [3, 4].
and more dynamic data sets from these types Although Flash is a useful alternative for
of studies are being presented in today’s radi- creating interactive content for e-presenta-
ology conferences. The traditional approach tions, it is still unfamiliar to many academic ra-
for presenting dynamic data sets is the use of diologists. To help radiologists explore the po-
a movie clip, such as QuickTime (Apple) and tential of this new technology, basic concepts
AVI (Microsoft) in Microsoft PowerPoint and tutorials for Flash have been provided in
presentations. Although movie clips are ade- two recent articles [5, 6]. In the first article [5],
quate for showing an image sequence as a an introduction was provided including basic
continuous movie loop, they do not provide terminologies, screen tools, and function pan-
user interactivity for controlling the image els. Essential steps for creating simple Power-
display (i.e., the image scrolling function). Point-style presentations were also discussed.
Keywords: ActionScript, electronic presentation, Flash, Previously, in 2002 and 2004, two differ- In the second article [6], step-by-step tutorials
movie clip, PowerPoint, scrollable movie loop ent methods were proposed for enabling im- for converting common movie clips (e.g., AVI
age scrolling in PowerPoint [1, 2]. However, and QuickTime) into Flash movies were
DOI:10.2214/AJR.07.2197 both these methods require the installation shown. Detailed information for embedding
Received February 10, 2007; accepted after revision
of third-party software or PowerPoint com- Flash movies into PowerPoint was also pro-
June 7, 2007. ponents (add-ins or plug-ins) on the presen- vided. This current article provides the essen-
tation computer and therefore may not be tial techniques for creating interactive content
1Department of Radiology, Beth Israel Deaconess Medical
compatible with the newly established elec- using Flash ActionScript (i.e., a scrollable
Center and Harvard Medical School, WCC, Room 306, tronic presentation (e-presentation) format movie loop for PowerPoint presentations).
330 Brookline Ave., Boston, MA 02215. Address
correspondence to C. S. Yam.
in today’s radiologic society meetings such ActionScript is a common programming
as the American Roentgen Ray Society language used by many Flash developers to
WEB (ARRS) and the Radiological Society of create interactive Web-based applications.
This is a Web exclusive article. North America (RSNA). For instance, at the Depending on the complexity of the applica-
AJR 2007; 189:W295–W300
RSNA 2005 and 2006 annual meetings, tion, programming ActionScript can be com-
PowerPoint transitions, animations, and plicated and may require certain software de-
0361–803X/07/1895–W295
other plug-ins could not be supported by the velopment skills and experience. However,
© American Roentgen Ray Society e-presentation system. for a simple scrollable movie loop, the re-

AJR:189, November 2007 W295


Yam

Fig. 1—Screen capture The template dimensions are preset at


of Adobe Flash shows 550 × 600 pixels (width × height) with a dis-
layout of template
“ScrollableCine.fla” (all play rate of 10 frames per second (fps). This
files are in supplemental setting is most appropriate for presenting
material, Fig. S1) in Flash movie loops of CT, MR, and sonography im-
8 Pro (one screen “Scene
1” [top left circle]). Select
ages for PowerPoint and e-presentations.
“Fit in Window” option to However, users can modify this setting at the
maximize workspace. Properties panel as needed (Fig. 1).
Adjust screen The template contains one screen, two but-
dimensions and frame
rate at Properties panel tons (Play and Stop), and one text box. When
(bottom left circle) (i.e., the Play button is clicked, the movie loop will
Select “Window → advance automatically at the preset frame rate
Properties” from top
menu to open Properties (in this case, 10 fps). If the Stop button is
panel). Double-click on clicked, the movie loop will pause, and users
Actions panel title bar to can scroll the images manually (i.e., click and
view source code.
drag the computer mouse in up–down direc-
(Adobe product screen
shot reprinted with tions). The text box at the top of the screen in-
permission from Adobe dicates the current frame (e.g., 1/20, 2/20,
Systems Incorporated) etc.). As mentioned, this scrolling function is
preprogrammed using ActionScript. For ad-
vanced users, the source code can be viewed
at the Actions panel (Fig. 1).
The next step is to import the source data.
For demonstration, the sample image se-
quence (i.e., the 50 JPEG images provided in
the supplemental data) will be used.
When preparing an image sequence, images
quired coding is rather standard. An anno- many new operating systems for both Mac must be named sequentially (e.g., CT001.jpg,
tated version of this code is provided in Ap- [Apple] and PC), Flash Professional (or Flash CT002.jpg, and so on) and placed in a single
pendix 1. For demonstration, a Flash template Pro) is a commercial product for creating folder before importing the images. See
containing this code has been prepared for Flash movies. At the time of this writing, the Table 1 for supported image formats.
this article (Fig. S1 in the supplemental data). latest version of Flash Pro is 9 (or Adobe Cre-
Users can simply download the template and ative Suite 3/CS3 ($699, $199 upgrade, and Importing the Source Data
follow the demonstration to create scrollable $123 academic) [7]. To use the Flash template While the Flash template “Scrollable-
movie loops (no coding is required). provided in this article, users will need to Cine.fla” is open, import the sample image
have Flash Pro installed on their computers. A sequence with the following steps. Select “In-
Supplemental Data Download 30-day trial of this application is available sert → New Symbol” from the top menu,
To begin, users must download the supple- at the Adobe Website (www.adobe.com/ choose the “Movie clip” option (Fig. 2A), and
mental data file from the supplemental data for products/flash/). Academic institutions may then click “OK.” Select “File → Import →
this article (Fig. S1). This is a self-extracting purchase this application for educational use. Import to Stage” from the top menu, navigate
zipped file created using WinZip 11.1 (Win- Although Flash 8 Pro and Microsoft Win- the file location to the sample image folder
Zip.com). Double-click the downloaded file, dows XP Pro are used for this article, the es- (“\desktop\Supplemental Data\JPEGImages\”),
click “Browse” and select a common location sential steps described in the following dem- click the first image (CT01.jpg), and then
(e.g., desktop) for unzipping the data, and then onstration can be used in other systems (e.g., click “Open” (Fig. 2B). Click “Yes” to accept
click “Unzip.” A folder “\desktop\Supplemental Mac OS 10.3.9 and Windows 2000; Flash loading all the images (Fig. 2C). Immedi-
Data” will be created containing six files and one 7/MX2004 and Flash 9). ately, click the “Scene 1” icon to return to the
subfolder: ScrollableCine.fla (Flash template for main screen (Fig. 2D), and then drag the
Flash 8 or Flash 9), ScrollableCine_MX.fla Demonstration “Symbol 1” icon from the Library onto the
(Flash template for Flash 7), JPEGImages Launching the Template Screen (Fig. 2D). (If the Library panel is
(folder of 50 JPEG images), CT.avi (sample To begin, in the supplemental folder closed, select “Window → Library” to open
movie clip), CT_1.swf (Flash movie), CT_2.swf (Fig. S1), double-click on the file “Scrolla- it.). Enter “cine” (lowercase) for the Instance
(Flash movie), and SWF_Into_PPT.ppt (Power- bleCine.fla” to launch the template (Fig. 1). Name at the Properties panel (Fig. 2E). As an
Point macro for inserting Flash). Depending on software settings, the screen option, users can position and resize the im-
layout may be different from the one shown in ages as needed (Fig. 2E). Select “File → Ex-
Software Requirements Figure 1. Closing all the panels except for port → Export Movie” from the top menu,
Although Flash Player is freeware required Properties can maximize the workspace. navigate the file location to desktop and enter
for viewing Flash movies on Web pages or Also, use the “Fit in Window” option to en- the filename “CT_1.swf,” then click “Save.”
PowerPoint (i.e., a preinstalled component in sure the entire screen is visible (Fig. 1). Select “80%” for JPEG quality, and then click

W296 AJR:189, November 2007


Scrollable Movie Loops

TABLE 1: Image and Movie Formats Supported by Adobe Flash Professional, Besides using an image sequence, users
Version 8 can also choose movie clips as the source data
File Format Manufacturer File Extensions (Table 1). The process for importing movie
FreeHand Adobe .fh, .ft clips into Flash has been discussed in a previ-
ous article [6]. However, for demonstration,
PostScript Adobe .Al, .pdf, .eps
the essential steps for importing a sample
PNG Freeware .png
movie clip into the Flash template are pro-
Illustrator Adobe .eps,.ai vided in Appendix 2.
AutoCAD DXF Autodesk .dxf)
Bitmap Freeware .bmp, .dib Using Flash Movies in Electronic Presentations
Enhanced metafile Freeware .emf
There are two options for using Flash mov-
ies in an e-presentation. Flash movies can be
Flash movie Adobe .swf, .spl
used as standalone presentations without the
GIF image Freeware .gif need of PowerPoint, or they can be embedded
JPEG image Freeware .jpg into PowerPoint. Nonetheless, because e-pre-
Microsoft Windows metafile Freeware .wmf sentation is still in its emerging period, the
Macintosh PICT image Apple .pct presenting mechanism among radiology soci-
eties varies, especially for file uploading. For
MacPaint image Apple .pntg
instance, for RSNA annual meetings, Flash
Photoshop image Adobe .psd movies and PowerPoint presentations must be
QuickTime image Apple .qtif uploaded to the presentation server sepa-
Silicon Graphics image SGI .sgi rately, whereas the ARRS allows Flash to be
TGA image Freeware .tga uploaded as either a standalone presentation
TIFF image Freeware .tif, .tiff
or within PowerPoint. Users should always
follow the submission guidelines.
WAV sound Freeware .wav
MP3 sound Winamp .mp3 Limitations
AIFF sound Freeware .aif The alternative provided in this article re-
Sun AU Sun Microsystems .au quires the software application Flash. Al-
QuickTime movie Apple .mov though some academic radiologists can obtain
this application from their institution, many
Video for Windows Microsoft .avi
may need to purchase it at their own expense.
MPEG movie Motion Picture Experts’ Group .mpg, .mpeg
Although users do not need to have pro-
Digital video Freeware .dv, .dvi gramming skills to use the Flash template to
Note—PNG = portable network graphics; CAD = computer-aided design; DXF = drawing interchange format; create scrollable movie loops, coding in Ac-
GIF = graphics interchange format; JPEG = Joint Photographic Experts’ Group; PICT = PICTure; tionScript may not be an easy task for many ac-
TGA = truevision graphics adaptor; TIFF = tagged image file format; MP3 = MPEG (Motion Picture Experts’
Group) 1, audio layer 3; AIFF = audio interchange file format. ademic radiologists. For advanced users, an
annotated version of the source code is pro-
vided for the development of other Flash appli-
“OK” to finish (Fig. 3). Press the Ctrl + Enter Point macro SWF_Into_PPT.ppt has been de- cations (Appendix 1). Practical examples and
keys to play the movie, and then press veloped [8] and is included in the supplemental basic programming tutorials on Flash and Ac-
Ctrl + W keys to end. Select “File → Exit” material. As mentioned, the macro security tionScript are also available at the official
from the top menu to quit. Click “No” to fin- must be set to Medium before running this Pow- Adobe support Website (www.adobe.com/
ish. This will keep the Flash template un- erPoint template (i.e., in PowerPoint, select support/flash/) and many other Internet resources
changed for future use. “Tools → Macro → Security” from the top such as www.actionscripts.org/tutorials.shtml
The size of this Flash movie loop (i.e., menu, choose “Medium,” and then click “OK”). and www.en.wikipedia.org/wiki/ActionScript.
“\desktop\CT_1.swf”) is 1.62 MB. This Flash Use the following steps to insert the sample Because this article focuses on the use of
movie is now ready for use in e-presentation Flash movie. Double-click the PowerPoint the Flash template to create scrollable movie
or PowerPoint format. template “SWF_Into_PPT.ppt.” Select “En- loops, it does not provide detailed informa-
able Macros.” Press the Alt + F8 keys to- tion for collecting teaching images from
Inserting a Flash Movie into PowerPoint gether. Choose “Insert Flash” and click PACS. Although some of today’s new work-
Unlike movie clips that must be linked to “Run.” Select a Flash movie (e.g., CT_1.swf) stations or PACS viewers enable academic ra-
PowerPoint as external data, Flash movies can and click “Open.” If the “Enable Macros” op- diologists to export teaching images directly
be embedded into PowerPoint as part of the pre- tion does not show when launching the tem- to external media such as a USB drive, some
sentation file. Unfortunately, the standard plate, change the security setting to “Me- clinical settings may not have this function.
method for importing Flash into PowerPoint as dium” as described and restart PowerPoint. However, general mechanisms for exporting
documented by Microsoft is complicated. To More detailed information for using this teaching images from PACS (either as DI-
simplify this cumbersome process, a Power- macro is available in a previous article [8]. COM files, JPEG images, or AVI movies)

AJR:189, November 2007 W297


Yam

Fig. 2—Process for importing source data (all files are


in supplemental material, Fig. S1). (Adobe product
screen shots reprinted with permission from Adobe
Systems Incorporated)
A, Screen capture of Create New Symbol window
shows parameters for creating new movie clip symbol
(circle). By default, name is “Symbol 1.”
B, Screen capture of Import window shows
parameters for selecting image sequence. In this
example, first image (CT01.jpg) is selected at folder
JPEGImages for loading sample images (n = 50). Click
“Open” button to start loading images.
C, Screen capture of Adobe Flash shows options for
importing entire image sequence. For this example,
select “Yes” to continue.
D, Screen capture of Adobe Flash shows drag-and-
drop of the movie clip (Symbol 1) from Library onto
Screen. (Note: Select “Window → Library” or press
Ctrl + L keys to open Library panel.)
E, Screen capture of Flash shows template with movie
clip (Symbol 1) added. While Symbol is selected, enter
“cine” (in lowercase) as Instance Name parameter
(circle). Click and drag symbol to location that best fits
screen. Users can also resize and rotate movie clip as A B
needed (i.e., select “Modify → Transform → Free
Transform” from top menu, then drag corners).

D E

have been discussed previously [9, 10]. Users ings. Users without ActionScript program- animated GIF is already a compatible and ad-
should refer to these references for more de- ming experience can follow the step-by-step equate solution. A simple method for convert-
tailed information. instructions with the provided Flash template ing common movie clips, such as AVI, Quick-
to create scrollable movie loops. Time, and MPEG (Motion Picture Experts’
Discussion Although this interactive feature is useful Group) movies, into animated GIFs using
The solution provided in the article enables for enhancing presentations and education Adobe Photoshop has been discussed in a
academic radiologists to create Flash movies purposes, it may not be a necessary require- separate article [11].
with image scrolling capability that can be ment for some academic radiologists. For pre- In addition to e-presentation, Flash movies
used in today’s e-presentation systems, in- senting simple movie loops in e-presentations can also be used in Web pages, especially for
cluding PowerPoint, at major radiology meet- (i.e., without this image scrolling feature), the Web-based digital teaching files. Flash has

W298 AJR:189, November 2007


Scrollable Movie Loops

A B
Fig. 3—Screen capture of Export (Adobe) Flash Player Fig. 4—Parameters for importing video (all files are in supplemental material, Fig. S1). (Adobe product screen
window shows parameters for exporting Flash movie. shots reprinted with permission from Adobe Systems Incorporated)
(Adobe product screen shot reprinted with permission A, Screen capture of Import Video–Embedding window shows parameters used for importing video file as movie
from Adobe Systems Incorporated) clip symbol. (Note: It is important to select “Movie clip” option in this step.)
B, Screen capture of Import Video–Encoding window shows parameters used for importing video file at best image
quality. (Note: It is important to set parameters as shown and, in particular, to select a high data rate of 7000 kbps
for best image quality.)

built-in functions for generating HTML pages stacks of images in scientific presentations with 7. Flash CS3 Pro EDU. www.adobe.com/
specifically for this purpose. Select “File → PowerPoint. AJR 2004; 183:859–861 aboutadobe/openoptions/?promoid=BIPB.Ac-
Publish Settings” to open the Publish Settings 3. American Roentgen Ray Society Web site. ARRS cessed August 23, 2007
window. Under the “Formats” tab, select both 2008 abstract submission instructions. ab- 8. Yam C-S. A simple method for inserting Flash mov-
“Flash” and “HTML” as the output options. stracts.arrs.org/instructions.cfm. Accessed August ies into PowerPoint. AJR 2007; 188:1151;
Click on the “Publish” button to generate the 1, 2007 [web]W374–W378
Web document. Note: Flash can also be em- 4. American Roentgen Ray Society Web site. ARRS 9. Browne RFJ, Torreggiani WC. Capturing PACS im-
bedded into other types of digital documents 2008 guidelines for preparing an electronic exhibit. ages. AJR 2003; 180:285
such as PDF (portable document format, abstracts.arrs.org/pdfs/prelimExhGuidelines.pdf. 10. Kamauu AW, DuVall SL, Robison RJ, Liimatta AP,
Adobe Acrobat). Accessed August 1, 2007 Wiggins RH 3rd, Avrin DE. Informatics in radiol-
5. Yam C-S. Using Macromedia Flash for electronic ogy (infoRAD): vendor-neutral case input into a
presentations: a new alternative. AJR 2006; server-based digital teaching file system. Radio-
References 187:584; [web]W209–W217 Graphics 2006; 26:1877–1885
1. Daffner RH. On improvement of scientific presen- 6. Yam C-S. A solution for using dynamic data sets in 11. Yam C-S, Kruskal J, Larson M. Creating animated
tations: using PowerPoint. AJR 2003; 181:47–49 electronic presentations. AJR 2006; 187:584; GIF files for electronic presentations using Photo-
2. Gniadek TJ, Desjardins B. Interactive display of [web]W218–W226 shop. AJR 2007; 188:1422; [web]W485–W490

Appendixes appear on next page

AJR:189, November 2007 W299


Yam

APPENDIX 1: Annotated ActionScript (ActionScript, Inc.) for Image Scrolling

//Variable Definitions //(Mouse Action -3) – When the mouse is scrolled


var CurrentFrame, LastFrame, TotalFrames, Lastymouse, timeint; onMouseMove = function() {
var ymouse = _ymouse;
//Variable Initializations var dFrame = 0;
timeint=setInterval(timer,100); if(MouseDown>0) {
TotalFrames=_root.cine._totalframes; // name of Movie Clip dFrame=int((ymouse-Lastymouse)/5);//Calculate the increment of
object = “cine” (all lowercase) changes
CurrentFrame=1; LastFrame=1; CurrentFrame=LastFrame + dFrame; //Update the current image po-
sition
//Updating the Image Number if (CurrentFrame<1) {
function timer() { CurrentFrame=TotalFrames;
ImageNo.text = _root.cine._currentframe + “/” + TotalFrames; Lastymouse = _ymouse;LastFrame=CurrentFrame;
} }
if (CurrentFrame>TotalFrames) {
//(Mouse Action 1) – When the mouse is pressed CurrentFrame=1; Lastymouse = _ymouse; LastFrame=1;
onMouseDown = function() { }
LastFrame=_root.cine._currentframe; _root.cine.gotoAndStop(CurrentFrame);//Update the image display
Lastymouse = _ymouse; }
MouseDown = 1; }
} //As default, image scrolling is in up-down mouse direction. For left-
right scrolling, change //the word “ymouse” to “xmouse” globally
//(Mouse Action 2) – When the mouse is released (in 10 places) before exporting the Flash movie.
onMouseUp = function() {
MouseDown = 0;
LastFrame=CurrentFrame;
}

APPENDIX 2: Importing the Sample Movie Clip into the Adobe Flash Template

Unlike an image sequence, which must be imported via a Symbol, tom” quality, and “7000” kbps data rate. Click “Next,” and then click
movie clips such as Microsoft AVI (audiovideo interleaved) and Apple “Finish.” See Figure 4B for detailed settings.
QuickTime can be imported directly onto the screen. To begin, double- ------The following steps are the same as the image sequence exam-
click the file “ScrollableCine.fla” (Fig. S1 in supplemental data) to ple-----
launch the Flash template. While the template is opened, use the fol- Enter “cine” (lowercase) for the Instance Name at the Properties
lowing steps to import the sample movie clip (CT.avi), also provided panel (Fig. 2E). As an option, users can position and resize the images
in the supplemental data. as needed (Fig. 2E).
Select “File → Import → Import Video” from the top menu. Select “File → Export → Export Movie” from the top menu, nav-
Click “Browse,” select the movie (CT.avi), click “Open,” and then igate the file location to desktop and enter the filename “CT_2.swf,”
click “Next.” and then click “Save.”
Select “Embed video in SWF and play in timeline,” and then Select “80” for JPEG quality, then click “OK” to finish (Fig. 3).
click “Next.” Press the Ctrl + Enter keys to play the movie, and then Ctrl + W
Select “Movie clip” and accept the default options, and then click keys to end.
“Next” (Fig. 4A). Select “File → Exit” from the top menu to quit. Click “No” to finish.
Select “Flash 8 – High Quality.” In the “Advanced Settings” tab, In this case, the size of this Flash movie loop (i.e., \desk-
select the “On2 VP6” codec, “Same as source” frame rate, “Cus- top\CT_2.swf) is 2.31 MB.

F O R YO U R I N F O R M AT I O N

The data supplement accompanying this Web exclusive article can be viewed from
the information box in the upper right corner of the article at: www.ajronline.org.

W300 AJR:189, November 2007

Você também pode gostar