Foundation Flash MX Applications

Similar documents
PHP 5 e-commerce Development

/smlcodes /smlcodes /smlcodes JIRA. Small Codes. Programming Simplified. A SmlCodes.Com Small presentation. In Association with Idleposts.

Android SQLite Essentials

TortoiseSVN 1.7. Beginner's Guide. Perform version control in the easiest way with the best SVN client TortoiseSVN.

Learning Drupal 6 Module Development

Apache Hive Cookbook. Hanish Bansal Saurabh Chauhan Shrey Mehrotra BIRMINGHAM - MUMBAI

Planning and Designing Your Site p. 109 Design Concepts p. 116 Summary p. 118 Defining Your Site p. 119 The Files Panel p. 119 Accessing Your Remote

Selenium Testing Tools Cookbook

Learn Programming with Flash MX

Selenium Testing Tools Cookbook

Join the p2p.wrox.com. Wrox Programmer to Programmer. Beginning PHP 5.3. Matt Doyle

Learning Embedded Linux Using the Yocto Project

The Flash Usability Guide

Sample Hands-On-Training Chapter Review Copy Only Contact Information Notice of Rights Notice of Liability Trademarks

HTML5 Games Development by Example

An Easy to Understand Guide 21 CFR Part 11

Fireworks MX: Zero to Hero. Joyce J. Evans Charles E. Brown

XML Primer Plus By Nicholas Chase

User Guide version 1.0

Writing & Executing a Software Validation Protocol: Plain and Simple

Scheduler (PRO) Module

MCITP Windows Server 2008 Server Administrator Study Guide

Software Testing using Visual Studio 2010

Confidea Wired Conference System

Beginning Web Programming with HTML, XHTML, and CSS. Second Edition. Jon Duckett

Table of Contents. Revision History. 1. Introduction Purpose Document Conventions Intended Audience and Reading Suggestions4

PHP6 AND MYSQL BIBLE BY STEVE SUEHRING, TIM CONVERSE, JOYCE PARK

RELEASE NOTES. Workpaper Management. Version 2.6

DATA VISUALIZATION WITH FLASH BUILDER

PHP And MySQL: A Step By Step Course By Matthew Gimson READ ONLINE

From Photoshop to Dreamweaver

Isight Component Development 5.9

Limit of Liability/Disclaimer of Warranty:

SAP Jam Communities What's New 1808 THE BEST RUN. PUBLIC Document Version: August

Training Kit Administering Microsoft SQL Server 2012 Databases. Training Kit EXAM SQL Server 2012 Databases

Dreamweaver Developer's Instant Troubleshooter

Sams Teach Yourself E-Commerce Programming With ASP In 21 Days By Steve Banick, Stephen Walther

Customization type Price for one page. Replacing (relocating) of images The whole page PSD, HTML $40 $20

ActionScript Coding Standards. by Michael Williams

Chapter 11: Editorial Workflow

/smlcodes /smlcodes /smlcodes. Shell Scripting TUTORIAL. Small Codes. Programming Simplified. A SmlCodes.Com Small presentation

Foundation PHP For Dreamweaver 8 By David Powers

This content has been downloaded from IOPscience. Please scroll down to see the full text.

Getting Help...71 Getting help with ScreenSteps...72

An administrator s guide

Essential Angular for ASP.NET Core MVC

Requirements Specification

All Adobe Digital Design Vocabulary Absolute Div Tag Allows you to place any page element exactly where you want it Absolute Link Includes the

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

Transaction Cordinator: Design and Planning

Lab 1 MonarchPress Product Description. Robert O Donnell CS411. Janet Brunelle. September 20, Version #2

Companion ebook Available Pro Android Includes Android 1.5 SOURCE CODE ONLINE US $44.99

BEAWebLogic. Portal. Overview

Staff User Guide PowerSchool Student Information System

Technology in Action. Chapter Topics (cont.) Chapter Topics. Reasons for Software Programming. Information Systems 10/29/2010

Scripting for Dragon NaturallySpeaking 9

By Phil Davis.

National College of Ireland BSc in Computing 2017/2018. Deividas Sevcenko X Multi-calendar.

Dreamweaver MX: PHP Web Development By Gareth Downes-Powell, Bruno Mairlot READ ONLINE

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

Microsoft Computer Vision APIs Distilled

Enterprise Reporting. 1 enterpri. Oracle Bl Publisher 11 g: A Practical Guide to. Enterprise data using Oracle Bl Publisher 11g

Introducing live graphics gems to educational material

Lightning Knowledge Guide

English Operation Manual

Web Applications Development

INTRODUCTION. Custom Built Online Marketing That Works For You VERSION 2.5 FEBRUARY 20, 2009

A Developer s Guide to the Semantic Web

Agile Swift. Swift Programming Using Agile Tools and Techniques. Godfrey Nolan

Creating Data Driven Websites with Dreamweaver MX 2004: Using ColdFusion MX, ASP 3.0 or ASP.NET

Enterprise JavaBeans 2.1

Using Open Source Software to Build a C++ Teaching Aide

Project. Minpeng Zhu

Lab 1 MonarchPress Product Description. Robert O Donnell. Old Dominion University CS411. Janet Brunelle. November 23, 2015.

SAMPLE CHAPTER SECOND EDITION. Don Jones Jeffery Hicks Richard Siddaway MANNING

The Unofficial Guide to Creating Reports In Crystal using your Pastel Data

UNDERGRADUATE PROJECT REVIEW REPORT

Web Development with Java

Overview. SUSE OpenStack Cloud Monitoring

Using this tutorial, you will create a Web page for a fictional foundation. The tutorial is divided into the following parts:

10 Steps to Document Translation Success

RELEASE NOTES. Xcede Professional Accounting. Version 10.5

FACETs. Technical Report 05/19/2010

L A T E X crash course

Compositing Visual Effects: Essentials For The Aspiring Artist [Kindle Edition] By Steve Wright READ ONLINE

Microsoft Access 2010 VBA Programming Inside Out Free Ebooks PDF

COPYRIGHTED MATERIAL. Part I: Getting Started. Chapter 1: Introducing Flex 2.0. Chapter 2: Introducing Flex Builder 2.0. Chapter 3: Flex 2.

Microsoft Word Basic Manually Table Of Contents Level 2007 Add

Finding Source Code On The Web For Remix And Reuse READ ONLINE

DOWNLOAD OR READ : ESSENTIAL GAME AUDIO A COMPLETE EDUCATION IN PRODUCING SOUND AND MUSIC FOR VIDEO GAMES PDF EBOOK EPUB MOBI

UPGRADE AND INSTALLATION NOTES. Practice Management Version 11

Alan Forbes - The Joy of PHP 1

Linux Command Line and Shell Scripting Bible. Third Edtion

Security Administrator Guide

Multimedia Design and Authoring

Fundamentals of Operating Systems. Fifth Edition

JobRouter Product description Version 3.0

Case Management Implementation Guide

1D CIW: Web Design Specialist. Course Outline. CIW: Web Design Specialist Apr 2018

Learning Php Mysql Javascript And Css A Step By Step Guide To Creating Dynamic Websites

Transcription:

r Foundation Flash MX Applications Scott Mebberson Steve Webster 0 1: ~ I G Jil l l T 0 Ill t i I G l 1._

Foundation Flash MX Applications 2003 A press Originally published by friends of ED in 2003 All rights reserved. No part of this book may be reproduced, stored in a retrieval system or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical articles or reviews. The authors and publisher have made every effort in the preparation of this book to ensure the accuracy of the information. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, friends of ED nor its dealers or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. First Printed February 2003 Trademark Acknowledgements friends of ED has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, friends of ED cannot guarantee the accuracy of this information. ISBN 978-1-59059-168-0 ISBN 978-1-4302-5211-5 (ebook) DOI 10.1007/978-1-4302-5211-5

Foundation Flash MX Applications Credits Authors Scott Mebberson Steve Webster Technical Reviewers Aaron Freitas Cath 0 Flynn jeremy Thomas Sam Riggs Scott Ysebert Indexers Joanne Crichton Simon Collins Proof Readers Victoria ldiens Simon Collins Editors Phill Jackson Gavin Wray Author Agent Laura jones Project Manager Victoria ldiens Commisioning Editor Andy Corsham Graphic Editor Avtar Bhogal Cover Design Katy Freer Managing Editor Sonia Mullineux

Foundation Flash MX Applications From Adelaide, Australia, Scott Mebberson cottaborates with developers, artists, and writers au around the world. His daily life includes writing books on Flash and for various columns, creating experimental art, and teaching and preaching Flash to the masses. An active memeber of the Flash community, Scott communicates to the world via www.pixelogic.org. Scott tries to make a living from freelancing, the world over. You can reach him almost 24 hours a day at the office, www.scottmebberson.com, and he's always interested in cottaboration - don't be shy, make contact! He wants to thank everyone who has helped him, most importantly, his partner Kate- she kicks arse! Steve Webster is a Professional Freelance Web Developer and Author who specializes in advanced dynamic web application development using PHP and MySQL with a Macromedia Flash front-end. He has studied for an HND in Software Engineering, during which time he lectured C/C++ programming at one of the largest cotteges in the UK. When he's not neck-deep in chapter manuscripts he's usuatty working on client projects or updating his personal site at http://www.codejunkie.co.uk. Acknowledgements: I have to say a special thank you to my fiancee Nicki for once again putting up with the relentless hours I spend in front of the computer. Without your overwhelming support and encouragement I'm not sure that I could have made it this far, and I only hope that I can repay the favour one day. I can no longer imagine my world without you in it. I don't know exactly when or how it happened, but I'm glad it did. As always, my thanks to the fine people at friends of ED and the rest of the book development team who have helped to deliver this book - you guys rock!

Table of Contents Introduction 1 Aims and philosophy... 1 How to use this book... 2 Layout conventions used in this book... 3 Support we're here for you... 4 Section 1: Framework 6 1 Essential Concepts 7 What is a Flash application?... 8 How does a Flash application work?... 9 What is a Web application?... 11 Flash applications vs. Web applications... 11 Client technology... 12 Flash Player 6: the rich client... 12 Communication technology/data transfer... 14 Introducing XML... 15 Flash Remoting... 16 Server technology... 17 Alternative platforms... 17 The platform matrix... 18 So which platform is for you?... 18 Landscape... 19 Getting technical... 20 What is a Flash application used for?... 20 What is a Flash application capable of?... 21 Associated technologies... 21 PHP... 21 XML... 22 MySQL... 23 2 Flash applications: in detail 27 Planning a Flash application... 28 Road map: the workflow of a Flash application... 28 The client-side... 30 Flash application intent... 31 Target audience....31 End-user technology... 32 The client-side graphic user interface... 32 User feedback... 33 The client-side road map... 34 The server-side... 35 Data, data, and more data... 36 The server-side road map... 37 Platform independence... 39

Foundation Flash MX Applications Piecing it together... 39 An entire Flash application road map....40 Object-oriented programming... 42 Dynamic Flash... 44 OOP and GUis....44 Why should I use OOP?....45 OOP glossary... 45 Flash application development cycle... 46 Concept... 46 Planning... 46 Workflow/Structure... 46 Prototype... 46 Concept revision... 47 Workflow/Structure revision... 47 Testing... 48 End product....48 Planning: a visual road map....48 Why is this so important?....49 How to create a road map... 49 FlashBlog...,.50 The FlashBlog front-end... 51 FlashBlog's client-side road map....54 The FlashBlog back-end....59 Section 2: Building the Application 66 3 Structural Elements 67 FlashBlog's timeline structure... 68 FlashBlogClass... 69 Object-oriented programming... 70 Objects and classes... 70 Instantiation... 71 The new operator... 72 Prototype objects vs. classes... 72 XML... 82 XML syntax... 82 XML and Flash applications... 85 Parsing the XML object... 97 Whitespace... 98 Case study: FlashBlog message templates... 1 13 4 Building the FlashBlog templates 127 FlashBlog's templates... 128 Markup and templates... 129 Template structure... 1 32 Text fields... 1 34

Table of Contents Resizing text fields... 137 Objects... 142 Why use an Object?... 142 Creating a FlashBlog template... 146 The getlnfo function... 151 5 Developing the Message Display Module 155 FlashBlog: markup SWF... 156 The getlnfo function... 158 Dynamic resizing and positioning... 160 Preloading the template SWF... 161 loading external movies... 161 duplicatemovieclip... 163 duplicatemovieclip versus attachmovie... 164 Using Array notation... 166 Debugging... 178 How do I debug Flash files?... 179 The Debugger... 185 6 User Interface Components 189 Flash Ul Component Sets... 190 What is a component?... 191 When should a component be used?... 194 FlashBlog Ul: the console... 195 Inside the console... 197 How will it work?... 197 Components dissected... 199 Components and Flash applications... 206 ScrollPane... 207 How does it work?... 208 7 Behind the scenes 1: PHP 225 Introducing PHP... 226 Flash applications and PHP... 227 XML and PHP... 239 Parsing an XML file in PHP... 245 Access permissions... 272 Flash and PHP... 277 Retrieving XML remotely... 286 8 Behind the Scenes II: MySQL and Data Storage 293 lntroduc~ng databases... 294 SQL... 297 FlashBlog's MySQL structure... 298 Using PHP and MySQL with Flash....301

Foundation Flash MX Applications Securing sensitive database information... 301 Case study: completing the Message Display Module....325 Server file structure... 325 Configuration files... 338 9 FlashBlog: Plugging it together 349 FlashBlog Ul components....350 Integrating the ProgressBarPlus and MessageBox into FlashBlog.. 360 Enhancing the back-end....375 Configuration file... 376 Saving configuration files... 379 PHP and file i/o.............379 Reading and writing XML files... 384 FlashBlog configuration settings interface....384 Creating the configuration interface....384 Parsing XML... 393 Centralizing the Message Display Module... 409 The posting interface... 413 Housekeeping... 438 10 Interface design 453 FlashBlog login interface...... 454 Shared objects...... 457 CheckBox component...... 465 Font symbols... 469 Authentication and security... 490 Authenticating users on the client-side... 491 Section 3: Further Resources 534 11 Departure Lounge 535 Techniques... 536 LoadVars vs. XML... 538 Tools....543 More PHP... 543 ASP... 543 Flash Remoting....544 Flash MX components....545 DataGrid...... 545 Extending FlashBlog... 547 CommentBlog..........547 MultiBlog...... 550

Table of Contents Appendix A- Installing Apache, PHP, and MySQL 555 Installing and configuring Apache, PHP, and MySQL on Microsoft Windows... 556 Installing and configuring Apache....557 Installing and configuring PHP... 561 Installing and configuring MySQL... 565 Appendix B- PHP Resources 571 Authors' homepages... 571 PHP for Flash links...... 571 Software homepages... 571 Setup tools... 572 PHP editors... 572 PHP forums... 572 PHP web resources... 572 Hosting companies supporting PHP... 573 Index 575