as3commons requiring playerglobal 4.5 but I develop with Flex 3.6

thomas.auinger's Avatar

thomas.auinger

14 Nov, 2013 02:13 PM

I would love to use as3commons-lang in my Flex 3.6 project but cannot do so. Problems are:
* it has been released with a dependency to playerglobal 4.5.1.21328
* when I exclude that dependency compilation fails with "Type was not found or was not a compile-time constant: Vector."
* when I download the 10.2 playerglobal from Adobe and upload it into my Archiva repository, I cannot get to use it as a dependency:
** declaring it as "merged" results in an attempted download: Could not download artifact 'com.adobe.flex.framework:playerglobal:10.2:10.2@swc' (note the doubled version number -- bug?)
** declaring as external or internal doesnt help since as3commons apparently required it to be merged

Any feedback/help very welcome ;)

  1. Support Staff 1 Posted by Yennick Trevels on 14 Nov, 2013 02:46 PM

    Yennick Trevels's Avatar

    what I did was the following:

    configurations {
        all*.exclude group: 'com.adobe.flex.framework'
    }
    

    It's just excluding it, but since you already tried something like that I don't know whether this will solve anything. If it doesn't, just let me know :)

  2. 2 Posted by thomas.auinger on 14 Nov, 2013 02:55 PM

    thomas.auinger's Avatar

    Tried that before.. Then I get:

    D:\Repositories\gradle\caches\artifacts-26\filestore\org.as3commons\as3commons-lang\0.3.6\swc\c5364058044e9475372e6de2c46c0440c9fe5433\as3commons-lang-0.3.6.swc(org/as3commons/lang/StringUtils)

    Type was not found or was not a compile-time constant: Vector.

  3. Support Staff 3 Posted by Yennick Trevels on 14 Nov, 2013 03:33 PM

    Yennick Trevels's Avatar

    mmm indeed, since Vector is new since Flash Player 10.

    That doubled version number bug is rather weird, but should't have to do anything with GradleFx. That's either something with Gradle or your configuration. So you'll probably have to investigate that some more to make sure there's no error in there.
    Once you get that working, you're code should build fine.

  4. Support Staff 4 Posted by Maxime Cowez on 14 Nov, 2013 04:35 PM

    Maxime Cowez's Avatar

    This question is indeed not related to GradleFx. But here are some suggestions anyway ;)

    The easiest approach would be to compile your Flex 3.6 codebase with a more recent SDK. It should be backwards compatible.

    If that's not an option, I think this is what you must do (mind you, I didn't test this now, but I vaguely remember doing something similar to use 3D support when it first came out):

    • download 10.2 playerglobal.swc
    • copy it to the Flex SDK folder that contains the default player swcs; the resulting path should be something like [path to sdk]/frameworks/libs/player/10.2/playerglobal.swc (I hope it's the same in a 3.x SDK)
    • tell the compiler to target this player version instead of the default one; you can do this per project by using the -target-player=10.2 additional compiler flag; or you can do it for all projects using this SDK by editing the target-player node in [path to sdk]/frameworks/flex-config.xml
    • if you want to be able to use this customized SDK as an artifact, just zip it, deploy it on your Archiva and change the SDK dependency to target this artifact

    Hope this helps
    m

  5. Support Staff 5 Posted by Maxime Cowez on 14 Nov, 2013 04:45 PM

    Maxime Cowez's Avatar

    Things are slowly coming back to me ;)
    I also remember having to change the swf-version node in [path to sdk]/frameworks/flex-config.xml to the appropriate number when I did this for my 3D project. You'll have to do some research to find out which swf version number matches your target player swc.
    FYI: I have an old Flex 4.5.1 still on my PC, which targets player version 10.2 and swf version 11.

  6. 6 Posted by thomas.auinger on 15 Nov, 2013 09:31 AM

    thomas.auinger's Avatar

    Yes No ;) Swapping the SWC is a great idea. Did that but there is no "swf-version" to change, so I changed the "<target-player>" version to 10.2 and it compiles!

    Haleluya! Thanks!

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