SWF + AIR
Hello all! I'm really new to Gradle, so apologies if my question is silly....
So, I had a Gradle "swf" application that was working fine. However, there's now a class in it that is importing from flash.filesystem, which requires AIR player and not Flash player. I changed the type to "air" and it's compiling now (running "gradle build"), but I get a run-time error when I try to run the SWF:
VerifyError: Error #1014: Class flash.filesystem::File could not be found.
Any ideas as to what I might be missing? I have flexSDK and airSDK added as dependencies. Thanks in advance for your help!
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
1 Posted by Miranda on 14 Nov, 2013 10:17 PM
Note, in case it matters: If I comment out the filesystem stuff, the compiled SWF runs just fine.
Support Staff 2 Posted by Yennick Trevels on 15 Nov, 2013 07:54 AM
Hi Miranda,
That's probably because File is a class which requires the AIR runtime and when you just run the swf it's not running within an AIR container. So to make this work you'll have to install the AIR package and then run the installed application.
If however you can get everything done with the FileReference class instead of the File class, then you don't need AIR at all.
3 Posted by Miranda on 15 Nov, 2013 02:49 PM
But if I build the SWF for AIR using FlashDevelop, I can run the SWF just fine. Is that not possible with Gradle?
4 Posted by Miranda on 15 Nov, 2013 04:56 PM
Nevermind, it just has to be run with ADL, which is also what FlashDevelop is doing. Sorry for the confusion!