Re: Royale AS3 with Starling Framework

2023-09-25 Thread Harbs
Very nice!

> On Sep 25, 2023, at 10:49 PM, Josh Tynjala  wrote:
> 
> Hi Royale community,
> 
> As you may know, I'm a big fan of finding ways for Royale's AS3 to JS
> compiler to work with emulated Flash APIs. Today, I'm sharing a little
> project created by Fancy2209 that uses AS3/Royale to build an app running
> on the GPU-accelerated Starling Framework.
> 
> Here's the "Flappy Starling" sample, compiled from AS3 to JS, running on
> top of OpenFL and Starling — in your web browser!
> 
> https://fancy2209.github.io/FlappyStarlingRoyale/
> 
> Source code available here:
> 
> https://github.com/Fancy2209/Flappy-Starling-Royale
> 
> --
> Josh Tynjala



Re: Royale AS3 with Starling Framework

2023-09-25 Thread Greg Dove
Very cool!


On Tue, Sep 26, 2023 at 8:50 AM Josh Tynjala 
wrote:

> Hi Royale community,
>
> As you may know, I'm a big fan of finding ways for Royale's AS3 to JS
> compiler to work with emulated Flash APIs. Today, I'm sharing a little
> project created by Fancy2209 that uses AS3/Royale to build an app running
> on the GPU-accelerated Starling Framework.
>
> Here's the "Flappy Starling" sample, compiled from AS3 to JS, running on
> top of OpenFL and Starling — in your web browser!
>
> https://fancy2209.github.io/FlappyStarlingRoyale/
>
> Source code available here:
>
> https://github.com/Fancy2209/Flappy-Starling-Royale
>
> --
> Josh Tynjala
>


Re: Royale AS3 with Starling Framework

2023-09-25 Thread Andrew Wetmore
That's as cute as anything. Subject for a blog post? I will write it if you
help me understand this.


Virus-free.www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Sep 25, 2023 at 4:50 PM Josh Tynjala 
wrote:

> Hi Royale community,
>
> As you may know, I'm a big fan of finding ways for Royale's AS3 to JS
> compiler to work with emulated Flash APIs. Today, I'm sharing a little
> project created by Fancy2209 that uses AS3/Royale to build an app running
> on the GPU-accelerated Starling Framework.
>
> Here's the "Flappy Starling" sample, compiled from AS3 to JS, running on
> top of OpenFL and Starling — in your web browser!
>
> https://fancy2209.github.io/FlappyStarlingRoyale/
>
> Source code available here:
>
> https://github.com/Fancy2209/Flappy-Starling-Royale
>
> --
> Josh Tynjala
>


-- 
Andrew Wetmore

Editor, Moose House Publications 
Editor-Writer, The Apache Software Foundation 


Royale AS3 with Starling Framework

2023-09-25 Thread Josh Tynjala
Hi Royale community,

As you may know, I'm a big fan of finding ways for Royale's AS3 to JS
compiler to work with emulated Flash APIs. Today, I'm sharing a little
project created by Fancy2209 that uses AS3/Royale to build an app running
on the GPU-accelerated Starling Framework.

Here's the "Flappy Starling" sample, compiled from AS3 to JS, running on
top of OpenFL and Starling — in your web browser!

https://fancy2209.github.io/FlappyStarlingRoyale/

Source code available here:

https://github.com/Fancy2209/Flappy-Starling-Royale

--
Josh Tynjala


Re: BinaryUploader issue

2023-09-25 Thread contact

fix done : https://github.com/apache/royale-asjs/pull/1235

Proposed file is changing  2 things :
- Don't use String utf8 to send datas, instead use typedArray as 
XMLHttpRequest can handle this.
- Call _binaryData.toString() instead _binaryData.data.toString() if 
used on GET method (not tested)


Le 2023-09-25 15:14, Piotr Zarzycki a écrit :

Anyone is using this class in their real world projects and can tests ? 
I

don't think we are using this one in our projects but I will check.

pon., 25 wrz 2023 o 14:03  napisał(a):

Hi Maria,

Thanks for your reply.

I just discovered new issue with BinaryUploader .

With the fix, it can send real datas instead of "[object ArrayBuffer]" 
.


This is working right with text files, but it's not working right with
some bytes. For exemple a file with 0xc0 inside will be wrong encoded 
by

the TextEncoder('utf8').

To solve that as XMLHttpRequest can send typed array
(
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#sending_typed_arrays_as_binary_data),

there is no need to convert to utf8 string,

So sending this :

element.send(_binaryData.array);
instead of

element.send(binaryData);
(line 610)
will solve this other issue.

I will make another PR, grouping theses 2 fixs

Fred

Le 2023-09-25 13:41, Maria Jose Esteve a écrit :

Hi,
If that's okay with you, let's let the colleagues who have touched this
part of the SDK give their opinion. If everything is fine for them, I
can accept the PR myself.

Hiedra

-Mensaje original-
De: cont...@cristallium.com 
Enviado el: lunes, 25 de septiembre de 2023 9:01
Para: dev@royale.apache.org
Asunto: Re: BinaryUploader issue

Hi,

I have make a PR to fix the issue
(https://github.com/apache/royale-asjs/pull/1234)

Could you merge it ?

Thanks

Le 2023-09-21 10:34, cont...@cristallium.com a écrit :

Hi All,

I try to send binary data with BinaryUploader .

In short I do this :

var ba:BinaryData = new BinaryData();
ba.writeByte(255);
ba.writeByte(256);
ba.writeByte(-256);

ba.position = 0;

var bup:BinaryUploader = new BinaryUploader(); bup.url =
"http://.";;

bup.method = HTTPConstants.POST;

bup.binaryData = ba;
bup.send();

This works fine except that I receive the following : "[object
ArrayBuffer]"

Looking at source of BinaryUploader.as, the issue is on line 577
:binaryData = _binaryData.data.toString()

_binaryData.data.toString() convert ArrayBuffer to "[object
ArrayBuffer]"

Do I miss something ?

Regards


--

Re: BinaryUploader issue

2023-09-25 Thread Piotr Zarzycki
Anyone is using this class in their real world projects and can tests ? I
don't think we are using this one in our projects but I will check.

pon., 25 wrz 2023 o 14:03  napisał(a):

> Hi Maria,
>
> Thanks for your reply.
>
> I just discovered new issue with BinaryUploader .
>
> With the fix, it can send real datas instead of "[object ArrayBuffer]" .
>
> This is working right with text files, but it's not working right with
> some bytes. For exemple a file with 0xc0 inside will be wrong encoded by
> the TextEncoder('utf8').
>
> To solve that as XMLHttpRequest can send typed array
> (
> https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#sending_typed_arrays_as_binary_data),
>
> there is no need to convert to utf8 string,
>
> So sending this :
>
> element.send(_binaryData.array);
> instead of
>
> element.send(binaryData);
> (line 610)
> will solve this other issue.
>
> I will make another PR, grouping theses 2 fixs
>
> Fred
>
> Le 2023-09-25 13:41, Maria Jose Esteve a écrit :
>
> > Hi,
> > If that's okay with you, let's let the colleagues who have touched this
> > part of the SDK give their opinion. If everything is fine for them, I
> > can accept the PR myself.
> >
> > Hiedra
> >
> > -Mensaje original-
> > De: cont...@cristallium.com 
> > Enviado el: lunes, 25 de septiembre de 2023 9:01
> > Para: dev@royale.apache.org
> > Asunto: Re: BinaryUploader issue
> >
> > Hi,
> >
> > I have make a PR to fix the issue
> > (https://github.com/apache/royale-asjs/pull/1234)
> >
> > Could you merge it ?
> >
> > Thanks
> >
> > Le 2023-09-21 10:34, cont...@cristallium.com a écrit :
> >
> >> Hi All,
> >>
> >> I try to send binary data with BinaryUploader .
> >>
> >> In short I do this :
> >>
> >> var ba:BinaryData = new BinaryData();
> >> ba.writeByte(255);
> >> ba.writeByte(256);
> >> ba.writeByte(-256);
> >>
> >> ba.position = 0;
> >>
> >> var bup:BinaryUploader = new BinaryUploader(); bup.url =
> >> "http://.";;
> >>
> >> bup.method = HTTPConstants.POST;
> >>
> >> bup.binaryData = ba;
> >> bup.send();
> >>
> >> This works fine except that I receive the following : "[object
> >> ArrayBuffer]"
> >>
> >> Looking at source of BinaryUploader.as, the issue is on line 577
> >> :binaryData = _binaryData.data.toString()
> >>
> >> _binaryData.data.toString() convert ArrayBuffer to "[object
> >> ArrayBuffer]"
> >>
> >> Do I miss something ?
> >>
> >> Regards
>
> --



-- 

Piotr Zarzycki


Re: BinaryUploader issue

2023-09-25 Thread contact

Hi Maria,

Thanks for your reply.

I just discovered new issue with BinaryUploader .

With the fix, it can send real datas instead of "[object ArrayBuffer]" .

This is working right with text files, but it's not working right with 
some bytes. For exemple a file with 0xc0 inside will be wrong encoded by 
the TextEncoder('utf8').


To solve that as XMLHttpRequest can send typed array 
(https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#sending_typed_arrays_as_binary_data), 
there is no need to convert to utf8 string,


So sending this :

element.send(_binaryData.array);
instead of

element.send(binaryData);
(line 610)
will solve this other issue.

I will make another PR, grouping theses 2 fixs

Fred

Le 2023-09-25 13:41, Maria Jose Esteve a écrit :


Hi,
If that's okay with you, let's let the colleagues who have touched this 
part of the SDK give their opinion. If everything is fine for them, I 
can accept the PR myself.


Hiedra

-Mensaje original-
De: cont...@cristallium.com 
Enviado el: lunes, 25 de septiembre de 2023 9:01
Para: dev@royale.apache.org
Asunto: Re: BinaryUploader issue

Hi,

I have make a PR to fix the issue
(https://github.com/apache/royale-asjs/pull/1234)

Could you merge it ?

Thanks

Le 2023-09-21 10:34, cont...@cristallium.com a écrit :


Hi All,

I try to send binary data with BinaryUploader .

In short I do this :

var ba:BinaryData = new BinaryData();
ba.writeByte(255);
ba.writeByte(256);
ba.writeByte(-256);

ba.position = 0;

var bup:BinaryUploader = new BinaryUploader(); bup.url =
"http://.";;

bup.method = HTTPConstants.POST;

bup.binaryData = ba;
bup.send();

This works fine except that I receive the following : "[object
ArrayBuffer]"

Looking at source of BinaryUploader.as, the issue is on line 577
:binaryData = _binaryData.data.toString()

_binaryData.data.toString() convert ArrayBuffer to "[object
ArrayBuffer]"

Do I miss something ?

Regards


--

RE: BinaryUploader issue

2023-09-25 Thread Maria Jose Esteve
Hi,
If that's okay with you, let's let the colleagues who have touched this part of 
the SDK give their opinion. If everything is fine for them, I can accept the PR 
myself.

Hiedra

-Mensaje original-
De: cont...@cristallium.com  
Enviado el: lunes, 25 de septiembre de 2023 9:01
Para: dev@royale.apache.org
Asunto: Re: BinaryUploader issue

Hi,

I have make a PR to fix the issue
(https://github.com/apache/royale-asjs/pull/1234)

Could you merge it ?

Thanks

Le 2023-09-21 10:34, cont...@cristallium.com a écrit :

> Hi All,
> 
> I try to send binary data with BinaryUploader .
> 
> In short I do this :
> 
> var ba:BinaryData = new BinaryData();
> ba.writeByte(255);
> ba.writeByte(256);
> ba.writeByte(-256);
> 
> ba.position = 0;
> 
> var bup:BinaryUploader = new BinaryUploader(); bup.url = 
> "http://.";;
> 
> bup.method = HTTPConstants.POST;
> 
> bup.binaryData = ba;
> bup.send();
> 
> This works fine except that I receive the following : "[object 
> ArrayBuffer]"
> 
> Looking at source of BinaryUploader.as, the issue is on line 577 
> :binaryData = _binaryData.data.toString()
> 
> _binaryData.data.toString() convert ArrayBuffer to "[object 
> ArrayBuffer]"
> 
> Do I miss something ?
> 
> Regards


Re: BinaryUploader issue

2023-09-25 Thread contact

Hi,

I have make a PR to fix the issue 
(https://github.com/apache/royale-asjs/pull/1234)


Could you merge it ?

Thanks

Le 2023-09-21 10:34, cont...@cristallium.com a écrit :


Hi All,

I try to send binary data with BinaryUploader .

In short I do this :

var ba:BinaryData = new BinaryData();
ba.writeByte(255);
ba.writeByte(256);
ba.writeByte(-256);

ba.position = 0;

var bup:BinaryUploader = new BinaryUploader();
bup.url = "http://.";;

bup.method = HTTPConstants.POST;

bup.binaryData = ba;
bup.send();

This works fine except that I receive the following : "[object 
ArrayBuffer]"


Looking at source of BinaryUploader.as, the issue is on line 577 
:binaryData = _binaryData.data.toString()


_binaryData.data.toString() convert ArrayBuffer to "[object 
ArrayBuffer]"


Do I miss something ?

Regards