Programming Flex 2™ by Chafic Kazoun and Joey Lott

Total Page:16

File Type:pdf, Size:1020Kb

Programming Flex 2™ by Chafic Kazoun and Joey Lott Programming Flex™ 2 Other resources from O’Reilly Related titles Apollo for Flex Developers Ajax on Rails Pocket Guide Learning JavaScript ActionScrpt 3 Cookbook Programming Atlas ActionScript 3 Design Head Rush Ajax Patterns Rails Cookbook Essential ActionScript 3 Dynamic HTML: The Ajax on Java Definitive Reference oreilly.com oreilly.com is more than a complete catalog of O’Reilly books. You’ll also find links to news, events, articles, weblogs, sample chapters, and code examples. oreillynet.com is the essential portal for developers interested in open and emerging technologies, including new platforms, pro- gramming languages, and operating systems. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit conferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free. Programming Flex™ 2 Chafic Kazoun and Joey Lott Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo Programming Flex 2™ by Chafic Kazoun and Joey Lott Copyright © 2007 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (safari.oreilly.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Steve Weiss Cover Designer: Karen Montgomery Developmental Editor: Audrey Doyle Interior Designer: David Futato Production Editor: Philip Dangler Illustrators: Robert Romano and Jessamyn Read Indexer: Reg Aubry Printing History: April 2007: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Programming Flex 2, the image of a Krait Snake, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. This book uses RepKover™, a durable and flexible lay-flat binding. ISBN-10: 0-596-52689-X ISBN-13: 978-0-596-52689-4 [M] Table of Contents Foreword . xi Preface . xxi 1. Introducing Flex . 1 Understanding Flex Application Technologies 1 Using Flex Elements 6 Working with Data Services (Loading Data at Runtime) 7 Understanding the Differences Between Traditional (HTML) and Flex Web Applications 9 Understanding How Flex Applications Work 10 Understanding Flex and Flash Authoring 11 Understanding Flex 1.5 and Flex 2 12 Summary 12 2. Building Applications with the Flex Framework . 13 Using Flex Tool Sets 13 Creating Projects 15 Building Applications 19 Deploying Applications 31 Flash Player Security 31 Understanding HTML Wrappers 33 Using SWFObject 34 Using Runtime Shared Libraries 35 Summary 42 v 3. MXML . 43 Understanding MXML Syntax and Structure 43 Making MXML Interactive 50 Summary 52 4. ActionScript . 53 Using ActionScript 54 MXML and ActionScript Correlations 57 Understanding ActionScript Syntax 58 Variables and Properties 61 Inheritance 72 Interfaces 73 Handling Events 74 Error Handling 76 Using XML 78 Reflection 82 Summary 85 5. Framework Fundamentals . 86 Understanding the Flex Application Life Cycle 86 Differentiating Between Flash Player and Framework 88 Bootstrapping Flex Applications 89 Understanding Application Domains 92 Understanding the Preloader 94 Summary 95 6. Managing Layout . 96 Flex Layout Overview 96 Making Fluid Interfaces 116 Putting It All Together 117 Summary 120 7. Working with UI Components . 121 Understanding UI Components 122 Buttons 128 Value Selectors 129 Text Components 130 List-Based Controls 131 Pop-Up Controls 140 vi | Table of Contents Navigators 143 Control Bars 147 Summary 149 8. Framework Utilities and Advanced Component Concepts . 150 Tool Tips 150 Pop-Ups 156 Cursor Management 162 Drag and Drop 164 Customizing List-Based Controls 172 Focus Management and Keyboard Control 183 Summary 188 9. Working with Media . 189 Overview 189 Adding Media 191 Working with the Different Media Types 197 Summary 210 10. Managing State . 211 Creating States 211 Applying States 212 Defining States Based on Existing States 213 Adding and Removing Components 214 Setting Properties 216 Setting Styles 217 Setting Event Handlers 218 Using ActionScript to Define States 218 Managing Object Creation Policies (Preloading Objects) 228 Handling State Events 230 When to Use States 231 Summary 231 11. Using Effects and Transitions . 232 Using Effects 232 Creating Custom Effects 244 Using Transitions 251 Creating Custom Transitions 256 Summary 257 Table of Contents | vii 12. Working with Data . 258 Using Data Models 258 Data Binding 268 Enabling Data Binding for Custom Classes 277 Data Binding Examples 280 Building Data Binding Proxies 284 Summary 287 13. Validating and Formatting Data . 288 Validating User Input 288 Formatting Data 308 Summary 314 14. Customizing Application Appearance . 315 Using Styles 316 Skinning Components 333 Customizing the Preloader 344 Themes 348 Runtime CSS 351 Summary 354 15. Client Data Communication . 355 Local Connections 356 Persistent Data 360 Communicating with the Host Application 374 Summary 379 16. Remote Data Communication . 380 Understanding Strategies for Data Communication 381 Working with Request/Response Data Communication 382 Web Services 395 Real-Time/Socket Connection 406 File Upload/Download 407 Summary 408 17. Application Debugging . 409 The Flash Debug Player 409 Using FDB 413 Debugging with Flex Builder 2 414 viii | Table of Contents Remote Debugging 418 Logging Using trace( ) Within an Application 419 The Logging Framework 421 Debugging Remote Data 425 Summary 426 18. Application Components . 427 The Importance of Application Components 428 MXML Component Basics 429 Component Styles 440 Summary 443 19. Building Custom Components . 444 Component Framework Overview 444 Component Life Cycle 446 Component Implementation 449 Adding Custom Properties and Events 457 Adding Styling Support 460 Summary 462 Index . 463 Table of Contents | ix Foreword 1 Whenever I talk to people about Flex 2, the most common questions they ask are the basic ones: what is it, who is it for, and why did we build it? It turns out that although these questions are basic, they really get to the heart of what Flex 2 is all about. Flex 2 is a new technology for building rich web applications and experiences that run on Flash Player, so they look great, are responsive, and are highly interactive. It was designed specifically to be comfortable and productive for those coming from a web or application development background, though it is suitable for anyone. Why did we build it? Well that’s a longer story. This Shouldn’t Be Too Hard The genesis of my involvement with Flex 2 really started with a seed of inspiration. Like everyone who surfs the Web, I would occasionally come across an application that just blew me away. It would be responsive, look incredible, and have an almost cinematic quality to it. Being curious, I would poke around to figure out how it was built. What I discovered was that it was almost always built with Flash. Because my back- ground is in software development and I like to build things, this made me want to try Flash, so I did. The result was shocking and humbling. I failed miserably, and I came away unable to fathom how anybody built anything with Flash, never mind how they built the amazing creations that had inspired me. Part of my problem was with the Flash authoring tool. Not only didn’t it feel like the developer tools I’d used before, but also it didn’t really seem to have been designed for what I was trying to do. For example, the Timeline is one of the most notable fea- tures of Flash. I could not, for the life of me, figure out how I would use it to build an application. Although developer tools often provide a toolbox of components, such as buttons and lists that you can drag onto the design surface, the Flash toolbox was xi different. Here the components were things such as a line, rectangle, pen, pencil, ink bottle, and paint bucket. How do I build an application with a pencil? The other problem I had was with the terminology used to describe the concepts pre- sented by Flash Player. In Flash, small reusable UI elements are called Movie Clips. The main display area is called the Stage. The output of compiling the project is a Movie. I can’t tell you how weird it was to try to track down a problem by running the Debug Movie command. Maybe We Need a Different Approach From my experiment, I concluded that Flash simply was not designed for building applications, or for developers like me. However, rather than see this as a problem, I saw it as an opportunity. How many more great Flash applications would there be if it was easier for developers to build them? I focused on this question, instead of just trying harder to use Flash, because my main interest in software is not so much in writing applications, but in improving the process of doing so.
Recommended publications
  • Web Tracking: Mechanisms, Implications, and Defenses Tomasz Bujlow, Member, IEEE, Valentín Carela-Español, Josep Solé-Pareta, and Pere Barlet-Ros
    ARXIV.ORG DIGITAL LIBRARY 1 Web Tracking: Mechanisms, Implications, and Defenses Tomasz Bujlow, Member, IEEE, Valentín Carela-Español, Josep Solé-Pareta, and Pere Barlet-Ros Abstract—This articles surveys the existing literature on the of ads [1], [2], price discrimination [3], [4], assessing our methods currently used by web services to track the user online as health and mental condition [5], [6], or assessing financial well as their purposes, implications, and possible user’s defenses. credibility [7]–[9]. Apart from that, the data can be accessed A significant majority of reviewed articles and web resources are from years 2012 – 2014. Privacy seems to be the Achilles’ by government agencies and identity thieves. Some affiliate heel of today’s web. Web services make continuous efforts to programs (e.g., pay-per-sale [10]) require tracking to follow obtain as much information as they can about the things we the user from the website where the advertisement is placed search, the sites we visit, the people with who we contact, to the website where the actual purchase is made [11]. and the products we buy. Tracking is usually performed for Personal information in the web can be voluntarily given commercial purposes. We present 5 main groups of methods used for user tracking, which are based on sessions, client by the user (e.g., by filling web forms) or it can be collected storage, client cache, fingerprinting, or yet other approaches. indirectly without their knowledge through the analysis of the A special focus is placed on mechanisms that use web caches, IP headers, HTTP requests, queries in search engines, or even operational caches, and fingerprinting, as they are usually very by using JavaScript and Flash programs embedded in web rich in terms of using various creative methodologies.
    [Show full text]
  • Protokoly Pro Komunikaci Klient ˚U Na Platformˇe Flash
    MASARYKOVA UNIVERZITA F}w¡¢£¤¥¦§¨ AKULTA INFORMATIKY !"#$%&'()+,-./012345<yA| Protokoly pro komunikaci klient ˚una platformˇeFlash BAKALÁRSKA PRÁCA Tomáš Mizerák Brno, jar 2010 Prehlásenie Prehlasujem, že táto bakalárska práca je mojím pôvodným autorským dielom, ktoré som vypracoval samostatne. Všetky zdroje, pramene a literatúru, ktoré som pri vypracovaní používal alebo z nich ˇcerpal,v práci riadne citujem s uvedením úplného odkazu na prís- lušný zdroj. Vedúci práce: RNDr. David Šafránek, Ph.D. ii Pod’akovanie Dakujemˇ svojmu vedúcemu bakalárskej práce RNDr. Davidovi Šafránkovi, Ph.D. za pomoc, ochotu a strpenie, ktoré mi venoval pri tvorbe tejto práce. Taktiež d’akujem svojej rodine za podporu poˇcascelého štúdia a všetkým, ktorí mi akýmkol’vek spôsobom pomohli pri spracovaní tejto bakalárskej práce. iii Zhrnutie Vd’aka vysokej rozšírenosti technológie Flash a výkonu dnešných poˇcítaˇcovmôžeme im- plementovat’ aplikácie a hry bez nutnosti inštalácie. Táto práca zh´rˇnaspôsoby komunikácie klientov Flash a prehl’ad dostupných protokolov. V rámci práce boli jednoduchým nástro- jom otestované dva najrozšírenejšie protokoly pre Flash – HTTP a RTMP. Súˇcast’ou práce je ukážková aplikácia využívajúca RTMP pre spojenie klient-server a RTMFP pre peer-to-peer komunikáciu. iv Abstract Because of the great expansion of Flash technology and thanks to the performance of mod- ern computers we’re able to implement applications and games without the necessity of installing them. This thesis includes various possibilities of communication between Flash clients and an overview of available protocols. As a part of this thesis two most common protocols for Flash – HTTP and RTMP – were tested by a simple custom tool. The practical part is a demo application which uses RTMP for a client-server and RTMFP for peer-to-peer communication.
    [Show full text]
  • Privacy Notice
    PRIVACY NOTICE Effective Date: April 1, 2019 We at Richter7, Inc. (“Richter7”, “we” or “us”), respect your concerns about privacy. This Privacy Notice describes the types of information collected through our website at http://www.richter7.com (the “Site”), and how we may use the information, with whom we may share it and the choices available to you regarding our use of the information. We also describe the measures we take to safeguard the information and tell you how to contact us about our privacy practices. INFORMATION WE COLLECT We may collect and store personal information (such as name and other contact details) that you choose to provide to us when you provide them through the Site or when you contact us. The types of personal information we collect may include: • Contact information, such as your e-mail address and company; and • Other personal information you may submit to us, such as when you contact us. INFORMATION WE COLLECT BY AUTOMATED MEANS We are committed to making your online experience with our Site informative and relevant. To achieve this, we collect certain information by automated means when you visit this Site, such as browser cookies, web beacons, device identifiers, server logs, and other technologies. The information we obtain in the manner may include your IP address, browser type, device and operating system type and characteristics, referring URLs, information on actions taken on the Site, how many users visited our Site and dates and times of Site visits. We collect this information by various means, as explained below. Cookies A “cookie” is a text file that websites send to a visitor’s computer or other Internet-connected device to uniquely identify the visitor’s browser or to store information or settings in the browser.
    [Show full text]
  • An Analysis of Various Web Tracking Methods
    Rochester Institute of Technology RIT Scholar Works Theses 11-16-2012 An Analysis of various web tracking methods William Huba Follow this and additional works at: https://scholarworks.rit.edu/theses Recommended Citation Huba, William, "An Analysis of various web tracking methods" (2012). Thesis. Rochester Institute of Technology. Accessed from This Thesis is brought to you for free and open access by RIT Scholar Works. It has been accepted for inclusion in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact [email protected]. An Analysis of Various Web Tracking Methods by William Huba Committee Members Bo Yuan Yin Pan Sumita Mishra Thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in Networking and System Administration Rochester Institute of Technology B. Thomas Golisano College of Computing and Information Sciences 11/16/2012 Table of Contents Table of Contents ............................................................................................................................. 2 1. Abstract ................................................................................................................................. 5 2. Introduction .......................................................................................................................... 5 3. Related Work ........................................................................................................................ 6 4. Methods of profile detection ...............................................................................................
    [Show full text]
  • Developing Android Applications with Adobe
    Developing Android Applications with Adobe AIR wnload from Wow! eBook <www.wowebook.com> o D Véronique Brossier Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Developing Android Applications with Adobe AIR by Véronique Brossier Copyright © 2011 Véronique Brossier. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Mary Treseler Indexer: John Bickelhaupt Production Editor: Kristen Borg Cover Designer: Karen Montgomery Copyeditor: Audrey Doyle Interior Designer: David Futato Proofreader: Kristen Borg Illustrator: Robert Romano Printing History: May 2011: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Developing Android Applications with Adobe AIR, the image of a Royal Flycatcher, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein. ISBN: 978-1-449-39482-0 [LSI] 1303389007 A mon père.
    [Show full text]
  • Proquest Dissertations
    •u Ottawa l.'Umvcrsilc cnnnriicnw Canada's university FACULTE DES ETUDES SUPERIEURES mn FACULTY OF GRADUATE AND ET POSTOCTORALES u Ottawa POSDOCTORAL STUDIES I/Universittf canadiennc Canada's universily Gaofeng Liu M.Sc. (Systems Science) _„„.„„„„„_ Department of Systems Science A Flash-based Multimedia Whiteboard for Clinical Motion Analysis TITRE DE LA THESE / TITLE OF THESIS Dr. Ed Lemaire ___„__„„_____^^ EXAMINATEURS (EXAMINATRICES) DE LA THESE /THESIS EXAMINERS Dr. Shervin Shirmohammadi Dr. A. El Saddik Gary W. Slater Le Doyen de la Facuitedes eludes superieures et postdocioraies / Dean ofthe Faculty of Graduate and Postdoctoral Studies A Flash-based Multimedia Whiteboard for Clinical Motion Analysis Gaofeng Liu Thesis submitted to the Faculty of Graduate and Postdoctoral Studies In partial fulfillment of the requirements For the MSc degree in Systems Science System Science Department University of Ottawa © Gaofeng Liu, Ottawa, Canada, 2007 Library and Bibliotheque et 1*1 Archives Canada Archives Canada Published Heritage Direction du Branch Patrimoine de I'edition 395 Wellington Street 395, rue Wellington Ottawa ON K1A0N4 Ottawa ON K1A0N4 Canada Canada Your file Votre reference ISBN: 978-0-494-49238-3 Our file Notre reference ISBN: 978-0-494-49238-3 NOTICE: AVIS: The author has granted a non­ L'auteur a accorde une licence non exclusive exclusive license allowing Library permettant a la Bibliotheque et Archives and Archives Canada to reproduce, Canada de reproduire, publier, archiver, publish, archive, preserve, conserve, sauvegarder, conserver, transmettre au public communicate to the public by par telecommunication ou par I'lnternet, prefer, telecommunication or on the Internet, distribuer et vendre des theses partout dans loan, distribute and sell theses le monde, a des fins commerciales ou autres, worldwide, for commercial or non­ sur support microforme, papier, electronique commercial purposes, in microform, et/ou autres formats.
    [Show full text]
  • Userid Name = Userid Value = Test Value = Test123 Domain = Login.Site.Com Domain = .Site.Com Path = / Path = / Secure Secure
    CS 361S Web Security Model Vitaly Shmatikov (most slides from the Stanford Web security group) Reading Assignment Read “Rookits for JavaScript Environments” and “Beware of Finer-Grained Origins” slide 2 Browser and Network request website Browser reply Network OS Hardware slide 3 HTTP: HyperText Transfer Protocol Used to request and return data • Methods: GET, POST, HEAD, … Stateless request/response protocol • Each request is independent of previous requests • Statelessness has a significant impact on design and implementation of applications Evolution • HTTP 1.0: simple • HTTP 1.1: more complex slide 4 HTTP Request Method File HTTP version Headers GET /default.asp HTTP/1.0 Accept: image/gif, image/x-bitmap, image/jpeg, */* Accept-Language: en User-Agent: Mozilla/1.22 (compatible; MSIE 2.0; Windows 95) Connection: Keep-Alive If-Modified-Since: Sunday, 17-Apr-96 04:32:58 GMT Blank line Data – none for GET slide 5 HTTP Response HTTP version Status code Reason phrase Headers HTTP/1.0 200 OK Date: Sun, 21 Apr 1996 02:20:42 GMT Server: Microsoft-Internet-Information-Server/5.0 Connection: keep-alive Content-Type: text/html Data Last-Modified: Thu, 18 Apr 1996 17:39:05 GMT Content-Length: 2543 <HTML> Some data... blah, blah, blah </HTML> slide 6 Website Storing Info In Browser A cookie is a file created by a website to store information in the browser POST login.cgi Browser username and pwd Server HTTP Header: Set-cookie: NAME=VALUE ; domain = (who can read) ; If expires = NULL, expires = (when expires) ; this session only secure = (send only
    [Show full text]
  • Howse Joseph Mcsc CSCI N
    Illusion SDK: An Augmented Reality Engine for Flash 11 by Joseph Howse Submitted in partial fulfilment of the requirements for the degree of Master of Computer Science at Dalhousie University Halifax, Nova Scotia November 2012 © Copyright by Joseph Howse, 2012 DALHOUSIE UNIVERSITY FACULTY OF COMPUTER SCIENCE The undersigned hereby certify that they have read and recommend to the Faculty of Graduate Studies for acceptance a thesis entitled “Illusion SDK: An Augmented Reality Engine for Flash 11” by Joseph Howse in partial fulfilment of the requirements for the degree of Master of Computer Science. Dated: November 20, 2012 Supervisor: Readers: ii DALHOUSIE UNIVERSITY DATE: November 20, 2012 AUTHOR: Joseph Howse TITLE: Illusion SDK: An Augmented Reality Engine for Flash 11 DEPARTMENT OR SCHOOL: Faculty of Computer Science DEGREE: MCSc CONVOCATION: May YEAR: 2013 Permission is herewith granted to Dalhousie University to circulate and to have copied for non-commercial purposes, at its discretion, the above title upon the request of individuals or institutions. I understand that my thesis will be electronically available to the public. The author reserves other publication rights, and neither the thesis nor extensive extracts from it may be printed or otherwise reproduced without the author’s written permission. The author attests that permission has been obtained for the use of any copyrighted material appearing in the thesis (other than the brief excerpts requiring only proper acknowledgement in scholarly writing), and that all such use is
    [Show full text]
  • Flash Cookies and Privacy
    Flash Cookies and Privacy Ashkan Soltani[A], Shannon Canty[B][1], Quentin Mayo[B][2], Lauren Thomas[B][3] & Chris Jay Hoofnagle[C] School of Information[A] Summer Undergraduate Program in Engineering Research at Berkeley (SUPERB) 2009[B] UC Berkeley School of Law[C] University of California, Berkeley Berkeley, USA correspondence to: [email protected] Abstract have expiration dates by default, whereas HTTP cookies This is a pilot study of the use of “Flash cookies” by popular expire at the end of a session unless programmed to live websites. We find that more than 50% of the sites in our longer by the domain setting the cookie. Flash cookies are sample are using Flash cookies to store information about the stored in a different location than HTTP cookies,[7] thus user. Some are using it to “respawn” or re-instantiate HTTP users may not know what files to delete in order to eliminate cookies deleted by the user. Flash cookies often share the them. Additionally, they are stored so that different browsers same values as HTTP cookies, and are even used on and stand-alone Flash widgets installed on a given computer government websites to assign unique values to users. access the same persistent Flash cookies. Flash cookies are Privacy policies rarely disclose the presence of Flash cookies, not controlled by the browser. Thus erasing HTTP cookies, and user controls for effectuating privacy preferences are clearing history, erasing the cache, or choosing a delete lacking. private data option within the browser does not affect Flash cookies. Even the ‘Private Browsing’ mode recently added to most browsers such as Internet Explorer 8 and Firefox 3 Introduction still allows Flash cookies to operate fully and track the user.
    [Show full text]
  • Web Security the Same Origin Policy
    Web Security The Same Origin Policy Yan Huang Credits: slides adapted from Stanford and Cornell Tech Browser and Network request website Browser reply Network OS Hardware 2 Website Storing Info In Browser A cookie is a file created by a website to store information in the browser POST login.cgi Browser username and pwd Server HTTP Header: Set-cookie: NAME=VALUE ; • domain = (who can read) ; If expires = NULL, expires = (when expires) ; this session only secure = (send only over HTTPS) GET restricted.html Browser Cookie: NAME=VALUE Server • HTTP is a stateless protocol; cookies add state 3 Content Comes from Many Sources ◆ Scripts <script src=“//site.com/script.js”> </script> ◆ Frames <iframe src=“//site.com/frame.html”> </iframe> ◆ Stylesheets (CSS) <link rel=“stylesheet” type="text/css” href=“//site.com/theme.css" /> ◆ Objects (Flash) - using swfobject.js script <script> var so = new SWFObject(‘//site.com/flash.swf', …); so.addParam(‘allowscriptaccess', ‘always'); so.write('flashdiv'); </script> Allows Flash object to communicate with external scripts, navigate frames, open windows 4 Browser Sandbox ◆ Goal: safely execute JavaScript code provided by a website • No direct file access, limited access to OS, network, browser data, content that came from other websites ◆ Same origin policy • Can only access properties of documents and windows from the same domain, protocol, and port ◆ User can grant privileges to signed scripts • UniversalBrowserRead/Write, UniversalFileRead, UniversalSendMail 5 Same Origin Policy protocol://domain:port/path?params
    [Show full text]
  • APPENDIXES Appendix A
    Part Four APPENDIXES Appendix A ERROR CODES This appendix lists the error codes and error messages for the various versions of Flash Lite. Table A-1 shows the error codes for errors that can occur in Flash Lite ver- sions 1.0 and 1.1, and Table A-2 shows the error codes for versions 2.0 and later. (In the later versions, the missing error code numbers 5 and 9 are by design, probably because the engineers of Flash Lite see them as unlucky numbers.) 441 APPENDIX A Table A-1. Error codes for Flash Lite 1.0 and 1.1 Error code Error message 1 Out of memory. 2 Stack limit reached. 3 Corrupt SWF data. 4 ActionScript stuck. This error can occur if the code doesn’t run within the preset time limits (normally meaning that the CPU of the device is too slow). 5 Infinite AS loop. 6 Bad JPEG data. 7 Bad sound data. 8 Cannot find host. 9 ActionScript error. 10 URL too long. Table A-2. Error codes for Flash Lite 2.0 and later Error code Error message 1 Out of memory. 2 Stack limit reached. 3 Corrupt SWF data. 4 ActionScript stuck. This error can occur if the code doesn’t run within the preset time limits (normally meaning that the CPU of the device is too slow). 6 Bad image data; corrupt or unsupported image file. 7 Bad sound data; corrupt or unsupported sound file. 8 Root movie unloaded. 10 URL too long. 11 Insufficient memory to decode image. 12 Corrupt SVG data.
    [Show full text]
  • FLASH PLAYER ADMINISTRATION GUIDE for MICROSOFT WINDOWS 8 2 Introduction
    ADOBE® FLASH® PLAYER Administration Guide for Microsoft® Windows® 8 Legal notices Legal notices For legal notices, see http://help.adobe.com/en_US/legalnotices/index.html. Last updated 4/22/2013 iii Contents Chapter 1: Introduction About this guide . 1 Flash Player and Windows 8 . 1 Additional resources . 1 Chapter 2: Flash Player environment Player files and locations . 3 Data formats used . 3 Network protocols used . 4 Player processes . 5 Player versions . 5 Chapter 3: Administration Privacy and security settings (mms.cfg) . 6 The Global FlashPlayerTrust directory . 16 Chapter 4: User-configured settings Accessing user settings (IE in Desktop Mode) . 17 Privacy options . 17 Local storage options . 18 Security options . 18 Display options . 19 The User FlashPlayerTrust directory . 20 Chapter 5: Security considerations Security overview . 21 Security sandboxes for local content . 22 About compatibility with previous Flash Player security models . 23 Data loading through different domains . 24 Additional security resources . 25 Last updated 4/22/2013 1 Chapter 1: Introduction About this guide This guide provides information that can be used to manage large-scale deployments of Adobe® Flash® Player on Windows 8, typically in a corporate environment. It is intended for the following audiences: • IT administrators who need to deploy Flash Player on their network computers and who need to understand techniques for controlling Flash Player behavior, capabilities, and functionality. • Developers (including programmers and other authors) designing and publishing SWF applications who want to understand the implications of SWF content deployment in their network environment. • IT managers interested in the security of SWF applications in their network environment. This document assumes that you are at least partially familiar with Flash Player and with Adobe® ActionScript®.
    [Show full text]