Compile Adobe Air Android Project to Java/ Java Library .jar

149 views
Skip to first unread message

bugfree

unread,
Aug 15, 2014, 4:54:21 PM8/15/14
to haxe...@googlegroups.com
Hi there,

I have a Adobe Air for Android project which is a simple video chat application which uses Flash Media server and stream RTMP protocol. I want to integrate the Adobe Air  for Android project to my Java android project. So I want to use Haxe to compile my Air project to Java/Java library. The code editor I am using is FlashDevelop.

I have convert my ASC code to Haxe code. However, when I build the Air project by using haxe -main Main, it keeps telling me that "You cannot access the flash package while targeting cross <for flash.Lib>". How can I solve this issue?

Also, I am curious, is there any documentation for compiling Air to Java? And if I compile Air to Java, will the .jar keeps Air environment and let me be able to use Flash Media server and stream RTMP protocol?

Thank you for your time in advance.

Best,

Benjamin Dubois

unread,
Aug 15, 2014, 9:18:54 PM8/15/14
to haxe...@googlegroups.com
Depending on what you need in the flash library you may find it (crossplatform) in NME/OpenFL libraries.
Without one of these, flash libs are only available when targetting flash.

But I doubt FMS and RTMP are available, they are really adobe specific stuff, plus there are no cam capture outside flash target at the moment.


--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Hengshuo Zhang

unread,
Aug 16, 2014, 9:47:21 AM8/16/14
to haxe...@googlegroups.com
Thank you for your reply Benjamin! That means the Flash library is not available when targeting adobe Air?


You received this message because you are subscribed to a topic in the Google Groups "Haxe" group.

Benjamin Dubois

unread,
Aug 16, 2014, 2:39:07 PM8/16/14
to haxe...@googlegroups.com
As far as I know, you don't have to target Java but Flash 10+ to target Air.
Just don't use lib that are only available on the flash player (but I think it's the other away around).

Some people might indicate you how to package the AIR stuff. Or maybe you can have a glance at libs that target AIR :
http://haxe.org/use-cases/mobile/

j...@justinfront.net

unread,
Aug 16, 2014, 3:03:38 PM8/16/14
to haxe...@googlegroups.com
NME has native component access that might be a good place to look for
integrating android Java with NME/OpenFL android c++.

You can try coding Native Android Java in Haxe, not many people seem to
be doing it yet but should work fine once you get the setup right, and
then maybe port your as3 code to OpenFL and include the android stuff as
a dll or something it's probably not simple.

For Rtmp there is Haxe video but I don't think it get much use, there is
Nicolas version and this one of Jan's with modifications.

https://code.google.com/p/hxis/source/browse/trunk/hxvid/Rtmp.hx

You might want to talk to Influxis they had something called HaxeFMS so
might be able to help and provide video hosting streaming you used to be
able to download some stuff from their server.

But to answer your question any as3 swc should be useable in haxe air
project and vicer verser. Exception is stuff like flex where it's not
pure as3 bytecode.

Certainly you can do pure haxe as3 for air with video no problem, haxe
will have access to the same stuff as as3, for instance see my old
peer2peer tutorial.

http://old.haxe.org/doc/flash/peer2peer

Not sure if that is helpful, currently haxe support for video on Mobile
is probably not good or minimal, but it will work fine on AIR, but it
would be great if some dev's improved video support on OpenFL. I would
check gamehaxe to see what video support NME has.

Best Justin.


On 16/08/2014 14:46, Hengshuo Zhang wrote:
> Thank you for your reply Benjamin! That means the Flash library is not
> available when targeting adobe Air?
>
>
> On Fri, Aug 15, 2014 at 8:18 PM, Benjamin Dubois <bubbl...@gmail.com
> <mailto:bubbl...@gmail.com>> wrote:
>
> Depending on what you need in the flash library you may find it
> (crossplatform) in NME/OpenFL libraries.
> Without one of these, flash libs are only available when targetting
> flash.
>
> But I doubt FMS and RTMP are available, they are really adobe
> specific stuff, plus there are no cam capture outside flash target
> at the moment.
>
>
> On Fri, Aug 15, 2014 at 10:54 PM, bugfree
> <hengshuoz...@depauw.edu
> <mailto:hengshuoz...@depauw.edu>> wrote:
>
> Hi there,
>
> I have a Adobe Air for Android project which is a simple video
> chat application which uses Flash Media server and stream RTMP
> protocol. I want to integrate the Adobe Air for Android project
> to my Java android project. So I want to use Haxe to compile my
> Air project to Java/Java library. The code editor I am using is
> FlashDevelop.
>
> I have convert my ASC code to Haxe code. However, when I build
> the Air project by using haxe -main Main, it keeps telling me
> that "You cannot access the flash package while targeting cross
> <for flash.Lib>". How can I solve this issue?
>
> Also, I am curious, is there any documentation for compiling Air
> to Java? And if I compile Air to Java, will the .jar keeps Air
> environment and let me be able to use Flash Media server and
> stream RTMP protocol?
>
> Thank you for your time in advance.
>
> Best,
>
> --
> To post to this group haxe...@googlegroups.com
> <mailto:haxe...@googlegroups.com>
> http://groups.google.com/group/haxelang?hl=en
> ---
> You received this message because you are subscribed to the
> Google Groups "Haxe" group.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> To post to this group haxe...@googlegroups.com
> <mailto:haxe...@googlegroups.com>
> http://groups.google.com/group/haxelang?hl=en
> ---
> You received this message because you are subscribed to a topic in
> the Google Groups "Haxe" group.
> For more options, visit https://groups.google.com/d/optout.
>
>

j...@justinfront.net

unread,
Aug 16, 2014, 3:12:58 PM8/16/14
to haxe...@googlegroups.com
I am pretty sure OpenFL is setup to do AIR.
https://code.google.com/p/haxeair3/



On 16/08/2014 19:38, Benjamin Dubois wrote:
> As far as I know, you don't have to target Java but Flash 10+ to target Air.
> Just don't use lib that are only available on the flash player (but I
> think it's the other away around).
>
> Some people might indicate you how to package the AIR stuff. Or maybe
> you can have a glance at libs that target AIR :
> http://haxe.org/use-cases/mobile/
>
>
> On Sat, Aug 16, 2014 at 3:46 PM, Hengshuo Zhang
> <hengshuoz...@depauw.edu <mailto:hengshuoz...@depauw.edu>>
> wrote:
>
> Thank you for your reply Benjamin! That means the Flash library is
> not available when targeting adobe Air?
>
>
> On Fri, Aug 15, 2014 at 8:18 PM, Benjamin Dubois
> <bubbl...@gmail.com <mailto:bubbl...@gmail.com>> wrote:
>
> Depending on what you need in the flash library you may find it
> (crossplatform) in NME/OpenFL libraries.
> Without one of these, flash libs are only available when
> targetting flash.
>
> But I doubt FMS and RTMP are available, they are really adobe
> specific stuff, plus there are no cam capture outside flash
> target at the moment.
>
>
> On Fri, Aug 15, 2014 at 10:54 PM, bugfree
> <hengshuoz...@depauw.edu
> <mailto:hengshuoz...@depauw.edu>> wrote:
>
> Hi there,
>
> I have a Adobe Air for Android project which is a simple
> video chat application which uses Flash Media server and
> stream RTMP protocol. I want to integrate the Adobe Air for
> Android project to my Java android project. So I want to use
> Haxe to compile my Air project to Java/Java library. The
> code editor I am using is FlashDevelop.
>
> I have convert my ASC code to Haxe code. However, when I
> build the Air project by using haxe -main Main, it keeps
> telling me that "You cannot access the flash package while
> targeting cross <for flash.Lib>". How can I solve this issue?
>
> Also, I am curious, is there any documentation for compiling
> Air to Java? And if I compile Air to Java, will the .jar
> keeps Air environment and let me be able to use Flash Media
> server and stream RTMP protocol?
>
> Thank you for your time in advance.
>
> Best,
>
> --
> To post to this group haxe...@googlegroups.com
> <mailto:haxe...@googlegroups.com>
> http://groups.google.com/group/haxelang?hl=en
> ---
> You received this message because you are subscribed to the
> Google Groups "Haxe" group.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> To post to this group haxe...@googlegroups.com
> <mailto:haxe...@googlegroups.com>
> http://groups.google.com/group/haxelang?hl=en
> ---
> You received this message because you are subscribed to a topic
> in the Google Groups "Haxe" group.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> To post to this group haxe...@googlegroups.com
> <mailto:haxe...@googlegroups.com>

Hengshuo Zhang

unread,
Aug 16, 2014, 3:46:42 PM8/16/14
to haxe...@googlegroups.com
Hi Justin,

Thank you very much for your time to help me. I will look into the approaches you suggested. I am going to firstly check the OpenFL for Air3. 

Best,
Hengshuo


On Sat, Aug 16, 2014 at 2:12 PM, j...@justinfront.net <j...@justinfront.net> wrote:
I am pretty sure OpenFL is setup to do AIR.
https://code.google.com/p/haxeair3/




On 16/08/2014 19:38, Benjamin Dubois wrote:
As far as I know, you don't have to target Java but Flash 10+ to target Air.
Just don't use lib that are only available on the flash player (but I
think it's the other away around).

Some people might indicate you how to package the AIR stuff. Or maybe
you can have a glance at libs that target AIR :
http://haxe.org/use-cases/mobile/


On Sat, Aug 16, 2014 at 3:46 PM, Hengshuo Zhang

wrote:

    Thank you for your reply Benjamin! That means the Flash library is
    not available when targeting adobe Air?


    On Fri, Aug 15, 2014 at 8:18 PM, Benjamin Dubois
    <bubbl...@gmail.com <mailto:bubbl...@gmail.com>> wrote:

        Depending on what you need in the flash library you may find it
        (crossplatform) in NME/OpenFL libraries.
        Without one of these, flash libs are only available when
        targetting flash.

        But I doubt FMS and RTMP are available, they are really adobe
        specific stuff, plus there are no cam capture outside flash
        target at the moment.


        On Fri, Aug 15, 2014 at 10:54 PM, bugfree
        <hengshuoz...@depauw.edu
        <mailto:hengshuozhang_2015@depauw.edu>> wrote:

            Hi there,

            I have a Adobe Air for Android project which is a simple
            video chat application which uses Flash Media server and
            stream RTMP protocol. I want to integrate the Adobe Air  for
            Android project to my Java android project. So I want to use
            Haxe to compile my Air project to Java/Java library. The
            code editor I am using is FlashDevelop.

            I have convert my ASC code to Haxe code. However, when I
            build the Air project by using haxe -main Main, it keeps
            telling me that "You cannot access the flash package while
            targeting cross <for flash.Lib>". How can I solve this issue?

            Also, I am curious, is there any documentation for compiling
            Air to Java? And if I compile Air to Java, will the .jar
            keeps Air environment and let me be able to use Flash Media
            server and stream RTMP protocol?

            Thank you for your time in advance.

            Best,

            --
            To post to this group haxe...@googlegroups.com
            <mailto:haxelang@googlegroups.com>

            http://groups.google.com/group/haxelang?hl=en
            ---
            You received this message because you are subscribed to the
            Google Groups "Haxe" group.

            For more options, visit https://groups.google.com/d/optout.


        --
        To post to this group haxe...@googlegroups.com
        <mailto:haxelang@googlegroups.com>

        http://groups.google.com/group/haxelang?hl=en
        ---
        You received this message because you are subscribed to a topic
        in the Google Groups "Haxe" group.

        For more options, visit https://groups.google.com/d/optout.


    --
    To post to this group haxe...@googlegroups.com

    http://groups.google.com/group/haxelang?hl=en
    ---
    You received this message because you are subscribed to the Google
    Groups "Haxe" group.
    For more options, visit https://groups.google.com/d/optout.


--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google
Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages