Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Flash Multiplayer Virtual Worlds

You're reading from  Flash Multiplayer Virtual Worlds

Product type Book
Published in Aug 2010
Publisher Packt
ISBN-13 9781849690362
Pages 412 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Flash Multiplayer Virtual Worlds
Credits
About the Author
About the Reviewers
1. Preface
1. Developing Flash Virtual World 2. Installing the Servers 3. Getting Familiar with SmartFoxServer 4. Creating Map and Ground in Isometric View 5. Creating Avatars 6. Walking Around the World 7. Creating Buildings and Environments in the Virtual World 8. Creating an Inventory System 9. Communicating with Other Players 10. Interacting with NPC 11. Designing Quests 12. Social Community 13. Deploying and Maintaining Flash Virtual World

Creating a Flash document to connect to the server


Let's try to connect to the SmartFoxServer that we've set up and play around some basic connection functions.

  1. 1. Create a new Flash document with ActionScript 3.0 supports and save it to the disk.

  2. 2. We need to set the class path for the API client of the SmartFoxServer.

  3. 3. Click on File | Publish Setting | Flash | Script: ActionScript 3.0 | Settings....

  4. 4. Click on the "+" and input the path of the Flash API client. It is located in the SmartFoxServer installation directory | Flash API | ActionScript 3.0.

  5. 5. In the same setting dialog, we also assigned the Document Class to Ch03_01 for our first example in Chapter 3.

  6. 6. Save the file in a new directory.

Next, let's create the document class file:

  1. 1. In Adobe Flash, click on File | New | ActionScript file to create an empty class file.

  2. 2. Save the file, and naming it as Ch03_01.as, to the same directory of the Flash document that was created in the previously mentioned steps.

  3. 3. Put the following...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}