Library SWC (library path)

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Library SWC (library path)

coxfrederic
Hi,

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

Thanks for the info!

Best regards,

Fréderic
Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

coxfrederic

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:
Hi,

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

Thanks for the info!

Best regards,

Fréderic
Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

coxfrederic
However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:
Hi,

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

Thanks for the info!

Best regards,

Fréderic
Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

coxfrederic
Can anyone help me on this? Why is this not working? The path to the SWC is correct.

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/express" applicationComplete="applicationCompleteHandler(event)">

<fx:Script>
<![CDATA[
import org.apache.royale.events.Event;
import com.enality.utils.ServerUtil;
// import com.enality.EnalityData;

private function applicationCompleteHandler(evt:Event):void{
// alert(EnalityData.rootURL);
ServerUtil.setServerSettings();
// alert(EnalityData.rootURL);
}
]]>
</fx:Script>


<js:initialView>
<js:View>
<js:Label text="Hello EnalityCMS!" x="100" y="100" />
</js:View>
</js:initialView>



</js:Application>

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"js-library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

Error I'm getting =

using SWC: /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc
Could not find file for class: com.enality.utils.ServerUtil
Error: File not found: com.enality.utils.ServerUtil

On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <[hidden email]> wrote:
However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:
Hi,

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

Thanks for the info!

Best regards,

Fréderic
Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

Piotr Zarzycki
Hi Frederic,

Have you tried external-library-path ? There is some explanation how js-library-path working [1]. However EnalityFlexLibrary is a Flex library or did you create Royale swc ? 


Thanks,
Piotr

śr., 26 wrz 2018 o 14:49 Fréderic Cox <[hidden email]> napisał(a):
Can anyone help me on this? Why is this not working? The path to the SWC is correct.

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/express" applicationComplete="applicationCompleteHandler(event)">

<fx:Script>
<![CDATA[
import org.apache.royale.events.Event;
import com.enality.utils.ServerUtil;
// import com.enality.EnalityData;

private function applicationCompleteHandler(evt:Event):void{
// alert(EnalityData.rootURL);
ServerUtil.setServerSettings();
// alert(EnalityData.rootURL);
}
]]>
</fx:Script>


<js:initialView>
<js:View>
<js:Label text="Hello EnalityCMS!" x="100" y="100" />
</js:View>
</js:initialView>



</js:Application>

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"js-library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

Error I'm getting =

using SWC: /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc
Could not find file for class: com.enality.utils.ServerUtil
Error: File not found: com.enality.utils.ServerUtil

On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <[hidden email]> wrote:
However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:
Hi,

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

Thanks for the info!

Best regards,

Fréderic


--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

coxfrederic
I tried external-library-path but if I do not use js-library-path I get compile errors "Access of possibly undefined property .."

EnalityFlexLibrary is an existing Flex library.

On Wed, Sep 26, 2018 at 2:57 PM Piotr Zarzycki <[hidden email]> wrote:
Hi Frederic,

Have you tried external-library-path ? There is some explanation how js-library-path working [1]. However EnalityFlexLibrary is a Flex library or did you create Royale swc ? 


Thanks,
Piotr

śr., 26 wrz 2018 o 14:49 Fréderic Cox <[hidden email]> napisał(a):
Can anyone help me on this? Why is this not working? The path to the SWC is correct.

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/express" applicationComplete="applicationCompleteHandler(event)">

<fx:Script>
<![CDATA[
import org.apache.royale.events.Event;
import com.enality.utils.ServerUtil;
// import com.enality.EnalityData;

private function applicationCompleteHandler(evt:Event):void{
// alert(EnalityData.rootURL);
ServerUtil.setServerSettings();
// alert(EnalityData.rootURL);
}
]]>
</fx:Script>


<js:initialView>
<js:View>
<js:Label text="Hello EnalityCMS!" x="100" y="100" />
</js:View>
</js:initialView>



</js:Application>

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"js-library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

Error I'm getting =

using SWC: /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc
Could not find file for class: com.enality.utils.ServerUtil
Error: File not found: com.enality.utils.ServerUtil

On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <[hidden email]> wrote:
However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:
Hi,

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

Thanks for the info!

Best regards,

Fréderic


--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

Piotr Zarzycki
This is probably why it's not working. I'm not an expert in that, but first what I would tried is create Royale library. However instead linking library, can you link source code ? 

"source-path": [
"src",
"mylibrary/src"
],

Is this pure AS3 code without dependency to Flash ? 

Thanks,
Piotr

śr., 26 wrz 2018 o 15:21 Fréderic Cox <[hidden email]> napisał(a):
I tried external-library-path but if I do not use js-library-path I get compile errors "Access of possibly undefined property .."

EnalityFlexLibrary is an existing Flex library.

On Wed, Sep 26, 2018 at 2:57 PM Piotr Zarzycki <[hidden email]> wrote:
Hi Frederic,

Have you tried external-library-path ? There is some explanation how js-library-path working [1]. However EnalityFlexLibrary is a Flex library or did you create Royale swc ? 


Thanks,
Piotr

śr., 26 wrz 2018 o 14:49 Fréderic Cox <[hidden email]> napisał(a):
Can anyone help me on this? Why is this not working? The path to the SWC is correct.

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/express" applicationComplete="applicationCompleteHandler(event)">

<fx:Script>
<![CDATA[
import org.apache.royale.events.Event;
import com.enality.utils.ServerUtil;
// import com.enality.EnalityData;

private function applicationCompleteHandler(evt:Event):void{
// alert(EnalityData.rootURL);
ServerUtil.setServerSettings();
// alert(EnalityData.rootURL);
}
]]>
</fx:Script>


<js:initialView>
<js:View>
<js:Label text="Hello EnalityCMS!" x="100" y="100" />
</js:View>
</js:initialView>



</js:Application>

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"js-library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

Error I'm getting =

using SWC: /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc
Could not find file for class: com.enality.utils.ServerUtil
Error: File not found: com.enality.utils.ServerUtil

On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <[hidden email]> wrote:
However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:
Hi,

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

Thanks for the info!

Best regards,

Fréderic


--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki



--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

coxfrederic
If I do it with source-path I'm getting around 3K errors like "The definition of base class BitmapAsset was not found or Call to a possibly undefined method FileStream etc... so I think that answers your last question :-)

I was expecting to be able to use the existing Flex SWC's, is this not possible?

On Wed, Sep 26, 2018 at 3:33 PM Piotr Zarzycki <[hidden email]> wrote:
This is probably why it's not working. I'm not an expert in that, but first what I would tried is create Royale library. However instead linking library, can you link source code ? 

"source-path": [
"src",
"mylibrary/src"
],

Is this pure AS3 code without dependency to Flash ? 

Thanks,
Piotr

śr., 26 wrz 2018 o 15:21 Fréderic Cox <[hidden email]> napisał(a):
I tried external-library-path but if I do not use js-library-path I get compile errors "Access of possibly undefined property .."

EnalityFlexLibrary is an existing Flex library.

On Wed, Sep 26, 2018 at 2:57 PM Piotr Zarzycki <[hidden email]> wrote:
Hi Frederic,

Have you tried external-library-path ? There is some explanation how js-library-path working [1]. However EnalityFlexLibrary is a Flex library or did you create Royale swc ? 


Thanks,
Piotr

śr., 26 wrz 2018 o 14:49 Fréderic Cox <[hidden email]> napisał(a):
Can anyone help me on this? Why is this not working? The path to the SWC is correct.

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/express" applicationComplete="applicationCompleteHandler(event)">

<fx:Script>
<![CDATA[
import org.apache.royale.events.Event;
import com.enality.utils.ServerUtil;
// import com.enality.EnalityData;

private function applicationCompleteHandler(evt:Event):void{
// alert(EnalityData.rootURL);
ServerUtil.setServerSettings();
// alert(EnalityData.rootURL);
}
]]>
</fx:Script>


<js:initialView>
<js:View>
<js:Label text="Hello EnalityCMS!" x="100" y="100" />
</js:View>
</js:initialView>



</js:Application>

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"js-library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

Error I'm getting =

using SWC: /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc
Could not find file for class: com.enality.utils.ServerUtil
Error: File not found: com.enality.utils.ServerUtil

On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <[hidden email]> wrote:
However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:
Hi,

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

Thanks for the info!

Best regards,

Fréderic


--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki



--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

Piotr Zarzycki
I don't think so - at least if you would like to transpile your code to JS. That's good that you are getting this kind of errors. It means that probably compiler is trying to transpile and cannot pass some code. I believe you have two paths:

1) Rewrite your UI part of app to Royale and transpile AS3 code
2) You can use Emulation components [1] to make proper build of your app with transpilation to JS. - From that point you could slowly make UI looks better. 

I bet that no one tried to Emulate FileStream yet! :) If something doesn't exists here [2][3] you probably can add it to make your app satisfied. 

You can generate API report (here instruction [1]) to see what actually you are using in your app, look on the list in [2][3] and fill gaps by making pull requests.


Thanks,
Piotr

śr., 26 wrz 2018 o 15:39 Fréderic Cox <[hidden email]> napisał(a):
If I do it with source-path I'm getting around 3K errors like "The definition of base class BitmapAsset was not found or Call to a possibly undefined method FileStream etc... so I think that answers your last question :-)

I was expecting to be able to use the existing Flex SWC's, is this not possible?

On Wed, Sep 26, 2018 at 3:33 PM Piotr Zarzycki <[hidden email]> wrote:
This is probably why it's not working. I'm not an expert in that, but first what I would tried is create Royale library. However instead linking library, can you link source code ? 

"source-path": [
"src",
"mylibrary/src"
],

Is this pure AS3 code without dependency to Flash ? 

Thanks,
Piotr

śr., 26 wrz 2018 o 15:21 Fréderic Cox <[hidden email]> napisał(a):
I tried external-library-path but if I do not use js-library-path I get compile errors "Access of possibly undefined property .."

EnalityFlexLibrary is an existing Flex library.

On Wed, Sep 26, 2018 at 2:57 PM Piotr Zarzycki <[hidden email]> wrote:
Hi Frederic,

Have you tried external-library-path ? There is some explanation how js-library-path working [1]. However EnalityFlexLibrary is a Flex library or did you create Royale swc ? 


Thanks,
Piotr

śr., 26 wrz 2018 o 14:49 Fréderic Cox <[hidden email]> napisał(a):
Can anyone help me on this? Why is this not working? The path to the SWC is correct.

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/express" applicationComplete="applicationCompleteHandler(event)">

<fx:Script>
<![CDATA[
import org.apache.royale.events.Event;
import com.enality.utils.ServerUtil;
// import com.enality.EnalityData;

private function applicationCompleteHandler(evt:Event):void{
// alert(EnalityData.rootURL);
ServerUtil.setServerSettings();
// alert(EnalityData.rootURL);
}
]]>
</fx:Script>


<js:initialView>
<js:View>
<js:Label text="Hello EnalityCMS!" x="100" y="100" />
</js:View>
</js:initialView>



</js:Application>

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"js-library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

Error I'm getting =

using SWC: /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc
Could not find file for class: com.enality.utils.ServerUtil
Error: File not found: com.enality.utils.ServerUtil

On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <[hidden email]> wrote:
However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

{
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"library-path": [
"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
],
"html-output-filename": "index.html"
},
"files": [
"src/EnalityCMS.mxml"
]
}

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:
Hi,

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

Thanks for the info!

Best regards,

Fréderic


--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki



--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki



--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

Alex Harui-2

Hi Fréderic,

 

Just to be clear, the main goal of Royale is to provide a Flex-like application development workflow, but not to be 100% backward compatible with Flex.  Flex itself was an attempt to abstract away the intricacies of Flash and similarly, Royale is not focused at all on providing Flash APIs.

 

So, the migration of a Flex app to Royale involves either using the Emulation components as much as possible (still a work in progress) or rewriting the UI to use Royale component sets like Jewel.  Where your application has a direct dependency on Flash, that code will definitely need to be changed.  But if you have good separation of concerns between your UI and your business logic, you should find that your business logic should be almost 100% re-usable.  And that last sentence is why Royale should be a lower-effort way to get off of Flash/AIR than rewriting and debugging your business logic.

 

So, if your app has custom SWCs containing source code written by you, the SWC should be re-usable in Royale if it isn’t dependent on Flash.  If there are Flash dependencies, you will need to tweak the code to remove the Flash dependency.  The error about BitmapAsset is probably because there are embedded assets.  Royale does not support embedding of graphical assets at this time.  Not sure if we will in the short term as it isn’t clear there is a significant technical advantage to embedding like there was in Flash.

 

A Flex SWC cannot be used “as-is” since all Royale SWCs must contains transpiled JS files from the source AS files.  So you must re-compile all of your SWCs with the Royale Compiler.  And fix any issues around Flash dependencies and workaround any Flex dependencies we haven’t supported yet in Royale.

 

I have not used VSCode myself, but you’ll have to set up library projects for each of your SWCs, get them to compile cleanly, and then try compiling the main app. 

 

I’ve been migrating TourDeFlex to Royale.   I found that there were a couple of common embedding patterns.  One was “inline-MXML” as in:

 

  <mx:Image source=”@Embed(‘assets/foo.png’)” />

 

I just removed the embedding for now:

 

  <mx:Image source=”assets/foo.png” />

 

The other common pattern was in AS such as:

 

  [Embed(“assets/foo.png”)]

  var fooPNG:Class;

 

I think all instances I found were being assigned as the source for an Image component, so it was simple enough to transform that to:

 

   var fooPNG:String = “assets/foo.png”;

 

I thought about trying to get the compiler to auto-convert these patterns, but I’m not sure it would be worth the effort.

 

Anyway, try to set up your library projects and remove Flash dependencies and eventually it should all compile and start to run without Flash.  I’m sure you’ll have lots more questions.  Don’t be afraid to ask.

 

HTH,

-Alex

 

From: Piotr Zarzycki <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, September 26, 2018 at 6:48 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Library SWC (library path)

 

I don't think so - at least if you would like to transpile your code to JS. That's good that you are getting this kind of errors. It means that probably compiler is trying to transpile and cannot pass some code. I believe you have two paths:

 

1) Rewrite your UI part of app to Royale and transpile AS3 code

2) You can use Emulation components [1] to make proper build of your app with transpilation to JS. - From that point you could slowly make UI looks better. 

 

I bet that no one tried to Emulate FileStream yet! :) If something doesn't exists here [2][3] you probably can add it to make your app satisfied. 

 

You can generate API report (here instruction [1]) to see what actually you are using in your app, look on the list in [2][3] and fill gaps by making pull requests.

 

 

Thanks,

Piotr

 

śr., 26 wrz 2018 o 15:39 Fréderic Cox <[hidden email]> napisał(a):

If I do it with source-path I'm getting around 3K errors like "The definition of base class BitmapAsset was not found or Call to a possibly undefined method FileStream etc... so I think that answers your last question :-)

 

I was expecting to be able to use the existing Flex SWC's, is this not possible?

 

On Wed, Sep 26, 2018 at 3:33 PM Piotr Zarzycki <[hidden email]> wrote:

This is probably why it's not working. I'm not an expert in that, but first what I would tried is create Royale library. However instead linking library, can you link source code ? 

"source-path": [

"src",

"mylibrary/src"

],

 

Is this pure AS3 code without dependency to Flash ? 

 

Thanks,

Piotr

 

śr., 26 wrz 2018 o 15:21 Fréderic Cox <[hidden email]> napisał(a):

I tried external-library-path but if I do not use js-library-path I get compile errors "Access of possibly undefined property .."

 

EnalityFlexLibrary is an existing Flex library.

 

On Wed, Sep 26, 2018 at 2:57 PM Piotr Zarzycki <[hidden email]> wrote:

Hi Frederic,

 

Have you tried external-library-path ? There is some explanation how js-library-path working [1]. However EnalityFlexLibrary is a Flex library or did you create Royale swc ? 

 

 

Thanks,

Piotr

 

śr., 26 wrz 2018 o 14:49 Fréderic Cox <[hidden email]> napisał(a):

Can anyone help me on this? Why is this not working? The path to the SWC is correct.

 

<?xml version="1.0" encoding="utf-8"?>

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/express" applicationComplete="applicationCompleteHandler(event)">

 

<fx:Script>

<![CDATA[

import org.apache.royale.events.Event;

import com.enality.utils.ServerUtil;

// import com.enality.EnalityData;

 

private function applicationCompleteHandler(evt:Event):void{

// alert(EnalityData.rootURL);

ServerUtil.setServerSettings();

// alert(EnalityData.rootURL);

}

]]>

</fx:Script>

 

<js:initialView>

<js:View>

<js:Label text="Hello EnalityCMS!" x="100" y="100" />

</js:View>

</js:initialView>



</js:Application>

 

{

"compilerOptions": {

"source-map": true,

"targets": [

"JSRoyale"

],

"js-library-path": [

"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"

],

"library-path": [

"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"

],

"html-output-filename": "index.html"

},

"files": [

"src/EnalityCMS.mxml"

]

}

 

Error I'm getting =

 

using SWC: /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc

Could not find file for class: com.enality.utils.ServerUtil

Error: File not found: com.enality.utils.ServerUtil

 

On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <[hidden email]> wrote:

However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

 

{

"compilerOptions": {

"source-map": true,

"targets": [

"JSRoyale"

],

"library-path": [

"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"

],

"html-output-filename": "index.html"

},

"files": [

"src/EnalityCMS.mxml"

]

}

 

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

 

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:

Hi,

 

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

 

Thanks for the info!

 

Best regards,

 

Fréderic


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

coxfrederic
Hi Alex,

Thanks for your careful and complete answers, much appreciated!
Your reply makes it 100% clear for me that I can not use the existing libraries and need to rewrite most code. So I will create duplicates from scratch meaning I will keep same structure of classes like before but I will create the SWC using a library project in Royale. Then I will copy the code that is not Flash or AIR dependant.

For example I have a ServerUtil class which I can re-use, except for storing the value of the server location which is dependant on the File class. So my question here is, can I use the WebStorage API for that? Can I write that in JS or do I need to create a AS3 equivalent that is transpiled to JS?

On Wed, Sep 26, 2018 at 5:43 PM Alex Harui <[hidden email]> wrote:

Hi Fréderic,

 

Just to be clear, the main goal of Royale is to provide a Flex-like application development workflow, but not to be 100% backward compatible with Flex.  Flex itself was an attempt to abstract away the intricacies of Flash and similarly, Royale is not focused at all on providing Flash APIs.

 

So, the migration of a Flex app to Royale involves either using the Emulation components as much as possible (still a work in progress) or rewriting the UI to use Royale component sets like Jewel.  Where your application has a direct dependency on Flash, that code will definitely need to be changed.  But if you have good separation of concerns between your UI and your business logic, you should find that your business logic should be almost 100% re-usable.  And that last sentence is why Royale should be a lower-effort way to get off of Flash/AIR than rewriting and debugging your business logic.

 

So, if your app has custom SWCs containing source code written by you, the SWC should be re-usable in Royale if it isn’t dependent on Flash.  If there are Flash dependencies, you will need to tweak the code to remove the Flash dependency.  The error about BitmapAsset is probably because there are embedded assets.  Royale does not support embedding of graphical assets at this time.  Not sure if we will in the short term as it isn’t clear there is a significant technical advantage to embedding like there was in Flash.

 

A Flex SWC cannot be used “as-is” since all Royale SWCs must contains transpiled JS files from the source AS files.  So you must re-compile all of your SWCs with the Royale Compiler.  And fix any issues around Flash dependencies and workaround any Flex dependencies we haven’t supported yet in Royale.

 

I have not used VSCode myself, but you’ll have to set up library projects for each of your SWCs, get them to compile cleanly, and then try compiling the main app. 

 

I’ve been migrating TourDeFlex to Royale.   I found that there were a couple of common embedding patterns.  One was “inline-MXML” as in:

 

  <mx:Image source=”@Embed(‘assets/foo.png’)” />

 

I just removed the embedding for now:

 

  <mx:Image source=”assets/foo.png” />

 

The other common pattern was in AS such as:

 

  [Embed(“assets/foo.png”)]

  var fooPNG:Class;

 

I think all instances I found were being assigned as the source for an Image component, so it was simple enough to transform that to:

 

   var fooPNG:String = “assets/foo.png”;

 

I thought about trying to get the compiler to auto-convert these patterns, but I’m not sure it would be worth the effort.

 

Anyway, try to set up your library projects and remove Flash dependencies and eventually it should all compile and start to run without Flash.  I’m sure you’ll have lots more questions.  Don’t be afraid to ask.

 

HTH,

-Alex

 

From: Piotr Zarzycki <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, September 26, 2018 at 6:48 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Library SWC (library path)

 

I don't think so - at least if you would like to transpile your code to JS. That's good that you are getting this kind of errors. It means that probably compiler is trying to transpile and cannot pass some code. I believe you have two paths:

 

1) Rewrite your UI part of app to Royale and transpile AS3 code

2) You can use Emulation components [1] to make proper build of your app with transpilation to JS. - From that point you could slowly make UI looks better. 

 

I bet that no one tried to Emulate FileStream yet! :) If something doesn't exists here [2][3] you probably can add it to make your app satisfied. 

 

You can generate API report (here instruction [1]) to see what actually you are using in your app, look on the list in [2][3] and fill gaps by making pull requests.

 

 

Thanks,

Piotr

 

śr., 26 wrz 2018 o 15:39 Fréderic Cox <[hidden email]> napisał(a):

If I do it with source-path I'm getting around 3K errors like "The definition of base class BitmapAsset was not found or Call to a possibly undefined method FileStream etc... so I think that answers your last question :-)

 

I was expecting to be able to use the existing Flex SWC's, is this not possible?

 

On Wed, Sep 26, 2018 at 3:33 PM Piotr Zarzycki <[hidden email]> wrote:

This is probably why it's not working. I'm not an expert in that, but first what I would tried is create Royale library. However instead linking library, can you link source code ? 

"source-path": [

"src",

"mylibrary/src"

],

 

Is this pure AS3 code without dependency to Flash ? 

 

Thanks,

Piotr

 

śr., 26 wrz 2018 o 15:21 Fréderic Cox <[hidden email]> napisał(a):

I tried external-library-path but if I do not use js-library-path I get compile errors "Access of possibly undefined property .."

 

EnalityFlexLibrary is an existing Flex library.

 

On Wed, Sep 26, 2018 at 2:57 PM Piotr Zarzycki <[hidden email]> wrote:

Hi Frederic,

 

Have you tried external-library-path ? There is some explanation how js-library-path working [1]. However EnalityFlexLibrary is a Flex library or did you create Royale swc ? 

 

 

Thanks,

Piotr

 

śr., 26 wrz 2018 o 14:49 Fréderic Cox <[hidden email]> napisał(a):

Can anyone help me on this? Why is this not working? The path to the SWC is correct.

 

<?xml version="1.0" encoding="utf-8"?>

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/express" applicationComplete="applicationCompleteHandler(event)">

 

<fx:Script>

<![CDATA[

import org.apache.royale.events.Event;

import com.enality.utils.ServerUtil;

// import com.enality.EnalityData;

 

private function applicationCompleteHandler(evt:Event):void{

// alert(EnalityData.rootURL);

ServerUtil.setServerSettings();

// alert(EnalityData.rootURL);

}

]]>

</fx:Script>

 

<js:initialView>

<js:View>

<js:Label text="Hello EnalityCMS!" x="100" y="100" />

</js:View>

</js:initialView>



</js:Application>

 

{

"compilerOptions": {

"source-map": true,

"targets": [

"JSRoyale"

],

"js-library-path": [

"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"

],

"library-path": [

"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"

],

"html-output-filename": "index.html"

},

"files": [

"src/EnalityCMS.mxml"

]

}

 

Error I'm getting =

 

using SWC: /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc

Could not find file for class: com.enality.utils.ServerUtil

Error: File not found: com.enality.utils.ServerUtil

 

On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <[hidden email]> wrote:

However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

 

{

"compilerOptions": {

"source-map": true,

"targets": [

"JSRoyale"

],

"library-path": [

"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"

],

"html-output-filename": "index.html"

},

"files": [

"src/EnalityCMS.mxml"

]

}

 

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

 

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:

Hi,

 

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

 

Thanks for the info!

 

Best regards,

 

Fréderic


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

Reply | Threaded
Open this post in threaded view
|

Re: Library SWC (library path)

Alex Harui-2

Hi Fréderic,

 

Regarding reusing existing libraries:  I think it depends on how much Flash dependencies there are.  You can run an API report as Piotr suggested or if you don’t have too many mxml files in the SWC, you can scan the AS and MXML files for “import flash” and get an idea of what Flash classes were used.  MXML automatically imports a bunch of Flash classes so you miss some in MXML files.

 

One of the reasons I suggested picking a runtime environment first is because it has impact on how you implement certain features.  For example, if you are using the AIR File class, but are going to load the Royale JS files into a WebView, you might want to write your own File class for Royale that talks across the WebView/AIR boundary right to the AIR File class.  Then you won’t need to change as much of your code.

 

HTH,

-Alex

 

From: Fréderic Cox <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, September 26, 2018 at 11:47 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Library SWC (library path)

 

Hi Alex,

 

Thanks for your careful and complete answers, much appreciated!

Your reply makes it 100% clear for me that I can not use the existing libraries and need to rewrite most code. So I will create duplicates from scratch meaning I will keep same structure of classes like before but I will create the SWC using a library project in Royale. Then I will copy the code that is not Flash or AIR dependant.

 

For example I have a ServerUtil class which I can re-use, except for storing the value of the server location which is dependant on the File class. So my question here is, can I use the WebStorage API for that? Can I write that in JS or do I need to create a AS3 equivalent that is transpiled to JS?

 

On Wed, Sep 26, 2018 at 5:43 PM Alex Harui <[hidden email]> wrote:

Hi Fréderic,

 

Just to be clear, the main goal of Royale is to provide a Flex-like application development workflow, but not to be 100% backward compatible with Flex.  Flex itself was an attempt to abstract away the intricacies of Flash and similarly, Royale is not focused at all on providing Flash APIs.

 

So, the migration of a Flex app to Royale involves either using the Emulation components as much as possible (still a work in progress) or rewriting the UI to use Royale component sets like Jewel.  Where your application has a direct dependency on Flash, that code will definitely need to be changed.  But if you have good separation of concerns between your UI and your business logic, you should find that your business logic should be almost 100% re-usable.  And that last sentence is why Royale should be a lower-effort way to get off of Flash/AIR than rewriting and debugging your business logic.

 

So, if your app has custom SWCs containing source code written by you, the SWC should be re-usable in Royale if it isn’t dependent on Flash.  If there are Flash dependencies, you will need to tweak the code to remove the Flash dependency.  The error about BitmapAsset is probably because there are embedded assets.  Royale does not support embedding of graphical assets at this time.  Not sure if we will in the short term as it isn’t clear there is a significant technical advantage to embedding like there was in Flash.

 

A Flex SWC cannot be used “as-is” since all Royale SWCs must contains transpiled JS files from the source AS files.  So you must re-compile all of your SWCs with the Royale Compiler.  And fix any issues around Flash dependencies and workaround any Flex dependencies we haven’t supported yet in Royale.

 

I have not used VSCode myself, but you’ll have to set up library projects for each of your SWCs, get them to compile cleanly, and then try compiling the main app. 

 

I’ve been migrating TourDeFlex to Royale.   I found that there were a couple of common embedding patterns.  One was “inline-MXML” as in:

 

  <mx:Image source=”@Embed(‘assets/foo.png’)” />

 

I just removed the embedding for now:

 

  <mx:Image source=”assets/foo.png” />

 

The other common pattern was in AS such as:

 

  [Embed(“assets/foo.png”)]

  var fooPNG:Class;

 

I think all instances I found were being assigned as the source for an Image component, so it was simple enough to transform that to:

 

   var fooPNG:String = “assets/foo.png”;

 

I thought about trying to get the compiler to auto-convert these patterns, but I’m not sure it would be worth the effort.

 

Anyway, try to set up your library projects and remove Flash dependencies and eventually it should all compile and start to run without Flash.  I’m sure you’ll have lots more questions.  Don’t be afraid to ask.

 

HTH,

-Alex

 

From: Piotr Zarzycki <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Wednesday, September 26, 2018 at 6:48 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Library SWC (library path)

 

I don't think so - at least if you would like to transpile your code to JS. That's good that you are getting this kind of errors. It means that probably compiler is trying to transpile and cannot pass some code. I believe you have two paths:

 

1) Rewrite your UI part of app to Royale and transpile AS3 code

2) You can use Emulation components [1] to make proper build of your app with transpilation to JS. - From that point you could slowly make UI looks better. 

 

I bet that no one tried to Emulate FileStream yet! :) If something doesn't exists here [2][3] you probably can add it to make your app satisfied. 

 

You can generate API report (here instruction [1]) to see what actually you are using in your app, look on the list in [2][3] and fill gaps by making pull requests.

 

 

Thanks,

Piotr

 

śr., 26 wrz 2018 o 15:39 Fréderic Cox <[hidden email]> napisał(a):

If I do it with source-path I'm getting around 3K errors like "The definition of base class BitmapAsset was not found or Call to a possibly undefined method FileStream etc... so I think that answers your last question :-)

 

I was expecting to be able to use the existing Flex SWC's, is this not possible?

 

On Wed, Sep 26, 2018 at 3:33 PM Piotr Zarzycki <[hidden email]> wrote:

This is probably why it's not working. I'm not an expert in that, but first what I would tried is create Royale library. However instead linking library, can you link source code ? 

"source-path": [

"src",

"mylibrary/src"

],

 

Is this pure AS3 code without dependency to Flash ? 

 

Thanks,

Piotr

 

śr., 26 wrz 2018 o 15:21 Fréderic Cox <[hidden email]> napisał(a):

I tried external-library-path but if I do not use js-library-path I get compile errors "Access of possibly undefined property .."

 

EnalityFlexLibrary is an existing Flex library.

 

On Wed, Sep 26, 2018 at 2:57 PM Piotr Zarzycki <[hidden email]> wrote:

Hi Frederic,

 

Have you tried external-library-path ? There is some explanation how js-library-path working [1]. However EnalityFlexLibrary is a Flex library or did you create Royale swc ? 

 

 

Thanks,

Piotr

 

śr., 26 wrz 2018 o 14:49 Fréderic Cox <[hidden email]> napisał(a):

Can anyone help me on this? Why is this not working? The path to the SWC is correct.

 

<?xml version="1.0" encoding="utf-8"?>

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/express" applicationComplete="applicationCompleteHandler(event)">

 

<fx:Script>

<![CDATA[

import org.apache.royale.events.Event;

import com.enality.utils.ServerUtil;

// import com.enality.EnalityData;

 

private function applicationCompleteHandler(evt:Event):void{

// alert(EnalityData.rootURL);

ServerUtil.setServerSettings();

// alert(EnalityData.rootURL);

}

]]>

</fx:Script>

 

<js:initialView>

<js:View>

<js:Label text="Hello EnalityCMS!" x="100" y="100" />

</js:View>

</js:initialView>

 

</js:Application>

 

{

"compilerOptions": {

"source-map": true,

"targets": [

"JSRoyale"

],

"js-library-path": [

"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"

],

"library-path": [

"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"

],

"html-output-filename": "index.html"

},

"files": [

"src/EnalityCMS.mxml"

]

}

 

Error I'm getting =

 

using SWC: /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc

Could not find file for class: com.enality.utils.ServerUtil

Error: File not found: com.enality.utils.ServerUtil

 

On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <[hidden email]> wrote:

However I can't seem to reference code from inside the .swc. Here is my asconfig.json file:

 

{

"compilerOptions": {

"source-map": true,

"targets": [

"JSRoyale"

],

"library-path": [

"/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"

],

"html-output-filename": "index.html"

},

"files": [

"src/EnalityCMS.mxml"

]

}

 

On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <[hidden email]> wrote:

 

On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <[hidden email]> wrote:

Hi,

 

I've managed to create my first Hello World app using Apache Royale. Now I'm wondering how can I link existing .swc's? I have a bunch of library projects which have assets, .as code files and .mxml code files. Is it possible to link those .swc files in an Apache Royale project (I'm using VSCode)? I want to be able to use the API's from the library in my new ApacheRoyale project so I can keep using the same libraries I used when working in Flash Builder with Flex for AIR.

 

Thanks for the info!

 

Best regards,

 

Fréderic


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki