Permalink
Browse files

Going live.

  • Loading branch information...
0 parents commit 57f38e4617903a20cc4f9c4e24998297f63b6263 @jubishop committed May 3, 2009
Showing with 10,189 additions and 0 deletions.
  1. +5 −0 .gitignore
  2. +69 −0 ApplicationBase.as
  3. +129 −0 app.xml
  4. +256 −0 com/adobe/crypto/MD5.as
  5. +88 −0 com/adobe/serialization/json/JSON.as
  6. +218 −0 com/adobe/serialization/json/JSONDecoder.as
  7. +302 −0 com/adobe/serialization/json/JSONEncoder.as
  8. +90 −0 com/adobe/serialization/json/JSONParseError.as
  9. +107 −0 com/adobe/serialization/json/JSONToken.as
  10. +70 −0 com/adobe/serialization/json/JSONTokenType.as
  11. +552 −0 com/adobe/serialization/json/JSONTokenizer.as
  12. +69 −0 com/adobe/utils/IntUtil.as
  13. BIN com/adobe/utils/IntUtil.as.cpgz
  14. BIN docs/fdfa.graffle/QuickLook/Preview.pdf
  15. BIN docs/fdfa.graffle/QuickLook/Thumbnail.tiff
  16. +1,782 −0 docs/fdfa.graffle/data.plist
  17. BIN docs/fdfa.graffle/image1.png
  18. +153 −0 fb/FBAPI.as
  19. +278 −0 fb/FBConnect.as
  20. +40 −0 fb/FBEvent.as
  21. +23 −0 fb/FBSession.as
  22. +55 −0 fb/display/FBAuthDialog.as
  23. +187 −0 fb/display/FBDialog.mxml
  24. +60 −0 fb/display/FBPermDialog.as
  25. +75 −0 fb/display/LoadAnimation.as
  26. +51 −0 fb/display/WindowBase.as
  27. +110 −0 fb/net/FBPost.as
  28. +107 −0 fb/net/JSONLoader.as
  29. +62 −0 fb/net/RedirectTester.as
  30. +251 −0 fbair.mxml
  31. BIN fbair/assets/app_icon.png
  32. BIN fbair/assets/blue_button.png
  33. BIN fbair/assets/blue_button_disabled.png
  34. BIN fbair/assets/blue_button_down.png
  35. BIN fbair/assets/comment.png
  36. BIN fbair/assets/composer_textarea.png
  37. BIN fbair/assets/connect_logo.png
  38. BIN fbair/assets/delete.png
  39. BIN fbair/assets/delete_dark.png
  40. BIN fbair/assets/delete_dark_over.png
  41. BIN fbair/assets/delete_over.png
  42. BIN fbair/assets/fblogo.png
  43. BIN fbair/assets/icons/icon_128.png
  44. BIN fbair/assets/icons/icon_16.png
  45. BIN fbair/assets/icons/icon_32.png
  46. BIN fbair/assets/icons/icon_48.png
  47. BIN fbair/assets/install_badge.png
  48. BIN fbair/assets/like.png
  49. BIN fbair/assets/photo_frame.png
  50. BIN fbair/assets/photo_frame_over.png
  51. BIN fbair/assets/plus.png
  52. BIN fbair/assets/plus_down.png
  53. BIN fbair/assets/scroll_handle.png
  54. BIN fbair/assets/scroll_well.png
  55. BIN fbair/assets/shrink_ufi.png
  56. BIN fbair/assets/shrink_ufi_over.png
  57. BIN fbair/assets/tab_active.png
  58. BIN fbair/assets/tab_out.png
  59. BIN fbair/assets/tab_over.png
  60. BIN fbair/assets/ufi-high.png
  61. BIN fbair/assets/ufi-low.png
  62. BIN fbair/assets/video_badge.png
  63. +149 −0 fbair/composer/Composer.mxml
  64. +94 −0 fbair/gui/LoadingIndicator.mxml
  65. +90 −0 fbair/gui/RoundedProfileImage.mxml
  66. +59 −0 fbair/gui/StylePrefs.as
  67. +95 −0 fbair/gui/filters/FilterTab.mxml
  68. +274 −0 fbair/gui/filters/FiltersBar.mxml
  69. +45 −0 fbair/gui/filters/FiltersMenu.mxml
  70. +51 −0 fbair/gui/filters/FiltersMenuItem.mxml
  71. +121 −0 fbair/gui/skins/FBAIRSkin.as
  72. +161 −0 fbair/nile/Nile.mxml
  73. +447 −0 fbair/nile/NileContainer.mxml
  74. +72 −0 fbair/nile/renderers/ActionRow.mxml
  75. +76 −0 fbair/nile/renderers/AttachmentRenderer.mxml
  76. +148 −0 fbair/nile/renderers/CommentBox.mxml
  77. +111 −0 fbair/nile/renderers/CommentRenderer.mxml
  78. +306 −0 fbair/nile/renderers/CommentsRenderer.mxml
  79. +148 −0 fbair/nile/renderers/LikesRenderer.mxml
  80. +51 −0 fbair/nile/renderers/MediaItem.mxml
  81. +273 −0 fbair/nile/renderers/NileRenderer.mxml
  82. +189 −0 fbair/nile/renderers/UFI.mxml
  83. +12 −0 fbair/styles/composer.css
  84. +122 −0 fbair/styles/filters.css
  85. +100 −0 fbair/styles/global.css
  86. +9 −0 fbair/styles/nile.css
  87. +211 −0 fbair/styles/renderers.css
  88. +50 −0 fbair/styles/size_large.css
  89. +21 −0 fbair/styles/size_small.css
  90. +127 −0 fbair/util/CommentCache.as
  91. +134 −0 fbair/util/FBUpdater.as
  92. +36 −0 fbair/util/FileUtil.as
  93. +68 −0 fbair/util/MathUtil.as
  94. +94 −0 fbair/util/Output.as
  95. +156 −0 fbair/util/ProfileCache.as
  96. +99 −0 fbair/util/StringUtil.as
  97. +73 −0 fbair/util/TimeUtil.as
  98. +170 −0 fbair/util/display/AnimatedCanvas.as
  99. +121 −0 fbair/util/display/FBButton.as
  100. +53 −0 fbair/util/display/GrowableTextArea.as
  101. +81 −0 fbair/util/display/LinkImage.as
  102. +47 −0 fbair/util/display/LinkLabel.as
  103. +47 −0 fbair/util/display/LinkText.as
  104. +38 −0 fbair/util/display/SmoothImage.as
  105. +79 −0 fbair/util/display/SpritedImage.as
  106. +84 −0 fbair/util/display/StubbornImage.as
  107. +1 −0 run
  108. +7 −0 test
5 .gitignore
@@ -0,0 +1,5 @@
+*.swf
+*.air
+*.cache
+certs
+build
69 ApplicationBase.as
@@ -0,0 +1,69 @@
+/*
+ Copyright Facebook Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+package {
+ import flash.data.EncryptedLocalStore;
+ import flash.events.Event;
+ import flash.utils.ByteArray;
+
+ import mx.core.Container;
+ import mx.core.ScrollPolicy;
+ import mx.core.WindowedApplication;
+
+ public class ApplicationBase extends WindowedApplication {
+ // Our app id
+ public static const AppID:Number = 75647677556;
+
+ public function ApplicationBase() {
+ layout = "absolute";
+ showGripper = showStatusBar = false;
+ addEventListener(Event.ADDED, added);
+ }
+
+ private function added(event:Event):void {
+ clean(event.target);
+ }
+
+ private function clean(container:*):void {
+ if (container == this) return;
+
+ // Automagic scrollbars and masks in flex cause so much pain
+ // and trouble, that we're going to remove them for all
+ // containers added to our application. Take that, flex!
+ if (container is Container) {
+ container.clipContent = false;
+ container.horizontalScrollPolicy =
+ container.verticalScrollPolicy = ScrollPolicy.OFF;
+
+ for (var i:int = 0; i < container.numChildren; i++)
+ clean(container.getChildAt(i));
+ }
+ }
+
+ // We manage locally stored preferences with these functions
+ public static function getPreference(prefName:String):Object {
+ var bytes:ByteArray = EncryptedLocalStore.getItem(prefName);
+ if (!bytes) return null;
+ return bytes.readObject();
+ }
+
+ public static function setPreference(prefName:String,
+ prefObject:Object):void {
+ var bytes:ByteArray = new ByteArray();
+ bytes.writeObject(prefObject);
+ EncryptedLocalStore.setItem(prefName, bytes);
+ }
+ }
+}
129 app.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://ns.adobe.com/air/application/1.5">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+ Specifies parameters for identifying, installing, and launching AIR applications.
+
+ xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
+ The last segment of the namespace specifies the version
+ of the AIR runtime required for this application to run.
+
+ minimumPatchLevel - The minimum patch level of the AIR runtime required to run
+ the application. Optional.
+-->
+
+ <!-- The application identifier string, unique to this application. Required. -->
+ <id>FBAIR</id>
+
+ <!-- Used as the filename for the application. Required. -->
+ <filename>Facebook for Adobe AIR</filename>
+
+ <!-- The name that is displayed in the AIR application installer.
+ May have multiple values for each language. See samples or xsd schema file. Optional. -->
+ <name>Facebook for Adobe AIR</name>
+
+ <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
+ <version>0.73</version>
+
+ <!-- Description, displayed in the AIR application installer.
+ May have multiple values for each language. See samples or xsd schema file. Optional. -->
+ <description>Facebook for Adobe AIR</description>
+
+ <!-- Copyright information. Optional -->
+ <copyright>Facebook 2009</copyright>
+
+ <!-- Settings for the application's initial window. Required. -->
+ <initialWindow>
+ <!-- The main SWF or HTML file of the application. Required. -->
+ <!-- Note: In Flex Builder, the SWF reference is set automatically. -->
+ <content>fbair.swf</content>
+
+ <!-- The title of the main window. Optional. -->
+ <title></title>
+
+ <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+ <systemChrome>standard</systemChrome>
+
+ <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+ <transparent>false</transparent>
+
+ <!-- Whether the window is initially visible. Optional. Default false. -->
+ <visible>false</visible>
+
+ <!-- Whether the user can minimize the window. Optional. Default true. -->
+ <minimizable>true</minimizable>
+
+ <!-- Whether the user can maximize the window. Optional. Default true. -->
+ <maximizable>true</maximizable>
+
+ <!-- Whether the user can resize the window. Optional. Default true. -->
+ <resizable>true</resizable>
+
+ <!-- The window's initial width. Optional. -->
+ <width>380</width> <!-- was 366 -->
+
+ <!-- The window's initial height. Optional. -->
+ <height>700</height>
+
+ <!-- The window's initial minimum size, specified as a width/height pair, such as "400 200". Optional. -->
+ <minSize>380 350</minSize>
+
+ <!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
+ <maxSize>380 3200</maxSize>
+ </initialWindow>
+
+ <!-- The subpath of the standard default installation location to use. Optional. -->
+ <!-- <installFolder></installFolder> -->
+
+ <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+ <!-- <programMenuFolder></programMenuFolder> -->
+
+ <!-- The icon the system uses for the application. For at least one resolution,
+ specify the path to a PNG file included in the AIR package. Optional. -->
+ <icon>
+ <image16x16>fbair/assets/icons/icon_16.png</image16x16>
+ <image32x32>fbair/assets/icons/icon_32.png</image32x32>
+ <image48x48>fbair/assets/icons/icon_48.png</image48x48>
+ <image128x128>fbair/assets/icons/icon_128.png</image128x128>
+ </icon>
+
+ <!-- Whether the application handles the update when a user double-clicks an update version
+ of the AIR file (true), or the default AIR application installer handles the update (false).
+ Optional. Default false. -->
+ <!-- <customUpdateUI></customUpdateUI> -->
+
+ <!-- Whether the application can be launched when the user clicks a link in a web browser.
+ Optional. Default false. -->
+ <allowBrowserInvocation>true</allowBrowserInvocation>
+
+ <!-- Listing of file types for which the application can register. Optional. -->
+ <!-- <fileTypes> -->
+
+ <!-- Defines one file type. Optional. -->
+ <!-- <fileType> -->
+
+ <!-- The name that the system displays for the registered file type. Required. -->
+ <!-- <name></name> -->
+
+ <!-- The extension to register. Required. -->
+ <!-- <extension></extension> -->
+
+ <!-- The description of the file type. Optional. -->
+ <!-- <description></description> -->
+
+ <!-- The MIME content type. -->
+ <!-- <contentType></contentType> -->
+
+ <!-- The icon to display for the file type. Optional. -->
+ <!-- <icon>
+ <image16x16></image16x16>
+ <image32x32></image32x32>
+ <image48x48></image48x48>
+ <image128x128></image128x128>
+ </icon> -->
+
+ <!-- </fileType> -->
+ <!-- </fileTypes> -->
+
+</application>
256 com/adobe/crypto/MD5.as
@@ -0,0 +1,256 @@
+/*
+Adobe Systems Incorporated(r) Source Code License Agreement
+Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
+
+Please read this Source Code License Agreement carefully before using
+the source code.
+
+Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable copyright license, to reproduce,
+prepare derivative works of, publicly display, publicly perform, and
+distribute this source code and such derivative works in source or
+object code form without any attribution requirements.
+
+The name "Adobe Systems Incorporated" must not be used to endorse or promote products
+derived from the source code without prior written permission.
+
+You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
+against any loss, damage, claims or lawsuits, including attorney's
+fees that arise or result from your use or distribution of the source
+code.
+
+THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
+ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
+NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
+OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.crypto {
+
+ import com.adobe.utils.IntUtil;
+
+ /**
+ * The MD5 Message-Digest Algorithm
+ *
+ * Implementation based on algorithm description at
+ * http://www.faqs.org/rfcs/rfc1321.html
+ */
+ public class MD5 {
+
+ /**
+ * Performs the MD5 hash algorithm on a string.
+ *
+ * @param s The string to hash
+ * @return A string containing the hash value of s
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public static function hash( s:String ):String {
+ // initialize the md buffers
+ var a:int = 1732584193;
+ var b:int = -271733879;
+ var c:int = -1732584194;
+ var d:int = 271733878;
+
+ // variables to store previous values
+ var aa:int;
+ var bb:int;
+ var cc:int;
+ var dd:int;
+
+ // create the blocks from the string and
+ // save the length as a local var to reduce
+ // lookup in the loop below
+ var x:Array = createBlocks( s );
+ var len:int = x.length;
+
+ // loop over all of the blocks
+ for ( var i:int = 0; i < len; i += 16) {
+ // save previous values
+ aa = a;
+ bb = b;
+ cc = c;
+ dd = d;
+
+ // Round 1
+ a = ff( a, b, c, d, x[i+ 0], 7, -680876936 ); // 1
+ d = ff( d, a, b, c, x[i+ 1], 12, -389564586 ); // 2
+ c = ff( c, d, a, b, x[i+ 2], 17, 606105819 ); // 3
+ b = ff( b, c, d, a, x[i+ 3], 22, -1044525330 ); // 4
+ a = ff( a, b, c, d, x[i+ 4], 7, -176418897 ); // 5
+ d = ff( d, a, b, c, x[i+ 5], 12, 1200080426 ); // 6
+ c = ff( c, d, a, b, x[i+ 6], 17, -1473231341 ); // 7
+ b = ff( b, c, d, a, x[i+ 7], 22, -45705983 ); // 8
+ a = ff( a, b, c, d, x[i+ 8], 7, 1770035416 ); // 9
+ d = ff( d, a, b, c, x[i+ 9], 12, -1958414417 ); // 10
+ c = ff( c, d, a, b, x[i+10], 17, -42063 ); // 11
+ b = ff( b, c, d, a, x[i+11], 22, -1990404162 ); // 12
+ a = ff( a, b, c, d, x[i+12], 7, 1804603682 ); // 13
+ d = ff( d, a, b, c, x[i+13], 12, -40341101 ); // 14
+ c = ff( c, d, a, b, x[i+14], 17, -1502002290 ); // 15
+ b = ff( b, c, d, a, x[i+15], 22, 1236535329 ); // 16
+
+ // Round 2
+ a = gg( a, b, c, d, x[i+ 1], 5, -165796510 ); // 17
+ d = gg( d, a, b, c, x[i+ 6], 9, -1069501632 ); // 18
+ c = gg( c, d, a, b, x[i+11], 14, 643717713 ); // 19
+ b = gg( b, c, d, a, x[i+ 0], 20, -373897302 ); // 20
+ a = gg( a, b, c, d, x[i+ 5], 5, -701558691 ); // 21
+ d = gg( d, a, b, c, x[i+10], 9, 38016083 ); // 22
+ c = gg( c, d, a, b, x[i+15], 14, -660478335 ); // 23
+ b = gg( b, c, d, a, x[i+ 4], 20, -405537848 ); // 24
+ a = gg( a, b, c, d, x[i+ 9], 5, 568446438 ); // 25
+ d = gg( d, a, b, c, x[i+14], 9, -1019803690 ); // 26
+ c = gg( c, d, a, b, x[i+ 3], 14, -187363961 ); // 27
+ b = gg( b, c, d, a, x[i+ 8], 20, 1163531501 ); // 28
+ a = gg( a, b, c, d, x[i+13], 5, -1444681467 ); // 29
+ d = gg( d, a, b, c, x[i+ 2], 9, -51403784 ); // 30
+ c = gg( c, d, a, b, x[i+ 7], 14, 1735328473 ); // 31
+ b = gg( b, c, d, a, x[i+12], 20, -1926607734 ); // 32
+
+ // Round 3
+ a = hh( a, b, c, d, x[i+ 5], 4, -378558 ); // 33
+ d = hh( d, a, b, c, x[i+ 8], 11, -2022574463 ); // 34
+ c = hh( c, d, a, b, x[i+11], 16, 1839030562 ); // 35
+ b = hh( b, c, d, a, x[i+14], 23, -35309556 ); // 36
+ a = hh( a, b, c, d, x[i+ 1], 4, -1530992060 ); // 37
+ d = hh( d, a, b, c, x[i+ 4], 11, 1272893353 ); // 38
+ c = hh( c, d, a, b, x[i+ 7], 16, -155497632 ); // 39
+ b = hh( b, c, d, a, x[i+10], 23, -1094730640 ); // 40
+ a = hh( a, b, c, d, x[i+13], 4, 681279174 ); // 41
+ d = hh( d, a, b, c, x[i+ 0], 11, -358537222 ); // 42
+ c = hh( c, d, a, b, x[i+ 3], 16, -722521979 ); // 43
+ b = hh( b, c, d, a, x[i+ 6], 23, 76029189 ); // 44
+ a = hh( a, b, c, d, x[i+ 9], 4, -640364487 ); // 45
+ d = hh( d, a, b, c, x[i+12], 11, -421815835 ); // 46
+ c = hh( c, d, a, b, x[i+15], 16, 530742520 ); // 47
+ b = hh( b, c, d, a, x[i+ 2], 23, -995338651 ); // 48
+
+ // Round 4
+ a = ii( a, b, c, d, x[i+ 0], 6, -198630844 ); // 49
+ d = ii( d, a, b, c, x[i+ 7], 10, 1126891415 ); // 50
+ c = ii( c, d, a, b, x[i+14], 15, -1416354905 ); // 51
+ b = ii( b, c, d, a, x[i+ 5], 21, -57434055 ); // 52
+ a = ii( a, b, c, d, x[i+12], 6, 1700485571 ); // 53
+ d = ii( d, a, b, c, x[i+ 3], 10, -1894986606 ); // 54
+ c = ii( c, d, a, b, x[i+10], 15, -1051523 ); // 55
+ b = ii( b, c, d, a, x[i+ 1], 21, -2054922799 ); // 56
+ a = ii( a, b, c, d, x[i+ 8], 6, 1873313359 ); // 57
+ d = ii( d, a, b, c, x[i+15], 10, -30611744 ); // 58
+ c = ii( c, d, a, b, x[i+ 6], 15, -1560198380 ); // 59
+ b = ii( b, c, d, a, x[i+13], 21, 1309151649 ); // 60
+ a = ii( a, b, c, d, x[i+ 4], 6, -145523070 ); // 61
+ d = ii( d, a, b, c, x[i+11], 10, -1120210379 ); // 62
+ c = ii( c, d, a, b, x[i+ 2], 15, 718787259 ); // 63
+ b = ii( b, c, d, a, x[i+ 9], 21, -343485551 ); // 64
+
+ a += aa;
+ b += bb;
+ c += cc;
+ d += dd;
+ }
+
+ // Finish up by concatening the buffers with their hex output
+ return IntUtil.toHex( a ) + IntUtil.toHex( b ) + IntUtil.toHex( c ) + IntUtil.toHex( d );
+ }
+
+ /**
+ * Auxiliary function f as defined in RFC
+ */
+ private static function f( x:int, y:int, z:int ):int {
+ return ( x & y ) | ( (~x) & z );
+ }
+
+ /**
+ * Auxiliary function g as defined in RFC
+ */
+ private static function g( x:int, y:int, z:int ):int {
+ return ( x & z ) | ( y & (~z) );
+ }
+
+ /**
+ * Auxiliary function h as defined in RFC
+ */
+ private static function h( x:int, y:int, z:int ):int {
+ return x ^ y ^ z;
+ }
+
+ /**
+ * Auxiliary function i as defined in RFC
+ */
+ private static function i( x:int, y:int, z:int ):int {
+ return y ^ ( x | (~z) );
+ }
+
+ /**
+ * A generic transformation function. The logic of ff, gg, hh, and
+ * ii are all the same, minus the function used, so pull that logic
+ * out and simplify the method bodies for the transoformation functions.
+ */
+ private static function transform( func:Function, a:int, b:int, c:int, d:int, x:int, s:int, t:int):int {
+ var tmp:int = a + int( func( b, c, d ) ) + x + t;
+ return IntUtil.rol( tmp, s ) + b;
+ }
+
+ /**
+ * ff transformation function
+ */
+ private static function ff ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
+ return transform( f, a, b, c, d, x, s, t );
+ }
+
+ /**
+ * gg transformation function
+ */
+ private static function gg ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
+ return transform( g, a, b, c, d, x, s, t );
+ }
+
+ /**
+ * hh transformation function
+ */
+ private static function hh ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
+ return transform( h, a, b, c, d, x, s, t );
+ }
+
+ /**
+ * ii transformation function
+ */
+ private static function ii ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
+ return transform( i, a, b, c, d, x, s, t );
+ }
+
+ /**
+ * Converts a string to a sequence of 16-word blocks
+ * that we'll do the processing on. Appends padding
+ * and length in the process.
+ *
+ * @param s The string to split into blocks
+ * @return An array containing the blocks that s was
+ * split into.
+ */
+ private static function createBlocks( s:String ):Array {
+ var blocks:Array = new Array();
+ var len:int = s.length * 8;
+ var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
+ for( var i:int = 0; i < len; i += 8 ) {
+ blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( i % 32 );
+ }
+
+ // append padding and length
+ blocks[ len >> 5 ] |= 0x80 << ( len % 32 );
+ blocks[ ( ( ( len + 64 ) >>> 9 ) << 4 ) + 14 ] = len;
+ return blocks;
+ }
+
+ }
+}
88 com/adobe/serialization/json/JSON.as
@@ -0,0 +1,88 @@
+/*
+Adobe Systems Incorporated(r) Source Code License Agreement
+Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
+
+Please read this Source Code License Agreement carefully before using
+the source code.
+
+Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable copyright license, to reproduce,
+prepare derivative works of, publicly display, publicly perform, and
+distribute this source code and such derivative works in source or
+object code form without any attribution requirements.
+
+The name "Adobe Systems Incorporated" must not be used to endorse or promote products
+derived from the source code without prior written permission.
+
+You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
+against any loss, damage, claims or lawsuits, including attorney's
+fees that arise or result from your use or distribution of the source
+code.
+
+THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
+ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
+NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
+OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.serialization.json {
+
+ /**
+ * This class provides encoding and decoding of the JSON format.
+ *
+ * Example usage:
+ * <code>
+ * // create a JSON string from an internal object
+ * JSON.encode( myObject );
+ *
+ * // read a JSON string into an internal object
+ * var myObject:Object = JSON.decode( jsonString );
+ * </code>
+ */
+ public class JSON {
+
+
+ /**
+ * Encodes a object into a JSON string.
+ *
+ * @param o The object to create a JSON string for
+ * @return the JSON string representing o
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public static function encode( o:Object ):String {
+
+ var encoder:JSONEncoder = new JSONEncoder( o );
+ return encoder.getString();
+
+ }
+
+ /**
+ * Decodes a JSON string into a native object.
+ *
+ * @param s The JSON string representing the object
+ * @return A native object as specified by s
+ * @throw JSONParseError
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public static function decode( s:String ):* {
+
+ var decoder:JSONDecoder = new JSONDecoder( s )
+ return decoder.getValue();
+
+ }
+
+ }
+
+}
218 com/adobe/serialization/json/JSONDecoder.as
@@ -0,0 +1,218 @@
+/*
+Adobe Systems Incorporated(r) Source Code License Agreement
+Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
+
+Please read this Source Code License Agreement carefully before using
+the source code.
+
+Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable copyright license, to reproduce,
+prepare derivative works of, publicly display, publicly perform, and
+distribute this source code and such derivative works in source or
+object code form without any attribution requirements.
+
+The name "Adobe Systems Incorporated" must not be used to endorse or promote products
+derived from the source code without prior written permission.
+
+You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
+against any loss, damage, claims or lawsuits, including attorney's
+fees that arise or result from your use or distribution of the source
+code.
+
+THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
+ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
+NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
+OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.serialization.json {
+
+ public class JSONDecoder {
+
+ /** The value that will get parsed from the JSON string */
+ private var value:*;
+
+ /** The tokenizer designated to read the JSON string */
+ private var tokenizer:JSONTokenizer;
+
+ /** The current token from the tokenizer */
+ private var token:JSONToken;
+
+ /**
+ * Constructs a new JSONDecoder to parse a JSON string
+ * into a native object.
+ *
+ * @param s The JSON string to be converted
+ * into a native object
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function JSONDecoder( s:String ) {
+
+ tokenizer = new JSONTokenizer( s );
+
+ nextToken();
+ value = parseValue();
+ }
+
+ /**
+ * Gets the internal object that was created by parsing
+ * the JSON string passed to the constructor.
+ *
+ * @return The internal object representation of the JSON
+ * string that was passed to the constructor
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function getValue():* {
+ return value;
+ }
+
+ /**
+ * Returns the next token from the tokenzier reading
+ * the JSON string
+ */
+ private function nextToken():JSONToken {
+ return token = tokenizer.getNextToken();
+ }
+
+ /**
+ * Attempt to parse an array
+ */
+ private function parseArray():Array {
+ // create an array internally that we're going to attempt
+ // to parse from the tokenizer
+ var a:Array = new Array();
+
+ // grab the next token from the tokenizer to move
+ // past the opening [
+ nextToken();
+
+ // check to see if we have an empty array
+ if ( token.type == JSONTokenType.RIGHT_BRACKET ) {
+ // we're done reading the array, so return it
+ return a;
+ }
+
+ // deal with elements of the array, and use an "infinite"
+ // loop because we could have any amount of elements
+ while ( true ) {
+ // read in the value and add it to the array
+ a.push ( parseValue() );
+
+ // after the value there should be a ] or a ,
+ nextToken();
+
+ if ( token.type == JSONTokenType.RIGHT_BRACKET ) {
+ // we're done reading the array, so return it
+ return a;
+ } else if ( token.type == JSONTokenType.COMMA ) {
+ // move past the comma and read another value
+ nextToken();
+ } else {
+ tokenizer.parseError( "Expecting ] or , but found " + token.value );
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Attempt to parse an object
+ */
+ private function parseObject():Object {
+ // create the object internally that we're going to
+ // attempt to parse from the tokenizer
+ var o:Object = new Object();
+
+ // store the string part of an object member so
+ // that we can assign it a value in the object
+ var key:String
+
+ // grab the next token from the tokenizer
+ nextToken();
+
+ // check to see if we have an empty object
+ if ( token.type == JSONTokenType.RIGHT_BRACE ) {
+ // we're done reading the object, so return it
+ return o;
+ }
+
+ // deal with members of the object, and use an "infinite"
+ // loop because we could have any amount of members
+ while ( true ) {
+
+ if ( token.type == JSONTokenType.STRING ) {
+ // the string value we read is the key for the object
+ key = String( token.value );
+
+ // move past the string to see what's next
+ nextToken();
+
+ // after the string there should be a :
+ if ( token.type == JSONTokenType.COLON ) {
+
+ // move past the : and read/assign a value for the key
+ nextToken();
+ o[key] = parseValue();
+
+ // move past the value to see what's next
+ nextToken();
+
+ // after the value there's either a } or a ,
+ if ( token.type == JSONTokenType.RIGHT_BRACE ) {
+ // // we're done reading the object, so return it
+ return o;
+
+ } else if ( token.type == JSONTokenType.COMMA ) {
+ // skip past the comma and read another member
+ nextToken();
+ } else {
+ tokenizer.parseError( "Expecting } or , but found " + token.value );
+ }
+ } else {
+ tokenizer.parseError( "Expecting : but found " + token.value );
+ }
+ } else {
+ tokenizer.parseError( "Expecting string but found " + token.value );
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Attempt to parse a value
+ */
+ private function parseValue():Object {
+
+ switch ( token.type ) {
+ case JSONTokenType.LEFT_BRACE:
+ return parseObject();
+
+ case JSONTokenType.LEFT_BRACKET:
+ return parseArray();
+
+ case JSONTokenType.STRING:
+ case JSONTokenType.NUMBER:
+ case JSONTokenType.TRUE:
+ case JSONTokenType.FALSE:
+ case JSONTokenType.NULL:
+ return token.value;
+
+ default:
+ tokenizer.parseError( "Unexpected " + token.value );
+
+ }
+ return null;
+ }
+ }
+}
302 com/adobe/serialization/json/JSONEncoder.as
@@ -0,0 +1,302 @@
+/*
+Adobe Systems Incorporated(r) Source Code License Agreement
+Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
+
+Please read this Source Code License Agreement carefully before using
+the source code.
+
+Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable copyright license, to reproduce,
+prepare derivative works of, publicly display, publicly perform, and
+distribute this source code and such derivative works in source or
+object code form without any attribution requirements.
+
+The name "Adobe Systems Incorporated" must not be used to endorse or promote products
+derived from the source code without prior written permission.
+
+You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
+against any loss, damage, claims or lawsuits, including attorney's
+fees that arise or result from your use or distribution of the source
+code.
+
+THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
+ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
+NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
+OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.serialization.json
+{
+
+ import flash.utils.describeType;
+
+ public class JSONEncoder {
+
+ /** The string that is going to represent the object we're encoding */
+ private var jsonString:String;
+
+ /**
+ * Creates a new JSONEncoder.
+ *
+ * @param o The object to encode as a JSON string
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function JSONEncoder( value:* ) {
+ jsonString = convertToString( value );
+
+ }
+
+ /**
+ * Gets the JSON string from the encoder.
+ *
+ * @return The JSON string representation of the object
+ * that was passed to the constructor
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function getString():String {
+ return jsonString;
+ }
+
+ /**
+ * Converts a value to it's JSON string equivalent.
+ *
+ * @param value The value to convert. Could be any
+ * type (object, number, array, etc)
+ */
+ private function convertToString( value:* ):String {
+
+ // determine what value is and convert it based on it's type
+ if ( value is String ) {
+
+ // escape the string so it's formatted correctly
+ return escapeString( value as String );
+
+ } else if ( value is Number ) {
+
+ // only encode numbers that finate
+ return isFinite( value as Number) ? value.toString() : "null";
+
+ } else if ( value is Boolean ) {
+
+ // convert boolean to string easily
+ return value ? "true" : "false";
+
+ } else if ( value is Array ) {
+
+ // call the helper method to convert an array
+ return arrayToString( value as Array );
+
+ } else if ( value is Object && value != null ) {
+
+ // call the helper method to convert an object
+ return objectToString( value );
+ }
+ return "null";
+ }
+
+ /**
+ * Escapes a string accoding to the JSON specification.
+ *
+ * @param str The string to be escaped
+ * @return The string with escaped special characters
+ * according to the JSON specification
+ */
+ private function escapeString( str:String ):String {
+ // create a string to store the string's jsonstring value
+ var s:String = "";
+ // current character in the string we're processing
+ var ch:String;
+ // store the length in a local variable to reduce lookups
+ var len:Number = str.length;
+
+ // loop over all of the characters in the string
+ for ( var i:int = 0; i < len; i++ ) {
+
+ // examine the character to determine if we have to escape it
+ ch = str.charAt( i );
+ switch ( ch ) {
+
+ case '"': // quotation mark
+ s += "\\\"";
+ break;
+
+ //case '/': // solidus
+ // s += "\\/";
+ // break;
+
+ case '\\': // reverse solidus
+ s += "\\\\";
+ break;
+
+ case '\b': // bell
+ s += "\\b";
+ break;
+
+ case '\f': // form feed
+ s += "\\f";
+ break;
+
+ case '\n': // newline
+ s += "\\n";
+ break;
+
+ case '\r': // carriage return
+ s += "\\r";
+ break;
+
+ case '\t': // horizontal tab
+ s += "\\t";
+ break;
+
+ default: // everything else
+
+ // check for a control character and escape as unicode
+ if ( ch < ' ' ) {
+ // get the hex digit(s) of the character (either 1 or 2 digits)
+ var hexCode:String = ch.charCodeAt( 0 ).toString( 16 );
+
+ // ensure that there are 4 digits by adjusting
+ // the # of zeros accordingly.
+ var zeroPad:String = hexCode.length == 2 ? "00" : "000";
+
+ // create the unicode escape sequence with 4 hex digits
+ s += "\\u" + zeroPad + hexCode;
+ } else {
+
+ // no need to do any special encoding, just pass-through
+ s += ch;
+
+ }
+ } // end switch
+
+ } // end for loop
+
+ return "\"" + s + "\"";
+ }
+
+ /**
+ * Converts an array to it's JSON string equivalent
+ *
+ * @param a The array to convert
+ * @return The JSON string representation of <code>a</code>
+ */
+ private function arrayToString( a:Array ):String {
+ // create a string to store the array's jsonstring value
+ var s:String = "";
+
+ // loop over the elements in the array and add their converted
+ // values to the string
+ for ( var i:int = 0; i < a.length; i++ ) {
+ // when the length is 0 we're adding the first element so
+ // no comma is necessary
+ if ( s.length > 0 ) {
+ // we've already added an element, so add the comma separator
+ s += ","
+ }
+
+ // convert the value to a string
+ s += convertToString( a[i] );
+ }
+
+ // KNOWN ISSUE: In ActionScript, Arrays can also be associative
+ // objects and you can put anything in them, ie:
+ // myArray["foo"] = "bar";
+ //
+ // These properties aren't picked up in the for loop above because
+ // the properties don't correspond to indexes. However, we're
+ // sort of out luck because the JSON specification doesn't allow
+ // these types of array properties.
+ //
+ // So, if the array was also used as an associative object, there
+ // may be some values in the array that don't get properly encoded.
+ //
+ // A possible solution is to instead encode the Array as an Object
+ // but then it won't get decoded correctly (and won't be an
+ // Array instance)
+
+ // close the array and return it's string value
+ return "[" + s + "]";
+ }
+
+ /**
+ * Converts an object to it's JSON string equivalent
+ *
+ * @param o The object to convert
+ * @return The JSON string representation of <code>o</code>
+ */
+ private function objectToString( o:Object ):String
+ {
+ // create a string to store the object's jsonstring value
+ var s:String = "";
+
+ // determine if o is a class instance or a plain object
+ var classInfo:XML = describeType( o );
+ if ( classInfo.@name.toString() == "Object" )
+ {
+ // the value of o[key] in the loop below - store this
+ // as a variable so we don't have to keep looking up o[key]
+ // when testing for valid values to convert
+ var value:Object;
+
+ // loop over the keys in the object and add their converted
+ // values to the string
+ for ( var key:String in o )
+ {
+ // assign value to a variable for quick lookup
+ value = o[key];
+
+ // don't add function's to the JSON string
+ if ( value is Function )
+ {
+ // skip this key and try another
+ continue;
+ }
+
+ // when the length is 0 we're adding the first item so
+ // no comma is necessary
+ if ( s.length > 0 ) {
+ // we've already added an item, so add the comma separator
+ s += ","
+ }
+
+ s += escapeString( key ) + ":" + convertToString( value );
+ }
+ }
+ else // o is a class instance
+ {
+ // Loop over all of the variables and accessors in the class and
+ // serialize them along with their values.
+ for each ( var v:XML in classInfo..*.( name() == "variable" || name() == "accessor" ) )
+ {
+ // When the length is 0 we're adding the first item so
+ // no comma is necessary
+ if ( s.length > 0 ) {
+ // We've already added an item, so add the comma separator
+ s += ","
+ }
+
+ s += escapeString( v.@name.toString() ) + ":"
+ + convertToString( o[ v.@name ] );
+ }
+
+ }
+
+ return "{" + s + "}";
+ }
+
+
+ }
+
+}
90 com/adobe/serialization/json/JSONParseError.as
@@ -0,0 +1,90 @@
+/*
+Adobe Systems Incorporated(r) Source Code License Agreement
+Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
+
+Please read this Source Code License Agreement carefully before using
+the source code.
+
+Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable copyright license, to reproduce,
+prepare derivative works of, publicly display, publicly perform, and
+distribute this source code and such derivative works in source or
+object code form without any attribution requirements.
+
+The name "Adobe Systems Incorporated" must not be used to endorse or promote products
+derived from the source code without prior written permission.
+
+You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
+against any loss, damage, claims or lawsuits, including attorney's
+fees that arise or result from your use or distribution of the source
+code.
+
+THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
+ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
+NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
+OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.serialization.json {
+
+ /**
+ *
+ *
+ */
+ public class JSONParseError extends Error {
+
+ /** The location in the string where the error occurred */
+ private var _location:int;
+
+ /** The string in which the parse error occurred */
+ private var _text:String;
+
+ /**
+ * Constructs a new JSONParseError.
+ *
+ * @param message The error message that occured during parsing
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function JSONParseError( message:String = "", location:int = 0, text:String = "") {
+ super( message );
+ //name = "JSONParseError";
+ _location = location;
+ _text = text;
+ }
+
+ /**
+ * Provides read-only access to the location variable.
+ *
+ * @return The location in the string where the error occurred
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function get location():int {
+ return _location;
+ }
+
+ /**
+ * Provides read-only access to the text variable.
+ *
+ * @return The string in which the error occurred
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function get text():String {
+ return _text;
+ }
+ }
+
+}
107 com/adobe/serialization/json/JSONToken.as
@@ -0,0 +1,107 @@
+/*
+Adobe Systems Incorporated(r) Source Code License Agreement
+Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
+
+Please read this Source Code License Agreement carefully before using
+the source code.
+
+Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable copyright license, to reproduce,
+prepare derivative works of, publicly display, publicly perform, and
+distribute this source code and such derivative works in source or
+object code form without any attribution requirements.
+
+The name "Adobe Systems Incorporated" must not be used to endorse or promote products
+derived from the source code without prior written permission.
+
+You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
+against any loss, damage, claims or lawsuits, including attorney's
+fees that arise or result from your use or distribution of the source
+code.
+
+THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
+ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
+NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
+OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.serialization.json {
+
+ public class JSONToken {
+
+ private var _type:int;
+ private var _value:Object;
+
+ /**
+ * Creates a new JSONToken with a specific token type and value.
+ *
+ * @param type The JSONTokenType of the token
+ * @param value The value of the token
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function JSONToken( type:int = -1 /* JSONTokenType.UNKNOWN */, value:Object = null ) {
+ _type = type;
+ _value = value;
+ }
+
+ /**
+ * Returns the type of the token.
+ *
+ * @see com.adobe.serialization.json.JSONTokenType
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function get type():int {
+ return _type;
+ }
+
+ /**
+ * Sets the type of the token.
+ *
+ * @see com.adobe.serialization.json.JSONTokenType
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function set type( value:int ):void {
+ _type = value;
+ }
+
+ /**
+ * Gets the value of the token
+ *
+ * @see com.adobe.serialization.json.JSONTokenType
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function get value():Object {
+ return _value;
+ }
+
+ /**
+ * Sets the value of the token
+ *
+ * @see com.adobe.serialization.json.JSONTokenType
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public function set value ( v:Object ):void {
+ _value = v;
+ }
+
+ }
+
+}
70 com/adobe/serialization/json/JSONTokenType.as
@@ -0,0 +1,70 @@
+/*
+Adobe Systems Incorporated(r) Source Code License Agreement
+Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
+
+Please read this Source Code License Agreement carefully before using
+the source code.
+
+Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable copyright license, to reproduce,
+prepare derivative works of, publicly display, publicly perform, and
+distribute this source code and such derivative works in source or
+object code form without any attribution requirements.
+
+The name "Adobe Systems Incorporated" must not be used to endorse or promote products
+derived from the source code without prior written permission.
+
+You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
+against any loss, damage, claims or lawsuits, including attorney's
+fees that arise or result from your use or distribution of the source
+code.
+
+THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
+ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
+NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
+OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.serialization.json {
+
+ /**
+ * Class containing constant values for the different types
+ * of tokens in a JSON encoded string.
+ */
+ public class JSONTokenType {
+
+ public static const UNKNOWN:int = -1;
+
+ public static const COMMA:int = 0;
+
+ public static const LEFT_BRACE:int = 1;
+
+ public static const RIGHT_BRACE:int = 2;
+
+ public static const LEFT_BRACKET:int = 3;
+
+ public static const RIGHT_BRACKET:int = 4;
+
+ public static const COLON:int = 6;
+
+ public static const TRUE:int = 7;
+
+ public static const FALSE:int = 8;
+
+ public static const NULL:int = 9;
+
+ public static const STRING:int = 10;
+
+ public static const NUMBER:int = 11;
+
+ }
+
+}
552 com/adobe/serialization/json/JSONTokenizer.as
@@ -0,0 +1,552 @@
+/*
+Adobe Systems Incorporated(r) Source Code License Agreement
+Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
+
+Please read this Source Code License Agreement carefully before using
+the source code.
+
+Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable copyright license, to reproduce,
+prepare derivative works of, publicly display, publicly perform, and
+distribute this source code and such derivative works in source or
+object code form without any attribution requirements.
+
+The name "Adobe Systems Incorporated" must not be used to endorse or promote products
+derived from the source code without prior written permission.
+
+You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
+against any loss, damage, claims or lawsuits, including attorney's
+fees that arise or result from your use or distribution of the source
+code.
+
+THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
+ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
+NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
+OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.serialization.json {
+
+ public class JSONTokenizer {
+
+ /** The object that will get parsed from the JSON string */
+ private var obj:Object;
+
+ /** The JSON string to be parsed */
+ private var jsonString:String;
+
+ /** The current parsing location in the JSON string */
+ private var loc:int;
+
+ /** The current character in the JSON string during parsing */
+ private var ch:String;
+
+ /**
+ * Constructs a new JSONDecoder to parse a JSON string
+ * into a native object.
+ *
+ * @param s The JSON string to be converted
+ * into a native object
+ */
+ public function JSONTokenizer( s:String ) {
+ jsonString = s;
+ loc = 0;
+
+ // prime the pump by getting the first character
+ nextChar();
+ }
+
+ /**
+ * Gets the next token in the input sting and advances
+ * the character to the next character after the token
+ */
+ public function getNextToken():JSONToken {
+ var token:JSONToken = new JSONToken();
+
+ // skip any whitespace / comments since the last
+ // token was read
+ skipIgnored();
+
+ // examine the new character and see what we have...
+ switch ( ch ) {
+
+ case '{':
+ token.type = JSONTokenType.LEFT_BRACE;
+ token.value = '{';
+ nextChar();
+ break
+
+ case '}':
+ token.type = JSONTokenType.RIGHT_BRACE;
+ token.value = '}';
+ nextChar();
+ break
+
+ case '[':
+ token.type = JSONTokenType.LEFT_BRACKET;
+ token.value = '[';
+ nextChar();
+ break
+
+ case ']':
+ token.type = JSONTokenType.RIGHT_BRACKET;
+ token.value = ']';
+ nextChar();
+ break
+
+ case ',':
+ token.type = JSONTokenType.COMMA;
+ token.value = ',';
+ nextChar();
+ break
+
+ case ':':
+ token.type = JSONTokenType.COLON;
+ token.value = ':';
+ nextChar();
+ break;
+
+ case 't': // attempt to read true
+ var possibleTrue:String = "t" + nextChar() + nextChar() + nextChar();
+
+ if ( possibleTrue == "true" ) {
+ token.type = JSONTokenType.TRUE;
+ token.value = true;
+ nextChar();
+ } else {
+ parseError( "Expecting 'true' but found " + possibleTrue );
+ }
+
+ break;
+
+ case 'f': // attempt to read false
+ var possibleFalse:String = "f" + nextChar() + nextChar() + nextChar() + nextChar();
+
+ if ( possibleFalse == "false" ) {
+ token.type = JSONTokenType.FALSE;
+ token.value = false;
+ nextChar();
+ } else {
+ parseError( "Expecting 'false' but found " + possibleFalse );
+ }
+
+ break;
+
+ case 'n': // attempt to read null
+
+ var possibleNull:String = "n" + nextChar() + nextChar() + nextChar();
+
+ if ( possibleNull == "null" ) {
+ token.type = JSONTokenType.NULL;
+ token.value = null;
+ nextChar();
+ } else {
+ parseError( "Expecting 'null' but found " + possibleNull );
+ }
+
+ break;
+
+ case '"': // the start of a string
+ token = readString();
+ break;
+
+ default:
+ // see if we can read a number
+ if ( isDigit( ch ) || ch == '-' ) {
+ token = readNumber();
+ } else if ( ch == '' ) {
+ // check for reading past the end of the string
+ return null;
+ } else {
+ // not sure what was in the input string - it's not
+ // anything we expected
+ parseError( "Unexpected " + ch + " encountered" );
+ }
+ }
+
+ return token;
+ }
+
+ /**
+ * Attempts to read a string from the input string. Places
+ * the character location at the first character after the
+ * string. It is assumed that ch is " before this method is called.
+ *
+ * @return the JSONToken with the string value if a string could
+ * be read. Throws an error otherwise.
+ */
+ private function readString():JSONToken {
+ // the token for the string we'll try to read
+ var token:JSONToken = new JSONToken();
+ token.type = JSONTokenType.STRING;
+
+ // the string to store the string we'll try to read
+ var string:String = "";
+
+ // advance past the first "
+ nextChar();
+
+ while ( ch != '"' && ch != '' ) {
+
+ // unescape the escape sequences in the string
+ if ( ch == '\\' ) {
+
+ // get the next character so we know what
+ // to unescape
+ nextChar();
+
+ switch ( ch ) {
+
+ case '"': // quotation mark
+ string += '"';
+ break;
+
+ case '/': // solidus
+ string += "/";
+ break;
+
+ case '\\': // reverse solidus
+ string += '\\';
+ break;
+
+ case 'b': // bell
+ string += '\b';
+ break;
+
+ case 'f': // form feed
+ string += '\f';
+ break;
+
+ case 'n': // newline
+ string += '\n';
+ break;
+
+ case 'r': // carriage return
+ string += '\r';
+ break;
+
+ case 't': // horizontal tab
+ string += '\t'
+ break;
+
+ case 'u':
+ // convert a unicode escape sequence
+ // to it's character value - expecting
+ // 4 hex digits
+
+ // save the characters as a string we'll convert to an int
+ var hexValue:String = "";
+
+ // try to find 4 hex characters
+ for ( var i:int = 0; i < 4; i++ ) {
+ // get the next character and determine
+ // if it's a valid hex digit or not
+ if ( !isHexDigit( nextChar() ) ) {
+ parseError( " Excepted a hex digit, but found: " + ch );
+ }
+ // valid, add it to the value
+ hexValue += ch;
+ }
+
+ // convert hexValue to an integer, and use that
+ // integrer value to create a character to add
+ // to our string.
+ string += String.fromCharCode( parseInt( hexValue, 16 ) );
+
+ break;
+
+ default:
+ // couldn't unescape the sequence, so just
+ // pass it through
+ string += '\\' + ch;
+
+ }
+
+ } else {
+ // didn't have to unescape, so add the character to the string
+ string += ch;
+
+ }
+
+ // move to the next character
+ nextChar();
+
+ }
+
+ // we read past the end of the string without closing it, which
+ // is a parse error
+ if ( ch == '' ) {
+ parseError( "Unterminated string literal" );
+ }
+
+ // move past the closing " in the input string
+ nextChar();
+
+ // attach to the string to the token so we can return it
+ token.value = string;
+
+ return token;
+ }
+
+ /**
+ * Attempts to read a number from the input string. Places
+ * the character location at the first character after the
+ * number.
+ *
+ * @return The JSONToken with the number value if a number could
+ * be read. Throws an error otherwise.
+ */
+ private function readNumber():JSONToken {
+ // the token for the number we'll try to read
+ var token:JSONToken = new JSONToken();
+ token.type = JSONTokenType.NUMBER;
+
+ // the string to accumulate the number characters
+ // into that we'll convert to a number at the end
+ var input:String = "";
+
+ // check for a negative number
+ if ( ch == '-' ) {
+ input += '-';
+ nextChar();
+ }
+
+ // the number must start with a digit
+ if ( !isDigit( ch ) )
+ {
+ parseError( "Expecting a digit" );
+ }
+
+ // 0 can only be the first digit if it
+ // is followed by a decimal point
+ if ( ch == '0' )
+ {
+ input += ch;
+ nextChar();
+
+ // make sure no other digits come after 0
+ if ( isDigit( ch ) )
+ {
+ parseError( "A digit cannot immediately follow 0" );
+ }
+ }
+ else
+ {
+ // read numbers while we can
+ while ( isDigit( ch ) ) {
+ input += ch;
+ nextChar();
+ }
+ }
+
+ // check for a decimal value
+ if ( ch == '.' ) {
+ input += '.';
+ nextChar();
+
+ // after the decimal there has to be a digit
+ if ( !isDigit( ch ) )
+ {
+ parseError( "Expecting a digit" );
+ }
+
+ // read more numbers to get the decimal value
+ while ( isDigit( ch ) ) {
+ input += ch;
+ nextChar();
+ }
+ }
+
+ // check for scientific notation
+ if ( ch == 'e' || ch == 'E' )
+ {
+ input += "e"
+ nextChar();
+ // check for sign
+ if ( ch == '+' || ch == '-' )
+ {
+ input += ch;
+ nextChar();
+ }
+
+ // require at least one number for the exponent
+ // in this case
+ if ( !isDigit( ch ) )
+ {
+ parseError( "Scientific notation number needs exponent value" );
+ }
+
+ // read in the exponent
+ while ( isDigit( ch ) )
+ {
+ input += ch;
+ nextChar();
+ }
+ }
+
+ // convert the string to a number value
+ var num:Number = Number( input );
+
+ if ( isFinite( num ) && !isNaN( num ) && num.toString() == input) {
+ token.value = num;
+ return token;
+ } else {
+ //parseError( "Number " + num + " is not valid!" );
+ token.value = input;
+ return token;
+ }
+ return null;
+ }
+
+ /**
+ * Reads the next character in the input
+ * string and advances the character location.
+ *
+ * @return The next character in the input string, or
+ * null if we've read past the end.
+ */
+ private function nextChar():String {
+ return ch = jsonString.charAt( loc++ );
+ }
+
+ /**
+ * Advances the character location past any
+ * sort of white space and comments
+ */
+ private function skipIgnored():void {
+ skipWhite();
+ skipComments();
+ skipWhite();
+ }
+
+ /**
+ * Skips comments in the input string, either
+ * single-line or multi-line. Advances the character
+ * to the first position after the end of the comment.
+ */
+ private function skipComments():void {
+ if ( ch == '/' ) {
+ // Advance past the first / to find out what type of comment
+ nextChar();
+ switch ( ch ) {
+ case '/': // single-line comment, read through end of line
+
+ // Loop over the characters until we find
+ // a newline or until there's no more characters left
+ do {
+ nextChar();
+ } while ( ch != '\n' && ch != '' )
+
+ // move past the \n
+ nextChar();
+
+ break;
+
+ case '*': // multi-line comment, read until closing */
+
+ // move past the opening *
+ nextChar();
+
+ // try to find a trailing */
+ while ( true ) {
+ if ( ch == '*' ) {
+ // check to see if we have a closing /
+ nextChar();
+ if ( ch == '/') {
+ // move past the end of the closing */
+ nextChar();
+ break;
+ }
+ } else {
+ // move along, looking if the next character is a *
+ nextChar();
+ }
+
+ // when we're here we've read past the end of
+ // the string without finding a closing */, so error
+ if ( ch == '' ) {
+ parseError( "Multi-line comment not closed" );
+ }
+ }
+
+ break;
+
+ // Can't match a comment after a /, so it's a parsing error
+ default:
+ parseError( "Unexpected " + ch + " encountered (expecting '/' or '*' )" );
+ }
+ }
+
+ }
+
+
+ /**
+ * Skip any whitespace in the input string and advances
+ * the character to the first character after any possible
+ * whitespace.
+ */
+ private function skipWhite():void {
+
+ // As long as there are spaces in the input
+ // stream, advance the current location pointer
+ // past them
+ while ( isWhiteSpace( ch ) ) {
+ nextChar();
+ }
+
+ }
+
+ /**
+ * Determines if a character is whitespace or not.
+ *
+ * @return True if the character passed in is a whitespace
+ * character
+ */
+ private function isWhiteSpace( ch:String ):Boolean {
+ return ( ch == ' ' || ch == '\t' || ch == '\n' );
+ }
+
+ /**
+ * Determines if a character is a digit [0-9].
+ *
+ * @return True if the character passed in is a digit
+ */
+ private function isDigit( ch:String ):Boolean {
+ return ( ch >= '0' && ch <= '9' );
+ }
+
+ /**
+ * Determines if a character is a digit [0-9].
+ *
+ * @return True if the character passed in is a digit
+ */
+ private function isHexDigit( ch:String ):Boolean {
+ // get the uppercase value of ch so we only have
+ // to compare the value between 'A' and 'F'
+ var uc:String = ch.toUpperCase();
+
+ // a hex digit is a digit of A-F, inclusive ( using
+ // our uppercase constraint )
+ return ( isDigit( ch ) || ( uc >= 'A' && uc <= 'F' ) );
+ }
+
+ /**
+ * Raises a parsing error with a specified message, tacking
+ * on the error location and the original string.
+ *
+ * @param message The message indicating why the error occurred
+ */
+ public function parseError( message:String ):void {
+ throw new JSONParseError( message, loc, jsonString );
+ }
+ }
+
+}
69 com/adobe/utils/IntUtil.as
@@ -0,0 +1,69 @@
+
+package com.adobe.utils {
+
+ import flash.utils.Endian;
+
+ /**
+ * Contains reusable methods for operations pertaining
+ * to int values.
+ */
+ public class IntUtil {
+
+ /**
+ * Rotates x left n bits
+ *
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public static function rol ( x:int, n:int ):int {
+ return ( x << n ) | ( x >>> ( 32 - n ) );
+ }
+
+ /**
+ * Rotates x right n bits
+ *
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public static function ror ( x:int, n:int ):uint {
+ var nn:int = 32 - n;
+ return ( x << nn ) | ( x >>> ( 32 - nn ) );
+ }
+
+ /** String for quick lookup of a hex character based on index */
+ private static var hexChars:String = "0123456789abcdef";
+
+ /**
+ * Outputs the hex value of a int, allowing the developer to specify
+ * the endinaness in the process. Hex output is lowercase.
+ *
+ * @param n The int value to output as hex
+ * @param bigEndian Flag to output the int as big or little endian
+ * @return A string of length 8 corresponding to the
+ * hex representation of n ( minus the leading "0x" )
+ * @langversion ActionScript 3.0
+ * @playerversion Flash 9.0
+ * @tiptext
+ */
+ public static function toHex( n:int, bigEndian:Boolean = false ):String {
+ var s:String = "";
+
+ if ( bigEndian ) {
+ for ( var i:int = 0; i < 4; i++ ) {
+ s += hexChars.charAt( ( n >> ( ( 3 - i ) * 8 + 4 ) ) & 0xF )
+ + hexChars.charAt( ( n >> ( ( 3 - i ) * 8 ) ) & 0xF );
+ }
+ } else {
+ for ( var x:int = 0; x < 4; x++ ) {
+ s += hexChars.charAt( ( n >> ( x * 8 + 4 ) ) & 0xF )
+ + hexChars.charAt( ( n >> ( x * 8 ) ) & 0xF );
+ }
+ }
+
+ return s;
+ }
+ }
+
+}
BIN com/adobe/utils/IntUtil.as.cpgz
Binary file not shown.
BIN docs/fdfa.graffle/QuickLook/Preview.pdf
Binary file not shown.
BIN docs/fdfa.graffle/QuickLook/Thumbnail.tiff
Binary file not shown.
1,782 docs/fdfa.graffle/data.plist
@@ -0,0 +1,1782 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ActiveLayerIndex</key>
+ <integer>0</integer>
+ <key>ApplicationVersion</key>
+ <array>
+ <string>com.omnigroup.OmniGraffle</string>
+ <string>137.11.0.108132</string>
+ </array>
+ <key>AutoAdjust</key>
+ <true/>
+ <key>BackgroundGraphic</key>
+ <dict>
+ <key>Bounds</key>
+ <string>{{0, 0}, {1152, 733}}</string>
+ <key>Class</key>
+ <string>SolidGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Font</key>
+ <string>Helvetica</string>
+ <key>Size</key>
+ <real>11</real>
+ </dict>
+ <key>ID</key>
+ <integer>2</integer>
+ <key>Style</key>
+ <dict>
+ <key>shadow</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ </dict>
+ <key>CanvasOrigin</key>
+ <string>{0, 0}</string>
+ <key>ColumnAlign</key>
+ <integer>1</integer>
+ <key>ColumnSpacing</key>
+ <real>36</real>
+ <key>CreationDate</key>
+ <string>2009-04-26 11:19:51 -0700</string>
+ <key>Creator</key>
+ <string>Justin Bishop</string>
+ <key>DisplayScale</key>
+ <string>1 0/72 in = 1 0/72 in</string>
+ <key>GraphDocumentVersion</key>
+ <integer>6</integer>
+ <key>GraphicsList</key>
+ <array>
+ <dict>
+ <key>Bounds</key>
+ <string>{{305.5, 649}, {189, 28}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FitText</key>
+ <string>Vertical</string>
+ <key>Flow</key>
+ <string>Resize</string>
+ <key>ID</key>
+ <integer>46</integer>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Align</key>
+ <integer>0</integer>
+ <key>Pad</key>
+ <integer>0</integer>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+
+\f0\fs24 \cf0 http://www.facebook.com/apps/application.php?id=75647677556}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{781, 25}, {123, 22}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FitText</key>
+ <string>YES</string>
+ <key>Flow</key>
+ <string>Resize</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Font</key>
+ <string>Helvetica-Bold</string>
+ <key>Size</key>
+ <real>18</real>
+ </dict>
+ <key>ID</key>
+ <integer>45</integer>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Pad</key>
+ <integer>0</integer>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\b\fs36 \cf0 \ul \ulc0 fql.query Flow}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ <key>Wrap</key>
+ <string>NO</string>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{657.406, 541.97}, {63, 24}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FitText</key>
+ <string>YES</string>
+ <key>Flow</key>
+ <string>Resize</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>w</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Helvetica</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>44</integer>
+ <key>Line</key>
+ <