larsklevan_s3_swf_upload 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/.gitignore +6 -0
  2. data/CHANGELOG +26 -0
  3. data/Gemfile +4 -0
  4. data/MIT-LICENSE +20 -0
  5. data/Manifest +34 -0
  6. data/README.textile +222 -0
  7. data/Rakefile +14 -0
  8. data/flex_src/bin-release/flex-config.xml +356 -0
  9. data/flex_src/compile +2 -0
  10. data/flex_src/src/Globals.as +15 -0
  11. data/flex_src/src/S3Uploader.as +204 -0
  12. data/flex_src/src/com/adobe/net/MimeTypeMap.as +196 -0
  13. data/flex_src/src/com/elctech/S3UploadOptions.as +31 -0
  14. data/flex_src/src/com/elctech/S3UploadRequest.as +254 -0
  15. data/flex_src/src/com/nathancolgate/s3_swf_upload/BrowseButton.as +55 -0
  16. data/flex_src/src/com/nathancolgate/s3_swf_upload/S3Queue.as +117 -0
  17. data/flex_src/src/com/nathancolgate/s3_swf_upload/S3Signature.as +116 -0
  18. data/flex_src/src/com/nathancolgate/s3_swf_upload/S3Upload.as +111 -0
  19. data/lib/patch/integer.rb +12 -0
  20. data/lib/s3_swf_upload.rb +10 -0
  21. data/lib/s3_swf_upload/railtie.rb +16 -0
  22. data/lib/s3_swf_upload/railties/generators/s3_swf_upload.rb +19 -0
  23. data/lib/s3_swf_upload/railties/generators/uploader/USAGE +10 -0
  24. data/lib/s3_swf_upload/railties/generators/uploader/templates/amazon_s3.yml +20 -0
  25. data/lib/s3_swf_upload/railties/generators/uploader/templates/s3_down_button.gif +0 -0
  26. data/lib/s3_swf_upload/railties/generators/uploader/templates/s3_over_button.gif +0 -0
  27. data/lib/s3_swf_upload/railties/generators/uploader/templates/s3_up_button.gif +0 -0
  28. data/lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.js +118 -0
  29. data/lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.swf +0 -0
  30. data/lib/s3_swf_upload/railties/generators/uploader/templates/s3_uploads_controller.rb +53 -0
  31. data/lib/s3_swf_upload/railties/generators/uploader/uploader_generator.rb +20 -0
  32. data/lib/s3_swf_upload/railties/tasks/crossdomain.xml +5 -0
  33. data/lib/s3_swf_upload/s3_config.rb +43 -0
  34. data/lib/s3_swf_upload/signature.rb +203 -0
  35. data/lib/s3_swf_upload/view_helpers.rb +171 -0
  36. data/s3_swf_upload.gemspec +28 -0
  37. metadata +106 -0
@@ -0,0 +1,6 @@
1
+ .DS_Store
2
+ *.swp
3
+ flex_src/bin-debug
4
+ flex_src/bin-release/s3_upload.swf
5
+ flex_src/html-template
6
+ Gemfile.lock
@@ -0,0 +1,26 @@
1
+ v0.3.1
2
+
3
+ * 2010-11-15
4
+ * Fixed by yixster: If the startUploading call is made after calling stopUploading, only the first file in the queue is successfully uploaded.
5
+
6
+ v0.3.0
7
+
8
+ * 2010-08-27
9
+ * Flash Player 10.1 did not allow ExternalInterface to pass a FileReference object to Javascript
10
+ So I added a toJavascript function that converts FileReference into simple Objects with only three attributes:
11
+ - name
12
+ - size
13
+ - type
14
+ * Also, S3Queue now has it's own toJavascript function. The queue that gets passed through to the Javascript now
15
+ has a much more meaningful attribute of 'files' instead of 'source'
16
+
17
+ v0.2.0
18
+
19
+ * 2010-05-27
20
+ * The flex application in this fork was completely re-written so that there are no flash or flex UI components.
21
+ The one exception to that is the browse button, which, for security purposes MUST be flash.
22
+ But even then, you get to pass the URLs for images to use for that button!
23
+
24
+ v0.1.0
25
+
26
+ * Created by people way smarter than I
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in fluent-plugin-redis.gemspec
4
+ gemspec
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 [name of plugin creator]
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,34 @@
1
+ CHANGELOG
2
+ MIT-LICENSE
3
+ Manifest
4
+ README.textile
5
+ Rakefile
6
+ flex_src/bin-release/flex-config.xml
7
+ flex_src/compile
8
+ flex_src/src/Globals.as
9
+ flex_src/src/S3Uploader.as
10
+ flex_src/src/com/adobe/net/MimeTypeMap.as
11
+ flex_src/src/com/elctech/S3UploadOptions.as
12
+ flex_src/src/com/elctech/S3UploadRequest.as
13
+ flex_src/src/com/nathancolgate/s3_swf_upload/BrowseButton.as
14
+ flex_src/src/com/nathancolgate/s3_swf_upload/S3Queue.as
15
+ flex_src/src/com/nathancolgate/s3_swf_upload/S3Signature.as
16
+ flex_src/src/com/nathancolgate/s3_swf_upload/S3Upload.as
17
+ lib/patch/integer.rb
18
+ lib/s3_swf_upload.rb
19
+ lib/s3_swf_upload/railtie.rb
20
+ lib/s3_swf_upload/railties/generators/s3_swf_upload.rb
21
+ lib/s3_swf_upload/railties/generators/uploader/USAGE
22
+ lib/s3_swf_upload/railties/generators/uploader/templates/amazon_s3.yml
23
+ lib/s3_swf_upload/railties/generators/uploader/templates/s3_down_button.gif
24
+ lib/s3_swf_upload/railties/generators/uploader/templates/s3_over_button.gif
25
+ lib/s3_swf_upload/railties/generators/uploader/templates/s3_up_button.gif
26
+ lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.js
27
+ lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.swf
28
+ lib/s3_swf_upload/railties/generators/uploader/templates/s3_uploads_controller.rb
29
+ lib/s3_swf_upload/railties/generators/uploader/uploader_generator.rb
30
+ lib/s3_swf_upload/railties/tasks/crossdomain.xml
31
+ lib/s3_swf_upload/s3_config.rb
32
+ lib/s3_swf_upload/signature.rb
33
+ lib/s3_swf_upload/view_helpers.rb
34
+ s3_swf_upload.gemspec
@@ -0,0 +1,222 @@
1
+ h1. S3SwfUpload Gem For Rails 3
2
+
3
+ S3SwfUpload allows user to upload a file to S3 directly, so you can save the cost of uploading process in your app server.
4
+
5
+ The flex application in this fork was completely re-written so that there are no flash or flex UI components. The one exception to that is the browse button, which, for security purposes MUST be flash. But even then, you get to pass the URLs for images to use for that button!
6
+
7
+ The goal of this re-write is to put the power to customize this powerful took back in the hands of non-flex-savvy developers. The look and feel is controlled by CSS, and any behavior is controlled by JavaScript. Flex only handles the file management portion. A nice result of this is that the flash file is only 46 kb, down from 288 kb. If you see any way that this can be done better, please don't hesitate to let me know!
8
+
9
+ h2. Example
10
+
11
+ !http://static.nathancolgate.com/images/s3_swf_uploader_screenshot.png!
12
+
13
+ Watch a video of an example app being built using the gem on "Vimeo":http://vimeo.com/11363680
14
+
15
+ There is also a demo app running on heroku at "http://s3swfuploader.heroku.com/":http://s3swfuploader.heroku.com/
16
+
17
+ h2. Usage
18
+
19
+ 1. Edit <code>Gemfile</code> and add this as a gem
20
+
21
+ <pre><code>gem 's3_swf_upload', :git => 'git://github.com/nathancolgate/s3-swf-upload-plugin'
22
+ </code></pre>
23
+
24
+ 2. Bundle it!
25
+
26
+ <pre><code>$ bundle install
27
+ </code></pre>
28
+
29
+ 3. Run the generator
30
+
31
+ <pre><code>$ rails generate s3_swf_upload:uploader
32
+ </code></pre>
33
+
34
+ If you are using Rails 3.1, you will need to move the generated s3_upload.js from the public/javascripts directory to the app/assets/javascripts directory.
35
+
36
+ 4. Configure your amazon parameters via the generated <code>config/amazon_s3.yml</code> file.
37
+
38
+ 5. Make the bucket
39
+
40
+ There used to be a rake task for this, but it was removed so that there would be no dependency of aws/s3.
41
+
42
+ 6. Upload the "crossdomain.xml file":https://github.com/nathancolgate/s3-swf-upload-plugin/blob/master/lib/s3_swf_upload/railties/tasks/crossdomain.xml
43
+
44
+ There used to be a rake task for this, but it was removed so that there would be no dependency of aws/s3.
45
+
46
+ Make sure the file is in the root and is publicly readable.
47
+
48
+ 7. Note: you no longer need to edit <code>app/controller/s3_uploads_controller.rb</code>
49
+
50
+ In my tests in Rails 3, the application was able to correctly handle the requests from the flash object.
51
+
52
+ This means that your authentication systems can still be used to protect the signature generation.
53
+
54
+ 8. Initialize the SWF object in your view using this handy helper:
55
+
56
+ <pre><code><%=raw s3_swf_upload_tag %>
57
+ </code></pre>
58
+
59
+ 9. To achieve basic functionality, the only other thing you need is something to call the <code>startUploading</code> function. For example:
60
+
61
+ <pre><code><input type="submit" value="Start Uploading" onclick="s3_swf_1_object.startUploading();" />
62
+ </code></pre>
63
+
64
+ However, you will have no feedback or interface to let you know that anything is actually happening.
65
+
66
+ 10. If you want to customise its behavior, "here's a more complex example":http://gist.github.com/382979
67
+
68
+ And the "CSS":http://gist.github.com/383118 to go along.
69
+
70
+ h2. File Renaming
71
+
72
+ In my applications I upload all files to _tmp_ folder and then have rails manipulate the file (renaming, resizing, etc). Here's a starting point to give you an idea of what that looks like using Paperclip:
73
+
74
+ "How to integrate with Paperclip":http://gist.github.com/575842
75
+
76
+ I prefer this solution because it allows the application to keep tabs on the files. However, if you are looking for a pure javascript solution, check out some of the forks of this project.
77
+
78
+ h2. General Parameters
79
+
80
+ h3. :buttonWidth _(integer = 100)_
81
+
82
+ h3. :buttonHeight _(integer = 30)_
83
+
84
+ h3. :flashVersion _(string = '9.0.0')_
85
+
86
+ h3. :queueSizeLimit _(integer = 100)_
87
+
88
+ Maximum number of files that can be added to the queue.
89
+
90
+ h3. :fileSizeLimit _(integer = 524288000)_
91
+
92
+ Individual file size limit in bytes (default is 512 MB)
93
+
94
+ h3. :fileTypes _(string = '*.*')_
95
+
96
+ Something like this also works: <code>'*.jpg;*.gif;*.png;'</code>
97
+
98
+ h3. :fileTypeDescs _(string = 'All Files')_
99
+
100
+ Something like this also works: <code>'Image files.'</code>
101
+
102
+ h3. :selectMultipleFiles _(boolean = true)_
103
+
104
+ Set this to false if you only want to allow users to pick one file at a time.
105
+
106
+ h3. :keyPrefix _(string = '')_
107
+
108
+ String to be prepended to the uploaded file name to make the Amazon S3 key (location in bucket).
109
+
110
+ h3. :signaturePath _(string = '/s3_uploads.xml')_
111
+
112
+ Fully qualified path to the controller and action that will serve up the Amazon S3 signature
113
+
114
+ h3. :swfFilePath _(string = '/flash/s3_upload.swf')_
115
+
116
+ Fully qualified path to the SWF file (this is the one that does all the work).
117
+
118
+ h3. :buttonUpPath _(string = '/flash/s3_up_button.gif')_
119
+
120
+ Fully qualified path to an image to be used as the Browse Button (in the up state). Image should have same dimensions as the buttonWidth and buttonHeight parameters.
121
+
122
+ h3. :buttonOverPath _(string = '/flash/s3_over_button.gif')_
123
+
124
+ Fully qualified path to an image to be used as the Browse Button (in the over state). Image should have same dimensions as the buttonWidth and buttonHeight parameters.
125
+
126
+ h3. :buttonDownPath _(string = '/flash/s3_down_button.gif')_
127
+
128
+ Fully qualified path to an image to be used as the Browse Button (in the down state). Image should have same dimensions as the buttonWidth and buttonHeight parameters.
129
+
130
+ h2. Callback Parameters
131
+
132
+ The real power of this refactoring is that the flex application makes all of the following calls to JavaScript. What you do with the calls is totally up to you:
133
+
134
+ * :onFileAdd _(file)_
135
+ * :onFileRemove _(file)_
136
+ * :onFileSizeLimitReached _(file)_
137
+ * :onFileNotInQueue _(file)_
138
+ * :onQueueChange _(queue)_
139
+ * :onQueueSizeLimitReached _(queue)_
140
+ * :onQueueEmpty _(queue)_
141
+ * :onQueueClear _(queue)_
142
+ * :onUploadingStart _()_
143
+ * :onUploadingStop _()_
144
+ * :onUploadingFinish _()_
145
+ * :onSignatureOpen _(file,event)_
146
+ * :onSignatureProgress _(file,progress_event)_
147
+ * :onSignatureSecurityError _(file,security_error_event)_
148
+ * :onSignatureComplete _(file,event)_
149
+ * :onSignatureIOError _(file,io_error_event)_
150
+ * :onSignatureHttpStatus _(file,http_status_event)_
151
+ * :onSignatureXMLError _(file,error_message)_
152
+ * :onUploadError _(upload_options,error)_
153
+ * :onUploadOpen _(upload_options,event)_
154
+ * :onUploadProgress _(upload_options,progress_event)_
155
+ * :onUploadIOError _(upload_options,io_error_event)_
156
+ * :onUploadHttpStatus _(upload_options,http_status_event)_
157
+ * :onUploadSecurityError _(upload_options,security_error_event)_
158
+ * :onUploadComplete _(upload_options,event)_
159
+
160
+ h2. JavaScript Functions
161
+
162
+ The following functions can be called on the generated object. Normally the call looks something like this:
163
+
164
+ <pre><code>s3_swf_1_object.startUploading();
165
+ </code></pre>
166
+
167
+ h3. startUploading
168
+
169
+ Starts the uploading process
170
+
171
+ h3. stopUploading
172
+
173
+ Stops the uploading process. Note: Stopping and restarting the uploading process is buggy. I'd avoid it.
174
+
175
+ h3. clearQueue
176
+
177
+ Clears all files out of the queue.
178
+
179
+ h3. removeFileFromQueue(integer)
180
+
181
+ Removes a specific file from the queue.
182
+
183
+ h2. Will it work with < Rails 3?
184
+
185
+ You bet. The Rails 3 specific gem only makes installation and setup easier. Here are some tips for getting this to work with < Rails 3:
186
+
187
+ * install it as a plugin <code>script/plugin install git://github.com/nathancolgate/s3-swf-upload-plugin.git</code>
188
+ * copy the "template files":http://github.com/nathancolgate/s3-swf-upload-plugin/tree/master/lib/s3_swf_upload/railties/generators/uploader/templates/ into your application (use the "generator":http://github.com/nathancolgate/s3-swf-upload-plugin/blob/master/lib/s3_swf_upload/railties/generators/uploader/uploader_generator.rb as a road map)
189
+ * copy the "view helpers":http://github.com/nathancolgate/s3-swf-upload-plugin/blob/master/lib/s3_swf_upload/view_helpers.rb into your applications <code>/lib</code> directory.
190
+ * add the view helper and integer monkey patch to an initialization file:
191
+ <code>
192
+ require 'view_helpers'
193
+ require 'patch/integer'
194
+ </code>
195
+ * load the config file by adding this to the bottom of your environment.rb file: <code>S3SwfUpload::S3Config.load_config</code>
196
+ * replace references to Rails.root or Rails.env in the <code>/vendor/plugins/s3-swf-upload-plugin/lib/s3_swf_upload/s3_config.rb</code> file.
197
+ * comment out the require railties inside <code>/vendor/plugins/s3-swf-upload-plugin/lib/s3_swf_upload.rb</code>
198
+ * you may need to require 's3_swf_upload' and 'aws/s3' in your environment.rb file
199
+ * your route will be map.resources instead of resources.
200
+
201
+ h2. Known Issues
202
+
203
+ 1. As much as I would like the interface to be 100% HTML, a (legitimate) security feature in Flash does not allow it:
204
+
205
+ bq. "With Adobe Flash Player 10, the <code>FileReference.browse</code> and <code>FileReference.download</code> operations may be initiated only through ActionScript that originates from user interaction." - "Adobe TechNote":http://kb2.adobe.com/cps/405/kb405546.html
206
+
207
+ The next best thing I could come up with was to pass images in as buttons.
208
+
209
+ -If the <code>startUploading</code> call is made after calling <code>stopUploading</code>, only the first file in the queue is successfully uploaded.-
210
+
211
+ h2. Kudos
212
+
213
+ Original plugin is Copyright (c) 2008 elctech, released under the MIT license
214
+
215
+ Updates to plugin for multiple file uploader are Copyright (c) 2010 PRX, released under the MIT license
216
+
217
+ Conversion of plugin to gem for rails 3 is Copyright (c) 2010 Nathan Colgate Clark, released under the MIT license
218
+
219
+ Stripping the flex application of UI and adding callbacks Copyright (c) 2010 Nathan Colgate Clark, released under the MIT license
220
+
221
+ Thanks to yickster (Nick Merwin) for fixing the stopUploading issue
222
+
@@ -0,0 +1,14 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+ require 'echoe'
4
+
5
+ Echoe.new("s3_swf_upload") do |p|
6
+ p.author = "Nathan Colgate"
7
+ p.email = "nathan@brandnewbox.com"
8
+ p.description = "Rails 3 gem that allows you to upload files directly to S3 from your application using flex for file management, css for presentation, and javascript for behavior."
9
+ p.url = "http://github.com/nathancolgate/s3-swf-upload-plugin"
10
+ p.version = '0.3.2'
11
+ p.development_dependencies = []
12
+ p.ignore_pattern = [".gitignore"]
13
+ end
14
+
@@ -0,0 +1,356 @@
1
+ <?xml version="1.0"?>
2
+
3
+ <!--
4
+
5
+ ADOBE SYSTEMS INCORPORATED
6
+ Copyright 2005-2007 Adobe Systems Incorporated
7
+ All Rights Reserved.
8
+
9
+ NOTICE: Adobe permits you to use, modify, and distribute this file
10
+ in accordance with the terms of the license agreement accompanying it.
11
+
12
+ -->
13
+
14
+ <flex-config>
15
+ <!-- Specifies the minimum player version that will run the compiled SWF. -->
16
+ <!-- 9.0.124 is the April 2008 security release -->
17
+ <target-player>9.0.124</target-player>
18
+
19
+ <compiler>
20
+
21
+ <!-- Turn on generation of accessible SWFs. -->
22
+ <accessible>false</accessible>
23
+
24
+ <!-- Specifies the locales for internationalization. -->
25
+ <locale>
26
+ <locale-element>en_US</locale-element>
27
+ </locale>
28
+
29
+ <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
30
+ <source-path>
31
+ <path-element>../src</path-element>
32
+ </source-path>
33
+
34
+ <!-- Allow the source-path to have path-elements which contain other path-elements -->
35
+ <allow-source-path-overlap>false</allow-source-path-overlap>
36
+
37
+ <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
38
+ <!-- code. -->
39
+ <show-actionscript-warnings>true</show-actionscript-warnings>
40
+
41
+ <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
42
+ <!-- but true by default for compc. -->
43
+ <!--
44
+ <debug>true</debug>
45
+ -->
46
+
47
+ <!-- List of SWC files or directories to compile against but to omit from -->
48
+ <!-- linking. -->
49
+ <external-library-path>
50
+ <path-element>${flexlib}/libs/player/{targetPlayerMajorVersion}/playerglobal.swc</path-element>
51
+ </external-library-path>
52
+
53
+ <!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
54
+ <!-- the compiler during mxml translation and are helpful with understanding and -->
55
+ <!-- debugging Flex applications. -->
56
+ <keep-generated-actionscript>false</keep-generated-actionscript>
57
+
58
+ <!-- not set -->
59
+ <!--
60
+ <include-libraries>
61
+ <library>string</library>
62
+ </include-libraries>
63
+ -->
64
+
65
+ <!-- List of SWC files or directories that contain SWC files. -->
66
+ <library-path>
67
+ <path-element>${flexlib}/libs</path-element>
68
+ <!-- keep the original location in the libpath for backwards-compatibility -->
69
+ <path-element>${flexlib}/libs/player</path-element>
70
+ <path-element>${flexlib}/libs/player/{targetPlayerMajorVersion}</path-element>
71
+ <path-element>${flexlib}/locale/{locale}</path-element>
72
+ </library-path>
73
+
74
+ <namespaces>
75
+ <!-- Specify a URI to associate with a manifest of components for use as MXML -->
76
+ <!-- elements. -->
77
+ <namespace>
78
+ <uri>http://www.adobe.com/2006/mxml</uri>
79
+ <manifest>${flexlib}/mxml-manifest.xml</manifest>
80
+ </namespace>
81
+ </namespaces>
82
+
83
+ <!-- Enable post-link SWF optimization. -->
84
+ <optimize>true</optimize>
85
+
86
+ <!-- Keep the following AS3 metadata in the bytecodes. -->
87
+ <!-- Warning: For the data binding feature in the Flex framework to work properly, -->
88
+ <!-- the following metadata must be kept: -->
89
+ <!-- 1. Bindable -->
90
+ <!-- 2. Managed -->
91
+ <!-- 3. ChangeEvent -->
92
+ <!-- 4. NonCommittingChangeEvent -->
93
+ <!-- 5. Transient -->
94
+ <!--
95
+ <keep-as3-metadata>
96
+ <name>Bindable</name>
97
+ <name>Managed</name>
98
+ <name>ChangeEvent</name>
99
+ <name>NonCommittingChangeEvent</name>
100
+ <name>Transient</name>
101
+ </keep-as3-metadata>
102
+ -->
103
+
104
+ <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
105
+ <!-- will not be able to detect assignments to "foo". -->
106
+ <show-binding-warnings>true</show-binding-warnings>
107
+
108
+ <!-- toggle whether warnings generated from unused type selectors are displayed -->
109
+ <show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
110
+
111
+ <!-- Run the AS3 compiler in strict error checking mode. -->
112
+ <strict>true</strict>
113
+
114
+ <!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
115
+ <!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
116
+ <!-- (-strict is recommended, but not required, for earlier errors) -->
117
+ <as3>true</as3>
118
+
119
+ <!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
120
+ <!-- properties. In the prototype based object model built-in functions are implemented as dynamic -->
121
+ <!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for -->
122
+ <!-- references to dynamic properties) -->
123
+ <es>false</es>
124
+
125
+ <!-- List of CSS or SWC files to apply as a theme. -->
126
+ <!-- not set -->
127
+ <!--
128
+ <theme>
129
+ <filename>string</filename>
130
+ <filename>string</filename>
131
+ </theme>
132
+ -->
133
+
134
+ <!-- Turns on the display of stack traces for uncaught runtime errors. -->
135
+ <verbose-stacktraces>false</verbose-stacktraces>
136
+
137
+ <!-- Defines the AS3 file encoding. -->
138
+ <!-- not set -->
139
+ <!--
140
+ <actionscript-file-encoding></actionscript-file-encoding>
141
+ -->
142
+
143
+ <fonts>
144
+
145
+ <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
146
+ <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
147
+ <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true</flash-type> -->
148
+ <advanced-anti-aliasing>true</advanced-anti-aliasing>
149
+
150
+ <!-- The number of embedded font faces that are cached. -->
151
+ <max-cached-fonts>20</max-cached-fonts>
152
+
153
+ <!-- The number of character glyph outlines to cache for each font face. -->
154
+ <max-glyphs-per-face>1000</max-glyphs-per-face>
155
+
156
+ <!-- Defines ranges that can be used across multiple font-face declarations. -->
157
+ <!-- See flash-unicode-table.xml for more examples. -->
158
+ <!-- not set -->
159
+ <!--
160
+ <languages>
161
+ <language-range>
162
+ <lang>englishRange</lang>
163
+ <range>U+0020-U+007E</range>
164
+ </language-range>
165
+ </languages>
166
+ -->
167
+
168
+ <!-- Compiler font manager classes, in policy resolution order-->
169
+ <managers>
170
+ <manager-class>flash.fonts.JREFontManager</manager-class>
171
+ <manager-class>flash.fonts.AFEFontManager</manager-class>
172
+ <manager-class>flash.fonts.BatikFontManager</manager-class>
173
+ </managers>
174
+
175
+ <!-- File containing cached system font licensing information produced via
176
+ java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
177
+ Will default to winFonts.ser on Windows XP and
178
+ macFonts.ser on Mac OS X, so is commented out by default.
179
+
180
+ <local-fonts-snapshot>localFonts.ser</local-fonts-snapshot>
181
+ -->
182
+
183
+ </fonts>
184
+
185
+ <!-- Array.toString() format has changed. -->
186
+ <warn-array-tostring-changes>false</warn-array-tostring-changes>
187
+
188
+ <!-- Assignment within conditional. -->
189
+ <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
190
+
191
+ <!-- Possibly invalid Array cast operation. -->
192
+ <warn-bad-array-cast>true</warn-bad-array-cast>
193
+
194
+ <!-- Non-Boolean value used where a Boolean value was expected. -->
195
+ <warn-bad-bool-assignment>true</warn-bad-bool-assignment>
196
+
197
+ <!-- Invalid Date cast operation. -->
198
+ <warn-bad-date-cast>true</warn-bad-date-cast>
199
+
200
+ <!-- Unknown method. -->
201
+ <warn-bad-es3-type-method>true</warn-bad-es3-type-method>
202
+
203
+ <!-- Unknown property. -->
204
+ <warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
205
+
206
+ <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
207
+ <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
208
+
209
+ <!-- Impossible assignment to null. -->
210
+ <warn-bad-null-assignment>true</warn-bad-null-assignment>
211
+
212
+ <!-- Illogical comparison with null. -->
213
+ <warn-bad-null-comparison>true</warn-bad-null-comparison>
214
+
215
+ <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
216
+ <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
217
+
218
+ <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
219
+ <warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
220
+
221
+ <!-- __resolve is no longer supported. -->
222
+ <warn-changes-in-resolve>false</warn-changes-in-resolve>
223
+
224
+ <!-- Class is sealed. It cannot have members added to it dynamically. -->
225
+ <warn-class-is-sealed>true</warn-class-is-sealed>
226
+
227
+ <!-- Constant not initialized. -->
228
+ <warn-const-not-initialized>true</warn-const-not-initialized>
229
+
230
+ <!-- Function used in new expression returns a value. Result will be what the -->
231
+ <!-- function returns, rather than a new instance of that function. -->
232
+ <warn-constructor-returns-value>false</warn-constructor-returns-value>
233
+
234
+ <!-- EventHandler was not added as a listener. -->
235
+ <warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
236
+
237
+ <!-- Unsupported ActionScript 2.0 function. -->
238
+ <warn-deprecated-function-error>true</warn-deprecated-function-error>
239
+
240
+ <!-- Unsupported ActionScript 2.0 property. -->
241
+ <warn-deprecated-property-error>true</warn-deprecated-property-error>
242
+
243
+ <!-- More than one argument by the same name. -->
244
+ <warn-duplicate-argument-names>true</warn-duplicate-argument-names>
245
+
246
+ <!-- Duplicate variable definition -->
247
+ <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
248
+
249
+ <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
250
+ <warn-for-var-in-changes>false</warn-for-var-in-changes>
251
+
252
+ <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
253
+ <warn-import-hides-class>true</warn-import-hides-class>
254
+
255
+ <!-- Use of the instanceof operator. -->
256
+ <warn-instance-of-changes>true</warn-instance-of-changes>
257
+
258
+ <!-- Internal error in compiler. -->
259
+ <warn-internal-error>true</warn-internal-error>
260
+
261
+ <!-- _level is no longer supported. For more information, see the flash.display package. -->
262
+ <warn-level-not-supported>true</warn-level-not-supported>
263
+
264
+ <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
265
+ <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
266
+
267
+ <!-- Negative value will become a large positive value when assigned to a uint data type. -->
268
+ <warn-negative-uint-literal>true</warn-negative-uint-literal>
269
+
270
+ <!-- Missing constructor. -->
271
+ <warn-no-constructor>false</warn-no-constructor>
272
+
273
+ <!-- The super() statement was not called within the constructor. -->
274
+ <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
275
+
276
+ <!-- Missing type declaration. -->
277
+ <warn-no-type-decl>true</warn-no-type-decl>
278
+
279
+ <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
280
+ <!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space. -->
281
+ <warn-number-from-string-changes>false</warn-number-from-string-changes>
282
+
283
+ <!-- Change in scoping for the this keyword. Class methods extracted from an -->
284
+ <!-- instance of a class will always resolve this back to that instance. In -->
285
+ <!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
286
+ <!-- is invoked from. -->
287
+ <warn-scoping-change-in-this>false</warn-scoping-change-in-this>
288
+
289
+ <!-- Inefficient use of += on a TextField.-->
290
+ <warn-slow-text-field-addition>true</warn-slow-text-field-addition>
291
+
292
+ <!-- Possible missing parentheses. -->
293
+ <warn-unlikely-function-value>true</warn-unlikely-function-value>
294
+
295
+ <!-- Possible usage of the ActionScript 2.0 XML class. -->
296
+ <warn-xml-class-has-changed>false</warn-xml-class-has-changed>
297
+
298
+ </compiler>
299
+
300
+ <!-- compute-digest: writes a digest to the catalog.xml of a library. Use this when the library will be used as a
301
+ cross-domain rsl.-->
302
+ <!-- compute-digest usage:
303
+ <compute-digest>boolean</compute-digest>
304
+ -->
305
+
306
+ <!-- A list of runtime shared library URLs to be loaded before applications start. -->
307
+ <!-- not set -->
308
+ <!--
309
+ <runtime-shared-libraries>
310
+ <url>string</url>
311
+ <url>string</url>
312
+ </runtime-shared-libraries>
313
+ -->
314
+
315
+ <!-- runtime-shared-library-path: specifies a SWC or directory to link against and an RSL URL to load with optional failover URLs -->
316
+ <runtime-shared-library-path>
317
+ <path-element>libs/framework.swc</path-element>
318
+ <rsl-url>framework_3.4.0.9271.swz</rsl-url>
319
+ <policy-file-url></policy-file-url>
320
+ <rsl-url>framework_3.4.0.9271.swf</rsl-url>
321
+ <policy-file-url></policy-file-url>
322
+ </runtime-shared-library-path>
323
+ <!-- static-link-runtime-shared-libraries: statically link the libraries specified by the -runtime-shared-libraries-path option.-->
324
+ <static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
325
+
326
+ <!-- target-player: specifies the version of the player the application is targeting.
327
+ Features requiring a later version will not be compiled into the application.
328
+ The minimum value supported is "9.0.0".-->
329
+ <!-- target-player usage:
330
+ <target-player>version</target-player>
331
+ -->
332
+
333
+ <!-- Enables SWFs to access the network. -->
334
+ <use-network>true</use-network>
335
+
336
+ <!-- Metadata added to SWFs via the SWF Metadata tag. -->
337
+ <metadata>
338
+ <title>Adobe Flex 3 Application</title>
339
+ <description>http://www.adobe.com/products/flex</description>
340
+ <publisher>unknown</publisher>
341
+ <creator>unknown</creator>
342
+ <language>EN</language>
343
+ </metadata>
344
+
345
+ <!-- licenses: specifies a list of product and serial number pairs. -->
346
+ <!-- not set -->
347
+ <!--
348
+ <licenses>
349
+ <license>
350
+ <product>string</product>
351
+ <serial-number>number</serial-number>
352
+ </license>
353
+ </licenses>
354
+ -->
355
+
356
+ </flex-config>