100% found this document useful (2 votes)
7 views

ActionScripting in Flash 1st Edition Phillip Kerman instant download

The document provides a download link for the book 'ActionScripting in Flash' by Phillip Kerman, which is a comprehensive guide to programming in Flash. It includes an overview of the book's contents, covering foundational concepts, programming structures, and practical workshops. The book is available in PDF format and was published in 2001.

Uploaded by

alizkabelo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
7 views

ActionScripting in Flash 1st Edition Phillip Kerman instant download

The document provides a download link for the book 'ActionScripting in Flash' by Phillip Kerman, which is a comprehensive guide to programming in Flash. It includes an overview of the book's contents, covering foundational concepts, programming structures, and practical workshops. The book is available in PDF format and was published in 2001.

Uploaded by

alizkabelo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

ActionScripting in Flash 1st Edition Phillip

Kerman pdf download

https://ebookfinal.com/download/actionscripting-in-flash-1st-
edition-phillip-kerman/

Explore and download more ebooks or textbooks


at ebookfinal.com
Here are some recommended products for you. Click the link to
download, or explore more at ebookfinal

Flash floods in Texas 1st ed Edition Burnett

https://ebookfinal.com/download/flash-floods-in-texas-1st-ed-edition-
burnett/

Flash MX Application Interface Design Data delivery


navigation and fun in Flash MX XML and PHP 1st Edition
Pete Aylward
https://ebookfinal.com/download/flash-mx-application-interface-design-
data-delivery-navigation-and-fun-in-flash-mx-xml-and-php-1st-edition-
pete-aylward/

Chemical Bonds 1st Edition Phillip Manning

https://ebookfinal.com/download/chemical-bonds-1st-edition-phillip-
manning/

Hands On Guide to Flash Video Web Video and Flash Media


Server 1st Edition Stefan Richter

https://ebookfinal.com/download/hands-on-guide-to-flash-video-web-
video-and-flash-media-server-1st-edition-stefan-richter/
Flash MX Studio 1st Edition Dennis Baldwin

https://ebookfinal.com/download/flash-mx-studio-1st-edition-dennis-
baldwin/

Pro Android Flash 1st Edition Stephen Chin

https://ebookfinal.com/download/pro-android-flash-1st-edition-stephen-
chin/

Ophthalmic Disease in Veterinary Medicine 2n Edition


Phillip A. Moore

https://ebookfinal.com/download/ophthalmic-disease-in-veterinary-
medicine-2n-edition-phillip-a-moore/

Psychophysical Acting 1st Edition Phillip B. Zarrilli

https://ebookfinal.com/download/psychophysical-acting-1st-edition-
phillip-b-zarrilli/

America s Role in the World Global Issues 1st Edition


Phillip Margulies

https://ebookfinal.com/download/america-s-role-in-the-world-global-
issues-1st-edition-phillip-margulies/
ActionScripting in Flash 1st Edition Phillip Kerman
Digital Instant Download
Author(s): Phillip Kerman
ISBN(s): 9780672320781, 0672320789
Edition: 1st
File Details: PDF, 4.76 MB
Year: 2001
Language: english
00 0789 FM 3/20/01 3:51 PM Page i

Phillip Kerman

{ ActionScripting
in FLASH }

201 West 103rd St. • Indianapolis, Indiana, 46290 USA


00 0789 FM 3/20/01 3:51 PM Page ii

ActionScripting in Flash Executive Editor


Jeff Schultz
Copyright © 2001 by Phillip Kerman Development
Editors
All rights reserved. No part of this book shall be reproduced,
Kate Small
stored in a retrieval system, or transmitted by any means, elec- Alice Martina Smith
tronic, mechanical, photocopying, recording, or otherwise, with-
out written permission from the publisher. No patent liability is
Managing Editor
Charlotte Clapp
assumed with respect to the use of the information contained
herein. Although every precaution has been taken in the prepara- Project Editor
tion of this book, the publisher and author assume no responsi- Carol Bowers
bility for errors or omissions. Nor is any liability assumed for Copy Editors
damages resulting from the use of the information contained Michael Henry
herein. Alice Martina Smith

International Standard Book Number: 0-672-32078-9 Indexer


Sheila Schroeder
Library of Congress Catalog Card Number: 00-108995
Proofreader
Printed in the United States of America Daniel Ponder
First Printing: April 2001 Technical Editor
Lynn Baus
04 03 02 01 4 3 2 1
Team Coordinator
Trademarks Amy Patton

All terms mentioned in this book that are known to be trade- Interior Designer
marks or service marks have been appropriately capitalized. Alan Clements
Sams Publishing cannot attest to the accuracy of this informa- Cover Designer
tion. Use of a term in this book should not be regarded as affect- Alan Clements
ing the validity of any trademark or service mark.
Page Layout
Ayanna Lacey
Warning and Disclaimer Heather Hiatt Miller
Stacey Richwine
Every effort has been made to make this book as complete and
DeRome
as accurate as possible, but no warranty or fitness is implied.
The information provided is on an “as is” basis. The author and
the publisher shall have neither liability nor responsibility to any
person or entity with respect to any loss or damages arising from
the information contained in this book.
00 0789 FM 3/20/01 3:51 PM Page iii

Overview

Part I Foundation 1
{ Foundation } Introduction 3
1 Flash Basics 7
2 What’s New in Flash 5 25
3 The Programmer’s Approach 37
4 Basic Programming in Flash 47
5 Programming Structures 73
6 Debugging 113
7 The Movie Clip Object 141
8 Functions 161
9 Selecting Text, Trapping Keys, and Manipulating Strings 185
10 Arrays 211
11 Objects 237
12 Homemade Objects 261
13 Smart Clips 283
14 Interfacing with External Data 303

Part II Workshop 351


{Workshop} Introduction 353

Part IIA Beginning Workshops 357


1 Ensuring That Users Have the Flash 5 Player 359
2 Faking Video 367
3 Creating Custom Cursors 375
4 Creating a Horizontal Slider 389
5 Building a Slide Show 403
6 Mapping 413
7 Working with Odd-Shaped Clickable Areas 423
8 Adapting Built-in Smart Clips 431
00 0789 FM 3/20/01 3:51 PM Page iv

Part IIB Intermediate Workshops 439


9 Creating a Currency-Exchange Calculator 441
10 Creating a ToolTip Smart Clip 461
11 Creating a Digital Timer 473
12 Creating an Analog Timer 481
13 Creating a Countdown Timer 489
14 Using Math to Create a Circular Slider 497
15 Developing Time-Based Animations 505
16 Creating a Multistate Button 511

Part IIC Advanced Workshops 521


17 Offline Production 523
18 Creating a Dynamic Slide Presentation 529
19 Creating JavaScript Cookies 543
20 Writing JavaScript Inter-Movie Communications 551
21 Fixing Broken Scripts 559

Part III Appendices 573


A Equivalents 575
B Making Flash Extensions for the Macromedia Exchange Web Site 583
Index 589
00 0789 FM 3/20/01 3:51 PM Page v

Contents
Part I Foundation 1
{ Foundation } Introduction 3

1 Flash Basics 7
Timeline Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Implications for Animation and Filesize . . . . . . . . . . . . . . . . . . . 8
Implications for Programming . . . . . . . . . . . . . . . . . . . . . . . . . 10
Targeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Script Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Always Movie Clips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Coordinate System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Tricks of the Trade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Invisible Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Empty Movie Clips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Empty Layers and Keyframes. . . . . . . . . . . . . . . . . . . . . . . . . . 23
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2 What’s New in Flash 5 25


Advanced Features Making Programming Easy. . . . . . . . . . . . . . . 25
Clip Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Smart Clips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
External Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Custom Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
HTML Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Previous Knowledge Worth Forgetting . . . . . . . . . . . . . . . . . . . . . 31
Deprecated ActionScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Non-Deprecated ActionScripts That Should Be . . . . . . . . . . . . 33
Old Tricks That Are Old News . . . . . . . . . . . . . . . . . . . . . . . . . 34
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3 The Programmer’s Approach 37


Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Prototyping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Hard Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Pseudo-Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Good Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Less Is More . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Magic Numbers, Constants, and Variables . . . . . . . . . . . . . . . . 44
Repeated Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
00 0789 FM 3/20/01 3:51 PM Page vi

vi ActionScripting in Flash

Code Data Separation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45


Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

4 Basic Programming in Flash 47


Terminology, Special Characters, and Formatting . . . . . . . . . . . . . 47
Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Results of Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Terms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Special Characters and Formatting . . . . . . . . . . . . . . . . . . . . . . 56
Data Types and Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Variables’ Names and Values . . . . . . . . . . . . . . . . . . . . . . . . . . 58
String and Number Data Types. . . . . . . . . . . . . . . . . . . . . . . . . 58
Other Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Using Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Assigning and Accessing Variables. . . . . . . . . . . . . . . . . . . . . . 65
Comparing and Passing Values . . . . . . . . . . . . . . . . . . . . . . . . . 66
Scope and Variable Collision . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Dot Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

5 Programming Structures 73
Statements, Expressions, and Operators. . . . . . . . . . . . . . . . . . . . . 73
Writing Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Using Operators in Expressions . . . . . . . . . . . . . . . . . . . . . . . . 77
Types of Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Built-in Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Simple Objects in Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Using the Math Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Using the Number Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Conditional and Loop Statements . . . . . . . . . . . . . . . . . . . . . . . . . 96
Conditional Statements: if, if else, if else if . . . . . . . . . . 97
Loop Statements: for, for in . . . . . . . . . . . . . . . . . . . . . . . . 101
while . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Applied Expression Writing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

6 Debugging 113
General Approaches to a Bug-Free Life. . . . . . . . . . . . . . . . . . . . 114
Finding and Defining Bugs. . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Fixing Bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Preventing Bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Using the Debugger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Viewing and Setting Properties and Variables . . . . . . . . . . . . . 122
Watching Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
00 0789 FM 3/20/01 3:51 PM Page vii

Contents vii

Remote Debugging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126


Strategies of Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

7 The Movie Clip Object 141


Properties of Clips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
You Can Get Them All, But You Can’t Set Them All . . . . . . . 143
Anonymous Targeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Variables in Clips (or “Homemade Properties”) . . . . . . . . . . . . . . 145
Methods of Clips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Referencing Clips and Targeting . . . . . . . . . . . . . . . . . . . . . . . . . 151
Relative and Absolute Referencing . . . . . . . . . . . . . . . . . . . . . 151
Dynamic Referencing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

8 Functions 161
How to Use Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Using Built-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Using Homemade Functions. . . . . . . . . . . . . . . . . . . . . . . . . . 164
Creating Homemade Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Functions as Subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Making Functions That Accept Parameters . . . . . . . . . . . . . . . 170
Making Functions That Return Values . . . . . . . . . . . . . . . . . . 173
Using Functions as Methods. . . . . . . . . . . . . . . . . . . . . . . . . . 175
Local Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Applying Functions to Previous Knowledge . . . . . . . . . . . . . . . . 179
Review Built-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Things to Remember . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

9 Selecting Text, Trapping Keys, and Manipulating Strings 185


String Object Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Esoteric String Object Details . . . . . . . . . . . . . . . . . . . . . . . . 187
Methods of the String Object Explored . . . . . . . . . . . . . . . . . . . . 189
Zero-Based System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Extracting Portions of Strings. . . . . . . . . . . . . . . . . . . . . . . . . 190
Extracting Characters, Changing Case, and Searching . . . . . . 191
String Object Methods Applied . . . . . . . . . . . . . . . . . . . . . . . 192
Using HTML Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Selection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Getting and Setting Focus . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Setting and Getting Selections . . . . . . . . . . . . . . . . . . . . . . . . 201
00 0789 FM 3/20/01 3:51 PM Page viii

viii ActionScripting in Flash

Key Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202


Using the Key Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Key Object Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

10 Arrays 211
Array Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Array Creation and Manipulation . . . . . . . . . . . . . . . . . . . . . . . . 215
Creating and Populating Arrays . . . . . . . . . . . . . . . . . . . . . . . 215
Accessing Array Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Array Object Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Associative Arrays. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

11 Objects 237
Formal Rules of Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Attach Sound. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Sound Object Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Advanced Sound Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Controlling Multiple Sounds . . . . . . . . . . . . . . . . . . . . . . . . . 243
Color. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Simple Coloring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Using RGB Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Using the Color Transform Method . . . . . . . . . . . . . . . . . . . . 248
Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Instantiating a Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Manipulating Dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Attach Movie Clip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

12 Homemade Objects 261


Basic Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Using Constructor Function . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Making Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Practical Example of Homemade Objects . . . . . . . . . . . . . . . . . . 273
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

13 Smart Clips 283


Standard Smart Clips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Making Smart Clips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Advanced Applications for Standard Smart Clips . . . . . . . . . . 292
Replacing the Clip Parameters Panel with Custom UIs . . . . . . . . 294
Designing Custom UIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Building Custom UIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
00 0789 FM 3/20/01 3:51 PM Page ix

Contents ix

14 Interfacing with External Data 303


External Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
External Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Waiting for Variables to Load . . . . . . . . . . . . . . . . . . . . . . . . . 307
Data File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Examples of Using External Data Files . . . . . . . . . . . . . . . . . 310
Server Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Quick and Dirty Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
JavaScript Talking to Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Targeting the Flash Object . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Workarounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Director and Authorware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Flash in Authorware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Flash in Director . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349

Part II Workshop 351


{Workshop} Introduction 353

Part IIA Beginning Workshops 357

1 Ensuring That Users Have the Flash 5 Player 359

2 Faking Video 367

3 Creating Custom Cursors 375

4 Creating a Horizontal Slider 389


Creating a Quick and Dirty Slider . . . . . . . . . . . . . . . . . . . . . . . . 389
Converting the Slider into a Smart Clip . . . . . . . . . . . . . . . . . . . . 394
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401

5 Building a Slide Show 403

6 Mapping 413

7 Working with Odd-Shaped Clickable Areas 423

8 Adapting Built-in Smart Clips 431

Part IIB Intermediate Workshops 439

9 Creating a Currency-Exchange Calculator 441

10 Creating a ToolTip Smart Clip 461


00 0789 FM 3/20/01 3:51 PM Page x

x ActionScripting in Flash

11 Creating a Digital Timer 473

12 Creating an Analog Timer 481

13 Creating a Countdown Timer 489

14 Using Math to Create a Circular Slider 497

15 Developing Time-Based Animations 505

16 Creating a Multistate Button 511

Part IIC Advanced Workshops 521

17 Offline Production 523

18 Creating a Dynamic Slide Presentation 529

19 Creating JavaScript Cookies 543

20 Writing JavaScript Inter-Movie Communications 551

21 Fixing Broken Scripts 559


Card Flip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561
Card Snap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
Circle Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
Multiple Choice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
Rotating Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
Word Float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
Yellow Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
Click and Hold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
00 0789 FM 3/20/01 3:51 PM Page xi

Contents xi

Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
Move Multiple. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
Hint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571

Part III Appendices 573


A Equivalents 575
Alternatives to Deprecated Code . . . . . . . . . . . . . . . . . . . . . . . . . 575
tellTarget() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
call() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
ifFrameLoaded() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
toggleHighQuality() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
eval() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Logical Operators (and, or, and not) . . . . . . . . . . . . . . . . . . . 577
String Comparison Operators (eq, ge, gt, le, lt, and ne) . . . . 577
String Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
int() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
random() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
No More Funkiness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
Two-Frame “Updater” Movie Clips . . . . . . . . . . . . . . . . . . . . 579
Drag Invisible Movie Clip to Ascertain Mouse Position . . . . . 579
Pseudo Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
URL-Encoded Data Instead of XML-Structured . . . . . . . . . . . 580
The Oldest Ones in the Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
You Can’t Set _currentframe . . . . . . . . . . . . . . . . . . . . . . . . . 580
You Can Jump Only to Integer Frame Numbers . . . . . . . . . . . 580
There’s a Big Difference Between = and == . . . . . . . . . . . . . . 580
For-Loops Use Semicolons, Not Commas . . . . . . . . . . . . . . . 581

B Making Flash Extensions for the Macromedia Exchange


Web Site 583
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
The MXI File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585

Index 589
00 0789 FM 3/20/01 3:51 PM Page xii

xii ActionScripting in Flash

Foreword

The upgrade to Flash 5 turned an already compelling medium (Flash animations)


into something truly amazing. The inclusion of a new version of the ActionScript
language means that Flash 5 can do almost anything. If you just organize your
goals and translate them to the language of a programmer, you can make Flash
do precisely what you imagined. But therein lies the problem: Translating goals
into a programming language is not easy for everyone.

This book targets the reader who can assemble a basic Flash movie and who
knows what he or she wants to achieve. I’ll help you divide your goal into indi-
vidual tasks that can then be translated into ActionScript. Naturally, this will
involve teaching you how to “program” (and even think like a programmer). This
book is not, however, a general programming book; every topic is related to and
applied to Flash. Naturally, if you are already an experienced programmer, you
might find parts of this book to be a review. But for you programmers, I’ll show
you how to apply your programming knowledge to make Flash perform. All the
programming skill in the world (whether I teach it to you or you bring it with
you) won’t help you if you can’t apply it to Flash.

This book definitely does not shy away from advanced topics. But it isn’t an
exhaustive reference to every detail in the ActionScript language either. The truth
is that there are countless other resources for advanced programming topics.
That’s not what this book is about. It’s about giving you the skills so that you can
apply any idea you have to Flash. When you’re equipped with the knowledge I
cover, you’ll be able to meet any challenge. It might involve researching an eso-
teric formula for physics or applying a unique math calculation. If that means
you have to research a specific topic, this book will give you the skills to figure
out how to apply it to Flash.

I started this book having just finished Sams Teach Yourself Macromedia Flash 5
in 24 Hours. Although this isn’t a continuation of that book, there isn’t much
repeated content either. I said earlier that you’ll need to be able to assemble a
Flash movie (for example, I’m not going to teach you how to draw in Flash). The
first chapter, “Flash Basics,” goes over the prerequisites. It’s important that you
come with this basic knowledge. Don’t worry, I won’t go so fast that you can’t
keep up, but everyone should start at this base level.
00 0789 FM 3/20/01 3:51 PM Page xiii

Contents xiii

The book is organized in two parts. The foundation chapters are like a textbook.
Plenty of examples are interspersed, but you won’t need to follow along with
Flash running. (I suspect, however, that you’ll often want to try things out when
inspired.) The workshop chapters are all hands-on tutorials. It’s a chance to apply
what you learned in the foundation part. If you prefer, you can jump right into
the workshops as references are made to the foundations when further explana-
tion might be helpful. You’ll find the workshops to be quite useful. In some of
them, I even guide you down the wrong path so that we can discuss the solution
that follows. I find that this is more true-to-life than some tutorials that seem to
prove only that it’s possible to achieve a particular result with very few steps.
Real life is often frustrating and perhaps the simulated reality of these workshops
will help you avoid frustration when you go on your own.

One last note before we get rolling. Flash 5 was such a change from Flash 4 that
I chose to cover only Flash 5. It turns out that there are a few ancillary mentions
of Flash 4 in this book, including a good part of Appendix A, “Equivalents.” By
and large, however, this book is for Flash 5 only. The first workshop provides
information about ensuring that your users have the correct Flash player.
Naturally, you’ll be shown how to upgrade those users so that they can see your
Flash 5 creations.

Now get ready to transform yourself from a Flash user to an ActionScripter!


00 0789 FM 3/20/01 3:51 PM Page xiv

xiv ActionScripting in Flash

About the Author

Phillip Kerman is an independent programmer, teacher, and writer specializing


in Macromedia products. His degree in Imaging and Photographic Technology
from the Rochester Institute of Technology was earned back when “multimedia”
had a different meaning than today. One of Phillip’s internships, for example,
involved programming multiple slide projector presentations with dissolves syn-
chronized to a sound track—the multimedia of the 1980s. In 1993, he found
Macromedia Authorware a natural fit for his interest and skills. After getting his
start at The Human Element, Inc., he moved back to Portland, Oregon to work
on his own.

Phillip has transitioned his expertise from Authorware to Director, and now, to
Flash. Over seven years, he has had to adapt to a total of 13 version upgrades—
Flash 5 being the most significant of them all! In addition to retooling and build-
ing his own skills, Phillip finds teaching the biggest challenge. He has trained
and made presentations around the world, in such exotic locations as Reykjavik,
Iceland; Melbourne, Australia; Amsterdam, Holland; and McAlester, Oklahoma.
He wrote Sams Teach Yourself Macromedia Flash 5 in 24 Hours (that is the title,
not how long it took to write). His writing has also appeared in such publications
as Macworld, Macromedia User Journal, and his self-published The Phillip
Newsletter (www.teleport.com/~phillip/newsletter).

In addition to showing others how to create multimedia, Phillip has had plenty of
opportunities to get his hands dirty in programming. Last century, Phillip pro-
grammed the all-Flash Web site www.m-three.com for Paris France Inc. This site
was included in both Communication Arts Interactive Design Annual and the
British Design & Art Direction Annual in 2000. The latest version of the M3 site
won the navigation category at the London Flash Film Festival.

Feel free to email Phillip at flash5@onemain.com.


00 0789 FM 3/20/01 3:51 PM Page xv

Contents xv

Dedication

Dedicated to my entire family including our newest member, Savannah. And


the canine Kerman, Max, who deserved more walks than he got during the
writing of this book.

Acknowledgments

The hardest part of writing a book is attempting to acknowledge all those who
helped, but knowing that you’ll fail to mention everyone. Here is my attempt to
acknowledge everyone.

First, the people at Sams Publishing. You’ll find a list of the key players in the
credits column on the copyright page, but even they would acknowledge that oth-
ers helped them. After seeing my first book become a reality last year (with the
same team), I realized that even if I could write a perfect book on my own
(which, of course I can’t), it would never get printed because there’s so much
work involved in preparing the files for the printer. Although I can’t say I know
how every publisher works, I can say that Sams is professional, responsive, and
fun. Of particular note, Kate Small made the book flow. Everything seemed to
make sense when I wrote it, but after Kate reorganized parts, it made much more
sense. Lynn Baus used her Flash experience both to ensure that technical details
were correct and exercises could be performed, as well as to suggest countless
additional facts that were included in the text. Copy editors are doubly valuable
as they both eliminate errors that would otherwise make the book difficult to read
and they also make me a better writer! Reviewing their edits is like a free
English class. The production team led by Carol Bowers turns the manuscripts
into a real book. Obviously, there are many others who work behind the scenes
for whom I am grateful.

Macromedia continues to amaze me with its forthcoming and approachable style.


The company is totally involved in email lists and Flash community sites. The
folks who seem to go way beyond the call of duty by providing help to all
include Brad Bechtel, John Dowdell, Gary Grossman, Erica Norton, Peter
00 0789 FM 3/20/01 3:51 PM Page xvi

xvi ActionScripting in Flash

Santangeli, and Eric J. Wittman. Others who provided specific help for this book
include Jeremy Clark and Matt Wobensmith.

I subscribe to many e-mail lists, but four in particular have been most helpful—
those run by Darrel Plant, Branden Hall, Jon Warren Lentz, and Robert
Reinhardt. There are countless instances when a thread on one of these lists has
helped me.

One last acknowledgment for some authors of other Flash books. I’m proud of
this book, but it contains only my style of communication. For some different
perspectives on Flash, check out books containing contributions by the following
authors:

Joshua Davis, Brendan Dawes, David J. Emberton, Bruce Epstein, Derek


Franklin, Garo Green, Branden Hall, Andreas Heim, Jon Warren Lentz, Colin
Moock, Darrel Plant, Robert Reinhardt, Crissy Rey, Gary Rosenzweig, Glenn
Thomas, Phillip Torrone, Bill Turner, and Samuel Wan.

I can’t vouch for books I haven’t reviewed, but I can say these folks know their
stuff. They’ve also provided direct help on various Flash related matters to
myself and others for years.
00 0789 FM 3/20/01 3:51 PM Page xvii

Contents xvii

Tell Us What You Think!

As the reader of this book, you are our most important critic and commentator.
We value your opinion and want to know what we’re doing right, what we could
do better, what areas you’d like to see us publish in, and any other words of wis-
dom you’re willing to pass our way.

You can e-mail or write me directly to let me know what you did or didn’t like
about this book—as well as what we can do to make our books stronger.

Please note that I cannot help you with technical problems related to the topic of
this book, and that due to the high volume of mail I receive, I might not be able
to reply to every message.

When you write, please be sure to include this book’s title and author as well as
your name and phone or fax number. I will carefully review your comments and
share them with the author and editors who worked on the book.

Fax: 317-581-4770

E-mail: graphics@samspublishing.com

Mail: Mark Taber


Sams Publishing
201 West 103rd Street
Indianapolis, IN 46290 USA
00 0789 FM 3/20/01 3:51 PM Page xviii
01 0789 Part I 3/20/01 3:52 PM Page 1

{Part I }

Foundation

1 Flash Basics
2 What’s New in Flash 5
3 The Programmer’s Approach
4 Basic Programming in Flash
5 Programming Structures
6 Assigning Values
7 The Movie Clip Object
8 Functions
9 Selecting Text, Trapping Keys, and Manipulating
Strings
10 Arrays
11 Objects
12 Homemade Objects
13 Smart Clips
14 Interfacing with External Data
Discovering Diverse Content Through
Random Scribd Documents
LIBRARY.

No. 1.
EDMUND BURKE.

Brown Coat. White Cravat. Powder.

BORN 1729 N.S., DIED 1797.

By Jackson after Reynolds.

ORN at Dublin, the eldest of three sons, his father a


solicitor in good practice, his mother a Miss Nagle, of
County Cork, a Roman Catholic, whose family had been
zealous adherents of James the Second. Edmund and
his brothers were brought up as Protestants, their
father’s faith; his only sister was educated according to her mother’s
religion. Young Burke went to school at Ballitore, about thirty miles
from Dublin, under the tutelage of one Shackleton, a Quaker, and
native of Yorkshire, a good man, and a good teacher, who endeared
himself to his pupils, and of whom Burke spoke in the highest terms
of gratitude and affection, ‘who had,’ he said, ‘not only educated his
mind, but also his heart.’ While still a schoolboy, Edmund had formed
a close friendship with young Shackleton, his master’s son, and
continued to correspond with him for many years on all subjects,
classical, social, religious. In 1743 he went to Trinity College, Dublin,
where, he confesses, his studies were very desultory. ‘They
proceeded more from sallies of passion than preference for sound
reason, and, like all natural appetites that are violent for a season,
soon cooled.’ He thought it a humorous consideration to reflect into
how many madnesses he had fallen during the last two years. First,
the furor Mathematicus, then the furor Classicus, the furor
Historicus, the furor Poeticus; later on he would have added to his
list the furor Politicus.
Richard Shackleton, from whom he had parted with tears at
Ballitore, urges him, with tender admonitions, ‘to live according to
the rules of the Gospel.’ ‘I am desirous of doing so,’ was the answer
to the friendly little sermon, ‘but it is far easier to do so in the
country than in a town, especially in Trinity College, Dublin.’ Burke
sends Richard a poetical description of the manner in which he
spends his day: how he rises with the dawn and careers through
fragrant gardens and meads, ‘mid the promise of May, till hunger
drives him home to breakfast; how he goes down to the beach in
the afternoon to sit upon the sea-wall and watch the shipping, and
the varying colours of the ocean in the glowing sunset; and amid it
all, how his thoughts travel back to the sparkling river and pretty fir-
woods of dear old Ballitore. He finds time, however, almost every
day, to spend at least three hours in the public library, among the
books, ‘the best way in the world for killing thought.’ Assuredly far
better than most methods used for that purpose. ‘I have read some
history,’ he says, ‘and am endeavouring to make myself acquainted
in some degree with that of our own poor country.’
During his whole life Burke loved and compassionated and
endeavoured to serve his own unhappy island. His only
contemporary of note at College was the Sizar, Oliver Goldsmith, but
they do not appear to have been acquainted. In 1750, having taken
his degree, Edmund went to London to study the law in the Middle
Temple; but that species of study did not suit his taste, although he
expresses his high respect for the same. He was never called to the
Bar; he preferred literature, courted the society of authors,
frequented the debating club in Covent Garden, and was a great
lover of the theatres.
His father, who was a hard man, and had never shown him much
tenderness, was very angry at Edmund’s neglect of legal studies,
and either withdrew, or curtailed, his son’s allowance so much as to
make it difficult for him to subsist in London. He was very fond of
the country, however, and used to go on walking expeditions, and
spend a great part of his summer in picturesque villages, reading
and writing all the time, in the companionship of William Burke, his
friend and namesake. He mentions his love for wandering in a letter
to Richard Shackleton, when, after apologising for a long silence, he
says, ‘I may have broken all rules, neglected all decorums, but I
have never forgot a friend whose good head and heart have made
me esteem and love him.’ It was about the year 1756 that Edmund
Burke’s marriage took place, with the daughter of Dr. Nugent, an
Irish Roman Catholic, who had settled at Bath. We hear that she was
a gentle, amiable, and well-bred woman, and a Presbyterian by
creed. In this year Burke published A Vindication of Natural Society,
and his immortal essay on the Sublime and the Beautiful. The
Vindication was written in the form of a letter to a noble Lord by a
late noble writer. It was intended to simulate the style of Lord
Bolingbroke, and was pronounced in that respect eminently
successful, so far as to deceive many expert critics. It was a satire
on the opinions of Lord Bolingbroke, lately deceased, whose
posthumous works were now attracting great attention in the literary
world. Boswell is said to have asked Johnson in after years whether
he thought the Vindication would be damaging to Burke in his
political career. ‘No, sir,’ replied the Doctor; ‘though it might perhaps
be mentioned at an election.’
Burke himself appears to have had the same misgivings as
Boswell, for, on the eve of standing for Parliament, he thought it
advisable to print a second edition of the Vindication, with a preface,
in which he explained that the design of the work was ironical. When
in London he was not slow in forming friendships with all the
eminent men of the day, and amongst those with whom he became
most intimate were Reynolds, Garrick, and Samuel Johnson. He was
one of the original members (as was his father-in-law, Dr. Nugent) of
the Literary Club; and so popular was he at the Turk’s Head, that Sir
John Hawkins, ‘that most unclubbable man,’ was actually expelled
from the chosen circle on account of an attack he had made on
Burke.
In 1758 he conceived the scheme of the Annual Register, and
proposed it to Dodsley, the great publisher of the day, who was so
much pleased with the notion that he immediately embarked in the
undertaking, and gave Burke £100 a year to contribute the ‘Survey
of Events,’ which he continued for many years. About the same time,
the young author was introduced to the man who is known to
posterity as ‘Single-speech Hamilton,’ on account of the brilliant
success of his maiden speech, which threw into the shade such
orators as Pitt (afterwards Lord Chatham), Grenville, and Fox, who
all spoke on the same occasion. Horace Walpole met Burke at
Hamilton’s house in company with Garrick, and says of him, ‘A young
Irishman who wrote a book in the style of Bolingbroke, which has
been much admired. He is a sensible man, but has not worn off his
authorism, and thinks there is nothing so charming in the world as
writers, and to be one. He will know better some day.’
Mr. Hamilton went to Ireland, as private secretary to the Viceroy,
Lord Halifax, and Burke accompanied him. While there he busied
himself in inquiring into the grievances and causes of discontent,
especially among the Roman Catholic portion of the community. It
was owing to his liberal-minded views on the subject of Catholic
Emancipation that a false rumour was spread that Edmund Burke
had gone over to his mother’s creed, with many other reports
equally untrue. Hamilton obtained for his companion a pension of
£300 a year from the Irish Treasury, which was at first received with
gratitude, but Burke would not accept the salary unconditionally; he
must have some of his time to himself for literary labours; in fact, he
could not barter his freedom. Hamilton was offended. He wished to
bind down the noble spirit for life to his own personal service, or, as
the writer himself expresses it, ‘to circumscribe my hopes, to give up
even the possibility of liberty, to annihilate myself for ever.’ So the
pension was given up, the connection with Hamilton at an end, and
Burke returned to England.
In 1765 Lord Rockingham replaced George Grenville as Prime
Minister, and appointed Edmund Burke his private secretary. This
nomination caused much surprise and displeasure in some quarters.
The Duke of Newcastle expostulated with the Premier, and
denounced Burke as an Irish adventurer, a Papist, a disguised Jesuit,
with a false name, and what not. Lord Rockingham put his secretary
in possession of the charges brought against him, all of which Burke
denied, and answered indignantly he would instantly vacate the
post, as no possible consideration would induce him to continue in
relation with any man whose trust in him was not entire. But Lord
Rockingham had implicit trust in his noble-hearted secretary, and
would not accept his resignation; and for seventeen years, that is,
till Rockingham’s death, the friendship between these two
distinguished men was unbroken, the confidence unlimited. In
December, this same year, Burke was returned Member for the
borough of Wendover. His maiden speech, a few days after the
opening of the session in 1766, on American affairs, produced the
profoundest sensation, and Pitt (the elder) not only complimented
the young Member himself, but congratulated the Ministry on their
acquisition. Dr. Johnson said, ‘No man had ever gained more
reputation on his first appearance.’ The second and third speeches
were even more successful, and it was universally admitted that
Burke’s eloquence carried the repeal of the American Stamp Act,
which measure was supported by Pitt, although in Opposition. The
Rockingham Ministry did not stand above twelve months, and made
way for what was termed the Grafton Administration, the Duke
being, for a time at least, nominal, and Lord Chatham real leader of
the party. Burke describes this Government as a piece of joinery,
curiously indented and whimsically dove-tailed; a piece of tesselated
pavement, without cement, unsafe to touch, insecure to stand on.
In 1769 he became the possessor of The Gregories, in the
parishes of Penn and Beaconsfield, in Buckinghamshire. He thus
speaks of it to Shackleton: ‘I have made a push with all I could
collect, and the aid of my friends, to cast a little root in this country.
I have bought a house, with an estate of about 600 acres, twenty-
four miles from London: it is very pleasant, and I propose, God
willing, to become a farmer in good earnest.’ He is sure his friend
will approve of the acquisition, when he knows it was once the
property of Waller the poet. There is always a large portion of the
community who consider it incumbent on them to inquire into, and
animadvert upon, their neighbours’ affairs, more especially their
finances. The world was much exercised over the chances of Burke’s
ability to defray such an expense as the purchase of an estate; but
there seems little doubt that Lord Rockingham assisted him
materially, and at his death that kind friend desired that all Edmund
Burke’s bonds should be destroyed.
The Irishman did not belie his nationality with regard to money; it
must be confessed he was lavish, and it is said that from the day, in
1769, when he applied to Garrick for the loan of £1000, till 1794,
when he received a pension from the Crown, he was never out of
debt. But Burke’s extravagance was far removed from selfishness; he
never closed his ear or his purse against the appeals of struggling
talent or deserving poverty, and was generous and compassionate in
every relation of life. In 1773, his only child, his ‘darling Dick,’ having
left Westminster, was entered student at Christchurch, Oxford, but
he being considered too young for College life, his father determined
to send him to Auxerre to study the French language. The youth was
lodged in the house of the Bishop of the diocese, a good prelate,
who treated him with the utmost kindness, which Richard’s father
amply repaid, when, in after years, the Bishop visited England as an
exile and a pauper. Edmund Burke went to Paris at the same time,
not merely for the pleasure of making acquaintance with the
agreeable and distinguished members of society, but for the purpose
of investigating the causes of the revolutionary movement, which
was beginning by degrees to convulse the French nation. He was
presented to the Duchesse de Luxembourg, and to Madame du
Deffand, who laments that ‘the Englishman speaks French so badly,
in spite of which everybody likes him, and thinks he would be most
agreeable, if he could make himself understood’! What a strange
position for Edmund Burke; he was able, however, to follow French
perfectly as a listener, and was much delighted with hearing La
Harpe’s tragedy of Les Barmecides read at the Duchess’s house. He
became acquainted with the Count de Broglie, one of the King’s
confidential Ministers, and Caraccioli, the Neapolitan Envoy, and
many members of the haute noblesse. Bent on weighing the balance
of political opinion in Paris, Burke did not confine his visits to the
salons of one faction or another; he was a frequent guest at the
house of Mademoiselle d’Espinasse, the well-known writer of love-
letters so ardent, that it was feared they would consume the paper
on which they were written! And here he saw the man who inspired
those tender epistles,—one Guibert, a colonel in the Corsican Legion,
who had lately written a book, which had made a great noise in
Paris, all the more that it had been suppressed by the Government.
Burke studied the men and their works, and drew his own
conclusions; he also, in common with all foreigners, went to
Versailles, and saw the old King, Louis Quinze, at Mass, in a pew,
just above Madame du Barry, and the Dauphin and his young bride
dine in public with great pomp: Marie Antoinette, who, ‘glittering like
the morning star, full of life, and joy, and splendour,’—that vision of
beauty, indelibly stamped on his memory, which suggested many
‘words that burn,’ and inspired many an enthusiastic and eloquent
appeal in behalf of the unfortunate French Sovereigns. Madame du
Deffand flattered herself that Burke had gone home enamoured with
the nation at large, but she was mistaken; he was never blinded, as
were so many of his countrymen, especially his own party, by
theoretical benefits of the French Revolution, but foresaw, in all their
terrible distinctness, the horrors and excesses of the impending
Reign of Terror. On his return to London, he renewed his
acquaintance with all the eminent men of the day. His friendship
with Johnson and Reynolds lasted till the death of both those loved
companions; and Johnson, whose opinions, especially on politics,
were usually opposed to those of Burke, used to say he did not
grudge Edmund being the first man in the House of Commons, for
was not Edmund the first man everywhere? ‘Indeed, he is a man, sir,
that if you met him, for the first time, in the street, when, overtaken
by a drove of oxen, you both stepped aside for five minutes’ shelter,
from whom you could not part without saying, “What an
extraordinary man!”’
So extraordinary was Burke’s fame for eloquence, ability, and the
liberality of his views, that the important city of Bristol chose him for
their Member unsolicited. During the time he represented them, the
Bristolians, for the most part, were very proud of their brilliant M.P.,
but his popularity began to wane when he opposed war, and
advocated, not only Irish free-trade, but the Catholic Relief Bill. It
would appear that constituents, for the most part, aspire to a
despotic rule over the speeches and votes of their representatives, in
proportion to the democracy of their own opinions. Now Edmund
Burke was in reality what most politicians are in name only,
independent, and some words of his that bear on this subject
deserve to be engraved in golden letters: ‘He who sits in Parliament
should speak the language of truth and sincerity, should never be
ready to take up or lay down any great political question for the
convenience of the hour; his duty is to support the public good, not
to form his opinions in order to get into, or remain in, Parliament.’
He therefore sacrificed his seat at Bristol to his love of
independence; for although his constituents, after attacking and
maligning him, offered to re-elect him, Burke went down in person
to decline the honour, in a speech, the eloquence of which could
only be equalled by its dignity. He was then elected for Malton, the
borough for which Lord Rockingham had originally destined him, and
for which he sat until the close of his Parliamentary career. The
Gordon Riots broke out this year, and Burke’s house was one of the
first doomed to destruction, for ‘was he not the patron and promoter
of Popery?’ The authorities provided him with a garrison of sixteen
soldiers, thus saving his dwelling in Charles Street, St. James’s, from
sharing the fate of Sir George Savile’s (who had brought in the
Catholic Relief Bill),—his house being gutted, and the whole of the
furniture converted into a bonfire. Savile was a neighbour of Sir
Joshua Reynolds.
In 1782 Lord Rockingham once more resumed the head of affairs,
on the resignation of Lord North, and Edmund Burke was appointed
Paymaster of the Forces. This had hitherto been a place of great
emolument, but Burke was not one to advocate reform in every
department but his own—he who had so lately urged economical
reform in high places. He considered the office overpaid, and cut it
down, salary and profits, to the tune of some thousands. His ‘dear
Dick’ was made his father’s deputy, with a stipend of £500 a year,
and was shortly afterwards promoted to a better post under
Government. The death of Lord Rockingham broke up the party.
Burke resigned when Lord Shelburne came in, but resumed office
under the Coalition Ministry—Duke of Portland, Premier. In 1784, ‘the
pilot that weathered the storm,’ William Pitt, took the helm, and
Burke retired from official life for good; but he never slackened in his
Parliamentary labours, taking a lead in all the important business of
the day, and, above all, displaying the liveliest interest in Indian
affairs. His name is indissolubly connected with that of Warren
Hastings, of whose impeachment he was the principal mover; and
during the weary prolongation of the trial, he never rested from his
attack on the Governor-General, either by speech or writing. Suffice
it to say, that, on the opening of the trial, Edmund Burke made a
speech which lasted four days, and, at the conclusion of the
proceedings, one which occupied nine days, and was indeed a
wonder, though it did not influence the sentence, as Warren
Hastings was acquitted.
In the meantime all Burke’s preconceived notions of displeasure at
the progress of the Revolution in France were more and more
increased and confirmed by the rapid strides which were being made
towards the anarchy he had foretold. One memorable day he rose in
the House to speak on the subject which absorbed and agitated his
mind. He was worked up to a pitch of excitement; he commented,
with vehemence, on the encouragement which Fox’s eulogiums had
afforded the French Revolution, and went on to say that, in speaking
his mind, he was well aware he should this day provoke enemies,
and incur the loss of friends.
‘No! no!’ cried Fox, ‘there will be no loss of friends.’
Burke knew better; he knew what was in store for him. ‘But if my
firm and steady adherence to the British Constitution place me in
such a dilemma, I am ready to incur the risk, and my last words
shall be, “Fly from the French Constitution!” I have done my duty at
the price of my friend; our friendship is at an end.’
He was right in his prognostications; not only was there a breach
between him and Fox, who had been one of his most intimate
friends, and whom he henceforth met as a stranger, but the whole
party kept aloof from Burke. They accused him of having deserted
his principles, and the Whig newspapers were most violent in their
abuse. He was annoyed and grieved by these charges, but they did
not influence his opinions or his conduct. He sent his son to Coblenz,
to communicate with the Royalist exiles, but the mission was
productive of no good. He published his celebrated Reflections on
the French Revolution, which converted some readers to his way of
thinking, and exasperated others; and he continued to write
pamphlet upon pamphlet on the same subject, waxing warmer and
warmer as he wrote, and urging interference on the English
Government. Miss Burney, who met him about this time, writes that
‘he is not well, and much tormented by the state of political affairs. I
wish you could see this remarkable man when he is easy, happy, and
with those whom he cordially likes; but politics, even on his own
side, must be carefully excluded: on that theme his irritability is so
terrible that it gives immediately to his face the expression of a man
who is defending himself against murderers.’ The news of the French
King’s execution produced a profound sensation in England, and
turned the current of feeling, for the most part, in the direction to
which Burke had so long, and vainly, endeavoured to direct it.
We must not omit to record a strange episode in his Parliamentary
life that occurred on the bringing in of the Alien Bill, which imposed
certain pains and restrictions on foreigners coming to this country.
Fox had already spoken, when Edmund Burke rose to address the
House, and it was easy to perceive he was, if possible, more excited
than usual. He thrust his hand into his bosom, and drew forth a
dagger with a tragic gesture which would have done honour to his
friend David Garrick; and flinging the shining weapon on the floor of
the House, called on all present to keep all French principles from
their heads, all French daggers from their hearts;... to beware of the
intrigues of murderous atheists, and so forth; and he concluded by
adjuring his audience to listen to his warning, by all the blessings of
time and the hopes of eternity! This extraordinary proceeding, which
is remembered in history as ‘the dagger scene,’ produced, as may be
imagined, different effects on different hearers; there were some on
whom it made a deep impression, while there were others who
accused the speaker of having imagined and rehearsed a bit of
melodrame. Rehearsal there was none. The facts were these: Burke,
on his way to the House of Commons, had been shown the dagger
in question, which had been sent over from France as a pattern for a
large order to be executed in this country.
He had announced his intention of retiring from public life as soon
as the trial of Warren Hastings should be brought to a conclusion;
and when at length it was so, he applied for the Chiltern Hundreds,
and his son Richard was elected for his vacant seat.
Pitt proposed to confer a peerage on the man, for whom he had,
in spite of many opposite ways of thinking, a profound admiration,
by the title of Lord Beaconsfield; but a storm was fast gathering,
which darkened the remnant of Burke’s life, and hastened his end.
His only child, his idolised Richard, was attacked with sudden
illness, to which he succumbed. This young man’s handsome face,
familiar to us from the portraits by his father’s friend Reynolds, bore
a sullen and somewhat defiant expression, which inclines us to
believe the general verdict, that he was a man of ungovernable
disposition. Two years before his death he had been sent to Ireland
on business by the Catholic Committee, and while there, as also on
his return to London, he had proved himself totally unfit for the trust
reposed in him. The character given of Richard Burke by one who
knew him well was as follows: ‘He is by far the most impudent and
opinionative fellow I have ever met.’ Yet in his parents’ fond eyes he
was faultless, and few things are more pathetic than the father’s
allusion to his heavy loss. ‘The storm has gone over me,’ he says; ‘I
lie like one of those old oaks that the late hurricane has scattered
round me; I am torn up by the roots; I am alone, I have none to
meet my enemies in the gate. I live in an inverted order: those who
should have been to me as posterity are in the place of my
ancestors.’
Both the King and Pitt (the Premier) were anxious to provide for
the great statesman’s declining days, and a considerable grant was
assigned him by the Crown. Acceptable as the relief from financial
anxiety must have been to the man, now advancing in years and
bowed down by sorrow, Burke was much disturbed that the question
of the pension had not been brought before Parliament. The sequel
proved that his scruples were well founded, for the Duke of Bedford
and Lord Lauderdale made this stipend a plea for attacking the
Government, to which they were in opposition. But Edmund Burke,
says one of his latest biographers, ‘was not slow to reply, and, in his
letter to a noble Lord, made one of the most splendid repartees in
the English language.’
The ex-statesman in his retirement continued to write political
tracts, some of which were not published till after his death. He
found his best and truest consolation in the exercise of that charity
and benevolence in which his soul had ever delighted. He had
established at Beaconsfield a school for the orphans of those who
had perished in the French Revolution, or the children of poor
emigrants; sixty boys in number; and it is pleasant to learn how, in
the society of the little ones he was befriending, his cheerfulness
returned; how the great man, the distinguished orator, would join in
their childish sports, roll with them on the green turf, and convulse
them with laughter by his ‘wretched puns.’ The visits of some faithful
friends at The Gregories gave him also unfeigned pleasure, and he
loved to speak with, or of, his old associates. Alluding one day to
Fox, he said, ‘Ah, that is a man made to be loved!’ When he felt his
end approaching he sent affectionate messages to his absent
friends, gave calm directions respecting his worldly affairs, and
enlarged sorrowfully on the melancholy state of the country. Fox was
much affected when he heard of the death of his former friend, and
proposed that he should be buried in Westminster Abbey. But the
will provided otherwise: ‘A small tablet or flagstone, in Beaconsfield
Churchyard, with a short and simple inscription. I say this, because I
know the partiality of some of my friends; but I have had too much
of noise and compliment in my life.’
Burke left all he possessed to his ‘entirely loved, faithful, and
affectionate wife, with whom I have lived so happily for many years.’
After mentioning several noblemen and gentlemen, whose friendship
he highly valued, and who all followed him to the grave, he adds, ‘If
the intimacy I have had with others has been broken off by political
difference on great questions, I hope they will forgive whatever of
general human frailty, or of my own particular infirmity, has entered
into that consideration; I heartily entreat their forgiveness.’
We insert this short extract, because we think this last of Burke’s
writings gives the best notion of his character, and because we
consider that the feelings which dictated these words are sublime,
and their expression beautiful. He does not forget to recommend his
little emigrants to the continued generosity and patronage of William
Pitt and other influential personages. Edmund Burke was very
popular with women, ‘even,’ says the biographer from whom we
have already quoted, ‘those who were angry at his sympathy with
American rebels, his unkind words about the King (this was on the
subject of economical reform), and his cruel persecution of poor
Warren Hastings.’ Meantime he contrived to captivate such different
characters as Hannah More, Elizabeth Carter, and Fanny Burney, who
met him at Sir Joshua Reynolds’s on Richmond Hill, and could not
find terms for her admiration of his noble air, commanding address,
clear, penetrating, sonorous voice, powerful, eloquent, copious
language; at home on every subject, she had never seen a more
delightful man. His features are familiar to us from the portraits of
Sir Joshua and Romney, who also painted him.

No. 2.
CHARLES JAMES FOX.

Blue coat. Buff waistcoat. Powder.

BORN 1749, DIED 1806.

By Jackson after Reynolds.

HARLES JAMES FOX, third son of the first Lord Holland,


was born in 1749.
Lord Holland was the most able and unprincipled of
the able and unprincipled statesmen of the school of
Walpole. In private life he seems to have had something of the
generous and sweet-tempered disposition of his son Charles,
towards whom he exhibited a boundless, but not very judicious,
affection. He spoilt him as a child. He gave him so much money at
Eton, as by example to inaugurate a new state of things at that
school, and he was constantly taking him away from his studies at
Oxford to indulge him prematurely in the dissipations of fashionable
life. He brought him into Parliament before he was of age, and
encouraged him from the first to take part in every important
debate.
Such were the early circumstances of Charles Fox. His abilities at
once showed themselves to be of the very highest order, and exactly
fitted for the field in which they were to be displayed.
A power of close and rapid reasoning, combined with a strength
and passion which would have made even mere declamation
effective, a slight hesitation indeed in his cooler moments, but when
he was excited a flow of language almost too rapid and too copious,
and altogether inexhaustible, a miraculous quickness in perceiving at
a glance the weak points in the speech of an opponent, and a
matchless dexterity in taking advantage of them: these were the
characteristics of his extraordinary eloquence. In no age and no
country could he have found an audience more capable of
appreciating his particular gifts than the House of Commons of that
period. On the other hand, no audience could have been more ready
to forgive the total absence of preparation, the occasional repetition,
the want of arrangement and the want of finish, which were his
faults, and which would have seemed very serious faults in the
Athenian Assembly or the Roman Senate.
His private life at the outset, and long afterwards, was stained by
dissipation of every kind. He entered Parliament with no fixed
principles. He was to the last unduly carried away by the spirit of
faction. But there was a goodness as well as a manliness in his
nature, and a justness in his judgment, which were apparent from
the very first, and which more and more asserted themselves till
they threw his faults entirely into the shade. He grew steadily in
character and estimation, till, at the time of his death, he was
regarded by a large circle with an idolatrous attachment, which no
other statesman has ever inspired. More than twenty years after
there were people who could not mention his name without tears in
their eyes.
Fox at once took a prominent part in public life. He vehemently
defended the unconstitutional action of the Government against
Wilkes, accepted office, was turned out soon afterwards for speaking
against the Ministry, struck right and left for some time in an
irregular manner, and finally, at the age of six-and-twenty, settled
down into steady and vigorous Opposition to the war with our
American colonists, which then broke out.
This threw him into association with Burke, and with the Whigs,
and his stupendous Parliamentary abilities made him, before the end
of the war, virtually the leader of the Opposition in the House of
Commons.
In 1782 Lord Rockingham came in on the question of
acknowledging the independence of America. Fox and Lord
Shelburne were the Secretaries of State. Jealousies and disputes
arose between the two last, and when, in a few months, Lord
Rockingham died, open enmity was declared between them. The
King sent for Shelburne. Fox and his supporters formed a coalition
with the old war party, under Lord North. Shelburne had to resign,
and Fox, much to the disgust of the King, became master of the
situation, and with the Duke of Portland for nominal Prime Minister,
exercised complete power. All this seems to us who live in these
days very unprincipled, and though the politicians of that depraved
period do not seem to have been much shocked, the general public
took a different view, as was very shortly made evident.
At first Fox and North seemed to carry everything before them;
but retribution was at hand. The first great measure which they
brought forward was caused by the cruel and unprincipled conduct
of the servants of the East India Company. It was no less a scheme
than to vest the whole Government of India for four years in the
hands of a Commission appointed by Parliament, or, in other words,
by the Ministers who happened at the moment to be in power. A Bill
to this effect passed the House of Commons almost without
opposition, but by the personal influence of the King it was thrown
out in the House of Lords, and Fox and the other Ministers, though
they commanded an immense majority in the House of Commons,
were immediately dismissed.
They must speedily have been restored to power, if the House of
Commons had really represented the feelings of the people; but this
was not the case, for public opinion, as I have said, had been
thoroughly scandalised by the unnatural coalition between two such
completely opposite parties as those of Fox and North. But in spite
even of this state of public opinion, it is very doubtful if the
unexampled and absolute personal ascendency which Fox had
established in Parliament would not have ensured his speedy return,
if another most extraordinary man had not appeared upon the
scene.
This was William Pitt, at this time only twenty-three years of age.
Pitt had shortly before burst forth upon the world as a full-fledged
orator of the very highest order. He now assumed the lead of the
Government in the House of Commons; fought battle after battle,
still defeated, but steadily increasing his numbers, till he at last
succeeded in arriving within one of a majority. Then, and not till
then, did he dissolve Parliament, with so overwhelming a result, that
he remained for many a long year in complete though not
unchallenged possession of supreme power.
Fox now entered upon what was destined to be a long career of
opposition. He was the acknowledged leader of the Whig party in
the House of Commons. Supported by Burke and Sheridan and
Windham, he waged ceaseless and desperate war against the young
Prime Minister. Never, perhaps, in the whole course of our
Parliamentary history was there a brighter display of eloquence than
at this period, though the speakers were few in number, for this
simple reason, that none but the very best speakers could obtain a
hearing. Pitt and Fox towered conspicuously above these brilliant
few.
This sketch would be far too long if I were to attempt to give any
account, however brief, of the subjects of discussion during the next
few years, nor will I pretend to say which of these great men was
oftenest in the right or in the wrong. Fox, however, certainly seems
to lay himself open to the charge that whatever Pitt brought forward
he steadily and systematically opposed.
I will now come to the beginning of the French Revolution. This
tremendous occurrence so completely filled the minds of all parties
in England as to cause every other subject to be forgotten. The first
news of the destruction of the Bastile seems to have been received
on the whole with satisfaction, for the tyranny and corruption of the
ancien régime were well known, and justly reprobated in this
country. But as things went on, the upper classes began to become
seriously alarmed. The Tories, of course, led the way; and the
brilliant and forcible pen of Burke, the most richly gifted and learned
statesman, though not the most successful Parliamentary orator,
among the Whigs, expressed and inflamed the rising passion of the
people. The execution of the King, and still more that of the Queen,
were received with an outburst of horror and indignation. Then
came the Reign of Terror. By this time there was a wild panic among
owners of property. The just hatred of the cruelty which was daily
being perpetrated rose to frenzy. The old national animosity against
France intensified the public fury. In short, the tide of English feeling
ran with such overwhelming force against everything connected with
the French Revolution, as to sweep away from power and popularity
every man who had in the smallest degree identified himself with
any of its principles. Fox had done this. At the outset he had
expressed his exultation, in his usual vehement manner, and
afterwards, when others had begun to stand aghast, he in the main
adhered to his opinion. Nobody inveighed more strongly against the
Royal murders, and the other atrocities, but he still clung to the
belief that the ultimate result would be good. He strongly opposed
the interference of Europe, and particularly of England, with the
internal concerns of France. He denied that there was any necessity
for our going to war, and during the war he continued on every
possible occasion to urge the Government to make peace. The
opinion of later generations has, I think, on the whole, decided that
he was right, though people are still divided upon the subject. But,
be this as it may, it is impossible not to admire his conduct during
these years. His once proud and powerful party was scattered to the
winds. His ‘darling popularity,’ as Burke had formerly called it,
altogether disappeared. Friends of long standing became estranged,
and he was one who felt acutely the dissolution of friendship. Still,
however, he remained firm to his principles. Session after session,
though he stood almost alone, he continued to advocate his views
with such masterly ability as to extort the applause even of his
enemies. But at last, so hopeless did he find it to contend any more
against the stream, that, though he retained his seat, he almost
ceased to attend Parliament.
Fox now retired to his house at St. Ann’s Hill. He had become the
most domestic of men, and in company of the only woman he ever
really loved, and whom he soon afterwards married, he gave himself
up to all the pleasures of literary ease. In spite of the dissipation of
his youth, and the activity of his maturity, he had contrived to
acquire a large amount of information, and such was the constitution
of his mind, that whatever he learned he learned thoroughly. He was
an accomplished and accurate classical scholar, well acquainted with
modern languages, and well versed in the history and the poetry of
all countries and all times. His letters at this period to his nephew,
Lord Holland, throw a very pleasing light upon his pursuits and
character, and enable us to a certain extent to realise the fascination
which he possessed in his middle age for those who were just
entering upon manhood. Every subject is treated of in turn in the
easiest and most spontaneous manner; Greek and Latin authors are
critically examined, and their corresponding passages compared, or
a canto of Ariosto is discussed, or a couplet from one of Dryden’s
plays is pointed out as capable of being happily quoted in a speech
on current politics. Nor are the deeper lessons of history forgotten,
nor the public events of the moment; and all this in the simple and
familiar language of a man of the world, frequently illustrated by
similes drawn from racing or other sport. So far is there from being
any touch of pedantry or condescension, that it seems as if he was
asking his nephew’s advice upon all these matters, rather than
giving any opinion of his own. It was at this time he wrote his book
upon the reign of James II. These years in which, as a public man,
he was almost totally eclipsed, were perhaps the happiest in his life.
On the rare occasions when he was persuaded by his few remaining
political friends to appear in Parliament, and to make a speech, he
left home with the most intense reluctance, and returned there with
all the pleasure of a schoolboy at the end of the half.
After the Peace of Amiens he went to Holland and France, and
was received everywhere with respect and admiration.
On the renewal of the war, his Parliamentary attendances became
more frequent. He gathered round him a gradually increasing body
of devoted personal adherents, drawn largely from the new
generation. In his vigorous denunciation of the manner in which the
war was conducted, he frequently found himself supported by the
most extreme members of the war party. Many of these, like
Windham, had originally been Whigs, and the remembrance of old
friendship assisted in cementing the new alliance. There seems also
to have been at this time a growing feeling that one who divided
with Pitt, and with Pitt alone, the reputation of being the ablest and
most illustrious statesman of the day, should no longer be excluded
from the service of the State. On the death, therefore, of his great
rival, in 1806, when Lord Grenville became Prime Minister, Fox was
at once, and with general applause, made Secretary for Foreign
Affairs.
His efforts were immediately directed towards carrying out what
had long been his wish,—the making of an honourable peace. But he
found that this was no easy matter. It had suited the purpose of his
political opponents to represent him as being deficient in patriotism,
and this charge has been since repeated. There is nothing in his
public speeches to justify this odious accusation, and those passages
in his private letters which seem to lend some colour to it exult, it is
quite true, in the victories of the French arms, but only over the
Austrians and the Prussians. He writes with all the feelings of an
Englishman at the news of the battle of Trafalgar, though he cannot
help lamenting that one of the effects of that brilliant victory will be
to confirm the Government in what he considers a mistaken policy.
But the chief answer to the charge which I have mentioned may be
found in his conduct, now that for the first time he was installed in a
responsible position. Notwithstanding his ardent and avowed desire
for peace, the French soon discovered that they had to deal with a
man who could be as tenacious as Pitt himself, when the real
interests and the honour of his country were concerned.
Negotiations were protracted, and he was not destined to effect his
object.
But we are within sight of the end. Fox was still in what we should
now call middle age. He had long renounced the vices and excesses
of his youth. The factiousness and the ambition of later years were
also extinct. His intellect, without losing the smallest portion of its
power, had acquired a calm serenity. Never did he stand higher with
the public, and never was a statesman surrounded by a more faithful
and admiring band of supporters. It seemed as if at last his mighty
talents were to have free scope, and that his renown as an orator
was to be equalled by his success as a ruler of men. But it was not
to be. Nature cannot be overstrained with impunity, and he had tried
his constitution very severely in his earlier days. He was in bad
health when he took office, he was soon found to be suffering from
dropsy, and he sank rapidly. He died in September 1806, attended
by his wife, his nephew, and his niece, with all the affection due to
such a man.
His vigorous mind was still unclouded, and he retained his high
courage and his sweet temper to the last.
C.

No. 3.

CARDINAL DE RETZ.

Cardinal’s robes. Red skull-cap.

BORN 1614, DIED 1679.

By Le Brun.

EAN FRANÇOIS PAUL DE GONDI was born at Montmirail


en Brie. His father, Emmanuel de Gondi, served as
General under Louis XIII., and subsequently became a
recluse at the Oratory of Notre Dame. The family was
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like