SWF + AIR

Miranda's Avatar

Miranda

14 Nov, 2013 10:16 PM

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!

  1. 1 Posted by Miranda on 14 Nov, 2013 10:17 PM

    Miranda's Avatar

    Note, in case it matters: If I comment out the filesystem stuff, the compiled SWF runs just fine.

  2. Support Staff 2 Posted by Yennick Trevels on 15 Nov, 2013 07:54 AM

    Yennick Trevels's Avatar

    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. 3 Posted by Miranda on 15 Nov, 2013 02:49 PM

    Miranda's Avatar

    But if I build the SWF for AIR using FlashDevelop, I can run the SWF just fine. Is that not possible with Gradle?

  4. 4 Posted by Miranda on 15 Nov, 2013 04:56 PM

    Miranda's Avatar

    Nevermind, it just has to be run with ADL, which is also what FlashDevelop is doing. Sorry for the confusion!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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