Re: [FlexJS] Embed Workaround

2017-03-07 Thread Alex Harui


On 3/7/17, 2:46 AM, "yishayw"  wrote:

>I guess nightly wasn't up2date. After rebuilding falcon I'm not getting
>anymore compile errors with embed. Thanks.
>
>I added
>
>org.apache.flex.core.ByteArrayAssetbed-class>
>to
>Graphics\src\main\config\compile-as-config.xml
>
>to make the ant build work, however my Maven build is failing. Where is
>the
>standard place to add a compiler option for Maven?

Look in MDLExample/pom.xml for "additionalCompilerOptions".

However, it may be better to make this apply to everyone by changing in
flex-falcon/flexjs-maven-plugin

src/main/resources/config/compile-app-config.xml
src/main/resources/config/compile-js-config.xml
src/main/resources/config/compile-as-config.xml




HTH,
-Alex



RE: [FlexJS] Embed Workaround

2017-03-07 Thread yishayw
I guess nightly wasn't up2date. After rebuilding falcon I'm not getting
anymore compile errors with embed. Thanks.

I added

org.apache.flex.core.ByteArrayAsset
to
Graphics\src\main\config\compile-as-config.xml

to make the ant build work, however my Maven build is failing. Where is the
standard place to add a compiler option for Maven?



--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-Embed-Workaround-tp60136p60204.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


RE: [FlexJS] Embed Workaround

2017-03-07 Thread Yishay Weiss
I’m getting

command line Error: unknown configuration variable 
'compiler.byte-array-embed-class'.

After downloading the nightly.

From: Alex Harui<mailto:aha...@adobe.com>
Sent: Monday, March 6, 2017 9:35 PM
To: dev@flex.apache.org<mailto:dev@flex.apache.org>
Subject: Re: [FlexJS] Embed Workaround

I just pushed an untested attempt to allow using a different class for
embeds.  It is in the develop branch.

Normally, the compiler expects to find a flex SDK swc with
mx.core.ByteArrayAsset in it.  You should be able to create an
org.apache.flex.core.ByteArrayAsset class that extends
flash.utils.ByteArray and add the compiler option
-compiler.byte-array-embed-class=org.apache.flex.core.ByteArrayAsset.  I
don't think the IFlexAsset interface is required.

HTH,
-Alex

On 3/6/17, 9:32 AM, "Harbs" <harbs.li...@gmail.com> wrote:

>I’m sorry but you totally lost me there… ;-)
>
>What name, used where?
>
>I don’t understand how the [Embed] tag works and where the ByteArrayAsset
>comes from.
>
>> On Mar 6, 2017, at 7:27 PM, Alex Harui <aha...@adobe.com> wrote:
>>
>>
>>
>> On 3/6/17, 9:05 AM, "Harbs" <harbs.li...@gmail.com> wrote:
>>
>>> How to add full support for [Embed] is a complicated question.
>>>
>>> I think it would be great to support it, but the details get sticky. I
>>> think we need a list of use cases for [Embed] to figure out the right
>>> behavior for each and a way to differentiate the use cases. On the
>>> simplest level, it could simply copy files and set src to the copied
>>> path. Maybe get fancy with BinaryData? What to do with BitmapData? What
>>> about Class assignment? I’m not sure what the right answer is to these
>>> questions.
>>>
>>> For the BlendBead, all we really need though, is SWF support. The JS
>>>side
>>> does not rely on the PixelBender files.
>>
>> Well, in keeping with other compiler changes, the answer would be to
>>make
>> the name of the ByteArrayAsset class configurable like we did for the
>> PropertyChangeEvent.  If you want a quick fix for now, just change the
>> name used in DataTranscoder.java.
>>
>> Thanks,
>> -Alex
>>
>



Re: [FlexJS] Embed Workaround

2017-03-06 Thread Alex Harui
I just pushed an untested attempt to allow using a different class for
embeds.  It is in the develop branch.

Normally, the compiler expects to find a flex SDK swc with
mx.core.ByteArrayAsset in it.  You should be able to create an
org.apache.flex.core.ByteArrayAsset class that extends
flash.utils.ByteArray and add the compiler option
-compiler.byte-array-embed-class=org.apache.flex.core.ByteArrayAsset.  I
don't think the IFlexAsset interface is required.

HTH,
-Alex

On 3/6/17, 9:32 AM, "Harbs"  wrote:

>I’m sorry but you totally lost me there… ;-)
>
>What name, used where?
>
>I don’t understand how the [Embed] tag works and where the ByteArrayAsset
>comes from.
>
>> On Mar 6, 2017, at 7:27 PM, Alex Harui  wrote:
>> 
>> 
>> 
>> On 3/6/17, 9:05 AM, "Harbs"  wrote:
>> 
>>> How to add full support for [Embed] is a complicated question.
>>> 
>>> I think it would be great to support it, but the details get sticky. I
>>> think we need a list of use cases for [Embed] to figure out the right
>>> behavior for each and a way to differentiate the use cases. On the
>>> simplest level, it could simply copy files and set src to the copied
>>> path. Maybe get fancy with BinaryData? What to do with BitmapData? What
>>> about Class assignment? I’m not sure what the right answer is to these
>>> questions.
>>> 
>>> For the BlendBead, all we really need though, is SWF support. The JS
>>>side
>>> does not rely on the PixelBender files.
>> 
>> Well, in keeping with other compiler changes, the answer would be to
>>make
>> the name of the ByteArrayAsset class configurable like we did for the
>> PropertyChangeEvent.  If you want a quick fix for now, just change the
>> name used in DataTranscoder.java.
>> 
>> Thanks,
>> -Alex
>> 
>



Re: [FlexJS] Embed Workaround

2017-03-06 Thread Harbs
I’m sorry but you totally lost me there… ;-)

What name, used where?

I don’t understand how the [Embed] tag works and where the ByteArrayAsset comes 
from.

> On Mar 6, 2017, at 7:27 PM, Alex Harui  wrote:
> 
> 
> 
> On 3/6/17, 9:05 AM, "Harbs"  wrote:
> 
>> How to add full support for [Embed] is a complicated question.
>> 
>> I think it would be great to support it, but the details get sticky. I
>> think we need a list of use cases for [Embed] to figure out the right
>> behavior for each and a way to differentiate the use cases. On the
>> simplest level, it could simply copy files and set src to the copied
>> path. Maybe get fancy with BinaryData? What to do with BitmapData? What
>> about Class assignment? I’m not sure what the right answer is to these
>> questions.
>> 
>> For the BlendBead, all we really need though, is SWF support. The JS side
>> does not rely on the PixelBender files.
> 
> Well, in keeping with other compiler changes, the answer would be to make
> the name of the ByteArrayAsset class configurable like we did for the
> PropertyChangeEvent.  If you want a quick fix for now, just change the
> name used in DataTranscoder.java.
> 
> Thanks,
> -Alex
> 



Re: [FlexJS] Embed Workaround

2017-03-06 Thread Josh Tynjala
Maybe [Embed] could store bitmaps and binary data as Data URIs on the JS
side:

https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Using_images#Embedding_an_image_via_data_URL

https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs

- Josh

On Mon, Mar 6, 2017 at 9:05 AM, Harbs  wrote:

> How to add full support for [Embed] is a complicated question.
>
> I think it would be great to support it, but the details get sticky. I
> think we need a list of use cases for [Embed] to figure out the right
> behavior for each and a way to differentiate the use cases. On the simplest
> level, it could simply copy files and set src to the copied path. Maybe get
> fancy with BinaryData? What to do with BitmapData? What about Class
> assignment? I’m not sure what the right answer is to these questions.
>
> For the BlendBead, all we really need though, is SWF support. The JS side
> does not rely on the PixelBender files.
>
> Harbs
>
> > On Mar 6, 2017, at 6:54 PM, Alex Harui  wrote:
> >
> >
> >
> > On 3/6/17, 8:33 AM, "Harbs"  wrote:
> >
> >> Yishay got an error that ByteArrayAsset could not be found.
> >
> > Ah yes.  That should be relatively easy to fix for SWF compiles.   But
> > what should the cross-compiler do?
> >
> > -Alex
> >
>
>


Re: [FlexJS] Embed Workaround

2017-03-06 Thread Alex Harui


On 3/6/17, 9:05 AM, "Harbs"  wrote:

>How to add full support for [Embed] is a complicated question.
>
>I think it would be great to support it, but the details get sticky. I
>think we need a list of use cases for [Embed] to figure out the right
>behavior for each and a way to differentiate the use cases. On the
>simplest level, it could simply copy files and set src to the copied
>path. Maybe get fancy with BinaryData? What to do with BitmapData? What
>about Class assignment? I’m not sure what the right answer is to these
>questions.
>
>For the BlendBead, all we really need though, is SWF support. The JS side
>does not rely on the PixelBender files.

Well, in keeping with other compiler changes, the answer would be to make
the name of the ByteArrayAsset class configurable like we did for the
PropertyChangeEvent.  If you want a quick fix for now, just change the
name used in DataTranscoder.java.

Thanks,
-Alex



Re: [FlexJS] Embed Workaround

2017-03-06 Thread Harbs
How to add full support for [Embed] is a complicated question.

I think it would be great to support it, but the details get sticky. I think we 
need a list of use cases for [Embed] to figure out the right behavior for each 
and a way to differentiate the use cases. On the simplest level, it could 
simply copy files and set src to the copied path. Maybe get fancy with 
BinaryData? What to do with BitmapData? What about Class assignment? I’m not 
sure what the right answer is to these questions.

For the BlendBead, all we really need though, is SWF support. The JS side does 
not rely on the PixelBender files.

Harbs

> On Mar 6, 2017, at 6:54 PM, Alex Harui  wrote:
> 
> 
> 
> On 3/6/17, 8:33 AM, "Harbs"  wrote:
> 
>> Yishay got an error that ByteArrayAsset could not be found.
> 
> Ah yes.  That should be relatively easy to fix for SWF compiles.   But
> what should the cross-compiler do?
> 
> -Alex
> 



Re: [FlexJS] Embed Workaround

2017-03-06 Thread Alex Harui


On 3/6/17, 8:33 AM, "Harbs"  wrote:

>Yishay got an error that ByteArrayAsset could not be found.

Ah yes.  That should be relatively easy to fix for SWF compiles.   But
what should the cross-compiler do?

-Alex



Re: [FlexJS] Embed Workaround

2017-03-06 Thread Harbs
Yishay got an error that ByteArrayAsset could not be found.

> On Mar 6, 2017, at 6:00 PM, Alex Harui  wrote:
> 
> 
> 
> On 3/6/17, 2:55 AM, "yishayw"  wrote:
> 
>> Hi,
>> 
>> While implementing BlendBead, I came across a need to steal out of mx
>> classes like ColorBurnShader [1], which use an embed tag. As we currently
>> don't have Embed in FlexJS can anyone suggest a workaround?
> 
> The SWF compiler handles [Embed].  But I have no idea what the equivalent
> JS should be for it.
> 
> Thoughts?
> -Alex
> 



Re: [FlexJS] Embed Workaround

2017-03-06 Thread Alex Harui


On 3/6/17, 2:55 AM, "yishayw"  wrote:

>Hi,
>
>While implementing BlendBead, I came across a need to steal out of mx
>classes like ColorBurnShader [1], which use an embed tag. As we currently
>don't have Embed in FlexJS can anyone suggest a workaround?

The SWF compiler handles [Embed].  But I have no idea what the equivalent
JS should be for it.

Thoughts?
-Alex