Compiling MXMLs Through Windows Command Line

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

Compiling MXMLs Through Windows Command Line

Angelo Anolin
Having some trouble getting the latest SDK (4.9) to compile my MXMLs that I
can previously compile using SDK 4.1.

I followed the README notes and set the proper environment variables as was
needed.

When I run this command line:

mxmlc -static-link-runtime-shared-libraries=false
MyFile.mxml -library-path+=MyLib.swc

I am getting the error:

flex-config.xml(411): Error: Unable to open 'libs/osmf.swc'

Any guidance would be really appreciated.

Thanks.

Angelo
Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

OmPrakash Muppirala
On Thu, Jan 31, 2013 at 3:36 PM, Angelo Anolin <[hidden email]>wrote:

> Having some trouble getting the latest SDK (4.9) to compile my MXMLs that I
> can previously compile using SDK 4.1.
>
> I followed the README notes and set the proper environment variables as was
> needed.
>
> When I run this command line:
>
> mxmlc -static-link-runtime-shared-libraries=false
> MyFile.mxml -library-path+=MyLib.swc
>
> I am getting the error:
>
> flex-config.xml(411): Error: Unable to open 'libs/osmf.swc'
>
> Any guidance would be really appreciated.
>
> Thanks.
>
> Angelo
>


Are you using the source kit or the binary kit?
Did you use the installer?
If yes, did you make sure that the OSMF download step ran through to
completion (i.e. was there any red squares in the progress bar?)
If you open up the sdk directory, do you see this file?  <sdk
location>/frameworks/libs/osmf.swc ?
Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Frédéric THOMAS
In reply to this post by Angelo Anolin
Hi,

You should use the installer or download the missing file manually, it's not
included in binary dist because it doesn't not belong to Apache Flex.

-Fred

-----Message d'origine-----
From: Angelo Anolin
Sent: Friday, February 01, 2013 12:36 AM
To: [hidden email]
Subject: Compiling MXMLs Through Windows Command Line

Having some trouble getting the latest SDK (4.9) to compile my MXMLs that I
can previously compile using SDK 4.1.

I followed the README notes and set the proper environment variables as was
needed.

When I run this command line:

mxmlc -static-link-runtime-shared-libraries=false
MyFile.mxml -library-path+=MyLib.swc

I am getting the error:

flex-config.xml(411): Error: Unable to open 'libs/osmf.swc'

Any guidance would be really appreciated.

Thanks.

Angelo


Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Angelo Anolin
Would the installer work even from command line compilation? I will test to
download the installer tomorrow and see how it goes from there. Will keep
the group informed.
On Jan 31, 2013 4:49 PM, "Frédéric THOMAS" <[hidden email]> wrote:

> Hi,
>
> You should use the installer or download the missing file manually, it's
> not included in binary dist because it doesn't not belong to Apache Flex.
>
> -Fred
>
> -----Message d'origine----- From: Angelo Anolin
> Sent: Friday, February 01, 2013 12:36 AM
> To: [hidden email]
> Subject: Compiling MXMLs Through Windows Command Line
>
> Having some trouble getting the latest SDK (4.9) to compile my MXMLs that I
> can previously compile using SDK 4.1.
>
> I followed the README notes and set the proper environment variables as was
> needed.
>
> When I run this command line:
>
> mxmlc -static-link-runtime-shared-**libraries=false
> MyFile.mxml -library-path+=MyLib.swc
>
> I am getting the error:
>
> flex-config.xml(411): Error: Unable to open 'libs/osmf.swc'
>
> Any guidance would be really appreciated.
>
> Thanks.
>
> Angelo
>
Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Angelo Anolin
Hi,

I've just tested compiling my old MXMLs using the installer and it did
compiled into an SWF properly.

The error I have right now is that when I run the SWF embedded, the SWF is
stating:

Error #2032

right at the bottom part.

Any idea or reference on this?

Thanks.

On Thu, Jan 31, 2013 at 6:09 PM, Angelo Anolin <[hidden email]>wrote:

> Would the installer work even from command line compilation? I will test
> to download the installer tomorrow and see how it goes from there. Will
> keep the group informed.
>  On Jan 31, 2013 4:49 PM, "Frédéric THOMAS" <[hidden email]>
> wrote:
>
>> Hi,
>>
>> You should use the installer or download the missing file manually, it's
>> not included in binary dist because it doesn't not belong to Apache Flex.
>>
>> -Fred
>>
>> -----Message d'origine----- From: Angelo Anolin
>> Sent: Friday, February 01, 2013 12:36 AM
>> To: [hidden email]
>> Subject: Compiling MXMLs Through Windows Command Line
>>
>> Having some trouble getting the latest SDK (4.9) to compile my MXMLs that
>> I
>> can previously compile using SDK 4.1.
>>
>> I followed the README notes and set the proper environment variables as
>> was
>> needed.
>>
>> When I run this command line:
>>
>> mxmlc -static-link-runtime-shared-**libraries=false
>> MyFile.mxml -library-path+=MyLib.swc
>>
>> I am getting the error:
>>
>> flex-config.xml(411): Error: Unable to open 'libs/osmf.swc'
>>
>> Any guidance would be really appreciated.
>>
>> Thanks.
>>
>> Angelo
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Frédéric THOMAS
Hi,

The only way to make it works is to go adding the arguments to compiler (via
Properties – Flex Compiler) : -use-network=false

-Fred

-----Message d'origine-----
From: Angelo Anolin
Sent: Friday, February 01, 2013 5:16 PM
To: [hidden email]
Subject: Re: Compiling MXMLs Through Windows Command Line

Hi,

I've just tested compiling my old MXMLs using the installer and it did
compiled into an SWF properly.

The error I have right now is that when I run the SWF embedded, the SWF is
stating:

Error #2032

right at the bottom part.

Any idea or reference on this?

Thanks.

On Thu, Jan 31, 2013 at 6:09 PM, Angelo Anolin
<[hidden email]>wrote:

> Would the installer work even from command line compilation? I will test
> to download the installer tomorrow and see how it goes from there. Will
> keep the group informed.
>  On Jan 31, 2013 4:49 PM, "Frédéric THOMAS" <[hidden email]>
> wrote:
>
>> Hi,
>>
>> You should use the installer or download the missing file manually, it's
>> not included in binary dist because it doesn't not belong to Apache Flex.
>>
>> -Fred
>>
>> -----Message d'origine----- From: Angelo Anolin
>> Sent: Friday, February 01, 2013 12:36 AM
>> To: [hidden email]
>> Subject: Compiling MXMLs Through Windows Command Line
>>
>> Having some trouble getting the latest SDK (4.9) to compile my MXMLs that
>> I
>> can previously compile using SDK 4.1.
>>
>> I followed the README notes and set the proper environment variables as
>> was
>> needed.
>>
>> When I run this command line:
>>
>> mxmlc -static-link-runtime-shared-**libraries=false
>> MyFile.mxml -library-path+=MyLib.swc
>>
>> I am getting the error:
>>
>> flex-config.xml(411): Error: Unable to open 'libs/osmf.swc'
>>
>> Any guidance would be really appreciated.
>>
>> Thanks.
>>
>> Angelo
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Alex Harui
In reply to this post by Angelo Anolin



On 2/1/13 8:16 AM, "Angelo Anolin" <[hidden email]> wrote:

> Hi,
>
> I've just tested compiling my old MXMLs using the installer and it did
> compiled into an SWF properly.
>
> The error I have right now is that when I run the SWF embedded, the SWF is
> stating:
>
> Error #2032
>
> right at the bottom part.
>
> Any idea or reference on this?
>
I would guess that the RSL configuration is incorrect.  Note that Apache
Flex does not have signed RSLs (.swz files) and RSLs are not centrally
hosted.  I would recommend not using RSL configurations unless you are
serving multiple SWFs from a single domain.

--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Angelo Anolin
Getting a little confused here.

When I run the command line compiler, it says:

Required RSLs:
framework_4.9.0.1425567.swf
textLayout_4.9.0.1425567.swf
spark_4.9.0.1425567.swf
sparkskins_4.9.0.1425567.swf
rpc_4.9.0.1425567.swf
mx_4.9.0.1425567.swf

and the last line would be:

c:\FlexSDK\bin\MyMXML.swf (108020 bytes)

c:\FlexSDK\bin>

So, how do I not use the RSLs from the command line?

Thanks

Angelo



On Fri, Feb 1, 2013 at 10:07 AM, Alex Harui <[hidden email]> wrote:

>
>
>
> On 2/1/13 8:16 AM, "Angelo Anolin" <[hidden email]> wrote:
>
> > Hi,
> >
> > I've just tested compiling my old MXMLs using the installer and it did
> > compiled into an SWF properly.
> >
> > The error I have right now is that when I run the SWF embedded, the SWF
> is
> > stating:
> >
> > Error #2032
> >
> > right at the bottom part.
> >
> > Any idea or reference on this?
> >
> I would guess that the RSL configuration is incorrect.  Note that Apache
> Flex does not have signed RSLs (.swz files) and RSLs are not centrally
> hosted.  I would recommend not using RSL configurations unless you are
> serving multiple SWFs from a single domain.
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Angelo Anolin
OK, I tried to set this option to TRUE:

-static-link-runtime-shared-libraries

and I was able to compile the mxml and the swf loads properly, although my
concern is that the generated SWF file is quite huge (774KB) as compared to
the 122KB I originally had when I set the option above to FALSE.

So, how can I optimize the generation of the SWF so that it would smaller?

Thanks.

On Fri, Feb 1, 2013 at 10:54 AM, Angelo Anolin <[hidden email]>wrote:

> Getting a little confused here.
>
> When I run the command line compiler, it says:
>
> Required RSLs:
> framework_4.9.0.1425567.swf
> textLayout_4.9.0.1425567.swf
> spark_4.9.0.1425567.swf
> sparkskins_4.9.0.1425567.swf
> rpc_4.9.0.1425567.swf
> mx_4.9.0.1425567.swf
>
> and the last line would be:
>
> c:\FlexSDK\bin\MyMXML.swf (108020 bytes)
>
> c:\FlexSDK\bin>
>
> So, how do I not use the RSLs from the command line?
>
> Thanks
>
> Angelo
>
>
>
> On Fri, Feb 1, 2013 at 10:07 AM, Alex Harui <[hidden email]> wrote:
>
>>
>>
>>
>> On 2/1/13 8:16 AM, "Angelo Anolin" <[hidden email]> wrote:
>>
>> > Hi,
>> >
>> > I've just tested compiling my old MXMLs using the installer and it did
>> > compiled into an SWF properly.
>> >
>> > The error I have right now is that when I run the SWF embedded, the SWF
>> is
>> > stating:
>> >
>> > Error #2032
>> >
>> > right at the bottom part.
>> >
>> > Any idea or reference on this?
>> >
>> I would guess that the RSL configuration is incorrect.  Note that Apache
>> Flex does not have signed RSLs (.swz files) and RSLs are not centrally
>> hosted.  I would recommend not using RSL configurations unless you are
>> serving multiple SWFs from a single domain.
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Alex Harui
Is that release build or debug build?

Flex apps certainly can be a MB or more.  I think a release mode Hello World
is over 100K. RSLs helped, but if the user didn't have the RSLs already, the
user ended up downloading all of the RSLs as well, which is a much bigger
first-time hit.

Adobe signed Adobe Flex RSLs to allow for a special RSL cache so RSLs could
be used across domain security boundaries.  Adobe does not sign RSLs from
third-parties, including Apache, so there is no way to leverage the
cross-domain RSL cache anymore.  That is a bummer, but also note that if
Apache Flex starts releasing every couple of months or so, the probability
of a cache-miss goes way up, so more of your users would suffer the bigger
first-time hit.  That's why in the new framework, I'm trying to make the
code more granular so small apps are really small and RSLs will not be
important to those apps.

Without using RSLs, the next step to optimize is to use modules and put
everything not needed in the first screen into a module.



On 2/1/13 9:59 AM, "Angelo Anolin" <[hidden email]> wrote:

> OK, I tried to set this option to TRUE:
>
> -static-link-runtime-shared-libraries
>
> and I was able to compile the mxml and the swf loads properly, although my
> concern is that the generated SWF file is quite huge (774KB) as compared to
> the 122KB I originally had when I set the option above to FALSE.
>
> So, how can I optimize the generation of the SWF so that it would smaller?
>
> Thanks.
>
> On Fri, Feb 1, 2013 at 10:54 AM, Angelo Anolin <[hidden email]>wrote:
>
>> Getting a little confused here.
>>
>> When I run the command line compiler, it says:
>>
>> Required RSLs:
>> framework_4.9.0.1425567.swf
>> textLayout_4.9.0.1425567.swf
>> spark_4.9.0.1425567.swf
>> sparkskins_4.9.0.1425567.swf
>> rpc_4.9.0.1425567.swf
>> mx_4.9.0.1425567.swf
>>
>> and the last line would be:
>>
>> c:\FlexSDK\bin\MyMXML.swf (108020 bytes)
>>
>> c:\FlexSDK\bin>
>>
>> So, how do I not use the RSLs from the command line?
>>
>> Thanks
>>
>> Angelo
>>
>>
>>
>> On Fri, Feb 1, 2013 at 10:07 AM, Alex Harui <[hidden email]> wrote:
>>
>>>
>>>
>>>
>>> On 2/1/13 8:16 AM, "Angelo Anolin" <[hidden email]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I've just tested compiling my old MXMLs using the installer and it did
>>>> compiled into an SWF properly.
>>>>
>>>> The error I have right now is that when I run the SWF embedded, the SWF
>>> is
>>>> stating:
>>>>
>>>> Error #2032
>>>>
>>>> right at the bottom part.
>>>>
>>>> Any idea or reference on this?
>>>>
>>> I would guess that the RSL configuration is incorrect.  Note that Apache
>>> Flex does not have signed RSLs (.swz files) and RSLs are not centrally
>>> hosted.  I would recommend not using RSL configurations unless you are
>>> serving multiple SWFs from a single domain.
>>>
>>> --
>>> Alex Harui
>>> Flex SDK Team
>>> Adobe Systems, Inc.
>>> http://blogs.adobe.com/aharui
>>>
>>>
>>

--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Angelo Anolin
Hi Alex,

Thanks for the reply.

I am just a little concerned, since the SWF will be loaded when the
application is started, wouldn't having a big swf file do a big hit already
on the network resources?

So is it fair to say, that since the RSL linkage would be a one time hit,
then the succeeding load of the SWF application will be smaller? Or will it
still be the same size as it is compiled?

Appreciate the insights on this.

Thanks.

Angelo



On Fri, Feb 1, 2013 at 11:23 AM, Alex Harui <[hidden email]> wrote:

> Is that release build or debug build?
>
> Flex apps certainly can be a MB or more.  I think a release mode Hello
> World
> is over 100K. RSLs helped, but if the user didn't have the RSLs already,
> the
> user ended up downloading all of the RSLs as well, which is a much bigger
> first-time hit.
>
> Adobe signed Adobe Flex RSLs to allow for a special RSL cache so RSLs could
> be used across domain security boundaries.  Adobe does not sign RSLs from
> third-parties, including Apache, so there is no way to leverage the
> cross-domain RSL cache anymore.  That is a bummer, but also note that if
> Apache Flex starts releasing every couple of months or so, the probability
> of a cache-miss goes way up, so more of your users would suffer the bigger
> first-time hit.  That's why in the new framework, I'm trying to make the
> code more granular so small apps are really small and RSLs will not be
> important to those apps.
>
> Without using RSLs, the next step to optimize is to use modules and put
> everything not needed in the first screen into a module.
>
>
>
> On 2/1/13 9:59 AM, "Angelo Anolin" <[hidden email]> wrote:
>
> > OK, I tried to set this option to TRUE:
> >
> > -static-link-runtime-shared-libraries
> >
> > and I was able to compile the mxml and the swf loads properly, although
> my
> > concern is that the generated SWF file is quite huge (774KB) as compared
> to
> > the 122KB I originally had when I set the option above to FALSE.
> >
> > So, how can I optimize the generation of the SWF so that it would
> smaller?
> >
> > Thanks.
> >
> > On Fri, Feb 1, 2013 at 10:54 AM, Angelo Anolin <[hidden email]
> >wrote:
> >
> >> Getting a little confused here.
> >>
> >> When I run the command line compiler, it says:
> >>
> >> Required RSLs:
> >> framework_4.9.0.1425567.swf
> >> textLayout_4.9.0.1425567.swf
> >> spark_4.9.0.1425567.swf
> >> sparkskins_4.9.0.1425567.swf
> >> rpc_4.9.0.1425567.swf
> >> mx_4.9.0.1425567.swf
> >>
> >> and the last line would be:
> >>
> >> c:\FlexSDK\bin\MyMXML.swf (108020 bytes)
> >>
> >> c:\FlexSDK\bin>
> >>
> >> So, how do I not use the RSLs from the command line?
> >>
> >> Thanks
> >>
> >> Angelo
> >>
> >>
> >>
> >> On Fri, Feb 1, 2013 at 10:07 AM, Alex Harui <[hidden email]> wrote:
> >>
> >>>
> >>>
> >>>
> >>> On 2/1/13 8:16 AM, "Angelo Anolin" <[hidden email]> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I've just tested compiling my old MXMLs using the installer and it did
> >>>> compiled into an SWF properly.
> >>>>
> >>>> The error I have right now is that when I run the SWF embedded, the
> SWF
> >>> is
> >>>> stating:
> >>>>
> >>>> Error #2032
> >>>>
> >>>> right at the bottom part.
> >>>>
> >>>> Any idea or reference on this?
> >>>>
> >>> I would guess that the RSL configuration is incorrect.  Note that
> Apache
> >>> Flex does not have signed RSLs (.swz files) and RSLs are not centrally
> >>> hosted.  I would recommend not using RSL configurations unless you are
> >>> serving multiple SWFs from a single domain.
> >>>
> >>> --
> >>> Alex Harui
> >>> Flex SDK Team
> >>> Adobe Systems, Inc.
> >>> http://blogs.adobe.com/aharui
> >>>
> >>>
> >>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Alex Harui
For Adobe Flex, the signed RSLs were loaded into a special cache.  If you
got lucky, your user used some other Flex application that used the same
version of the RSLs as you did.  In that case, the user download your 122K
app and the app started.

But if your customer had not run a Flex app using the same versions of the
RSLs, they had to wait for about 1MB of RSLs to download before they could
download your 122K app and see it run.

With Apache Flex, RSLs are not signed so they don't go in a special cache.
You can still use the unsigned RSLs and serve them with your app, but then
every user downloads the 1MB of RSLs and the 122K app the first time, and
also on subsequent runs unless those SWFs are still in the browser cache.

So, it is probably better to serve your 774KB app than require 1.122MB each
time the app runs.

But, I'll bet you can break your 774KB app into smaller chunks using
modules.  The first hit might then be in the 300Kb to 400Kb range just to
get a first screen up, then while the user is reading the first screen or
logging in, you load other modules.

But first, make sure you are looking at SWF sizes based on "Export for
Release" instead of just in the bin-debug folder.  Debug SWFs are
significantly larger than release mode SWFs.

And FWIW, I'm working on a new framework with a more granular implementation
that should result in much smaller applications because I think download
size is important.  Flex's main target in the past was apps hosted on
corporate intranets where download time was less of an issue.


On 2/1/13 11:54 AM, "Angelo Anolin" <[hidden email]> wrote:

> Hi Alex,
>
> Thanks for the reply.
>
> I am just a little concerned, since the SWF will be loaded when the
> application is started, wouldn't having a big swf file do a big hit already
> on the network resources?
>
> So is it fair to say, that since the RSL linkage would be a one time hit,
> then the succeeding load of the SWF application will be smaller? Or will it
> still be the same size as it is compiled?
>
> Appreciate the insights on this.
>
> Thanks.
>
> Angelo
>
>
>
> On Fri, Feb 1, 2013 at 11:23 AM, Alex Harui <[hidden email]> wrote:
>
>> Is that release build or debug build?
>>
>> Flex apps certainly can be a MB or more.  I think a release mode Hello
>> World
>> is over 100K. RSLs helped, but if the user didn't have the RSLs already,
>> the
>> user ended up downloading all of the RSLs as well, which is a much bigger
>> first-time hit.
>>
>> Adobe signed Adobe Flex RSLs to allow for a special RSL cache so RSLs could
>> be used across domain security boundaries.  Adobe does not sign RSLs from
>> third-parties, including Apache, so there is no way to leverage the
>> cross-domain RSL cache anymore.  That is a bummer, but also note that if
>> Apache Flex starts releasing every couple of months or so, the probability
>> of a cache-miss goes way up, so more of your users would suffer the bigger
>> first-time hit.  That's why in the new framework, I'm trying to make the
>> code more granular so small apps are really small and RSLs will not be
>> important to those apps.
>>
>> Without using RSLs, the next step to optimize is to use modules and put
>> everything not needed in the first screen into a module.
>>
>>
>>
>> On 2/1/13 9:59 AM, "Angelo Anolin" <[hidden email]> wrote:
>>
>>> OK, I tried to set this option to TRUE:
>>>
>>> -static-link-runtime-shared-libraries
>>>
>>> and I was able to compile the mxml and the swf loads properly, although
>> my
>>> concern is that the generated SWF file is quite huge (774KB) as compared
>> to
>>> the 122KB I originally had when I set the option above to FALSE.
>>>
>>> So, how can I optimize the generation of the SWF so that it would
>> smaller?
>>>
>>> Thanks.
>>>
>>> On Fri, Feb 1, 2013 at 10:54 AM, Angelo Anolin <[hidden email]
>>> wrote:
>>>
>>>> Getting a little confused here.
>>>>
>>>> When I run the command line compiler, it says:
>>>>
>>>> Required RSLs:
>>>> framework_4.9.0.1425567.swf
>>>> textLayout_4.9.0.1425567.swf
>>>> spark_4.9.0.1425567.swf
>>>> sparkskins_4.9.0.1425567.swf
>>>> rpc_4.9.0.1425567.swf
>>>> mx_4.9.0.1425567.swf
>>>>
>>>> and the last line would be:
>>>>
>>>> c:\FlexSDK\bin\MyMXML.swf (108020 bytes)
>>>>
>>>> c:\FlexSDK\bin>
>>>>
>>>> So, how do I not use the RSLs from the command line?
>>>>
>>>> Thanks
>>>>
>>>> Angelo
>>>>
>>>>
>>>>
>>>> On Fri, Feb 1, 2013 at 10:07 AM, Alex Harui <[hidden email]> wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 2/1/13 8:16 AM, "Angelo Anolin" <[hidden email]> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I've just tested compiling my old MXMLs using the installer and it did
>>>>>> compiled into an SWF properly.
>>>>>>
>>>>>> The error I have right now is that when I run the SWF embedded, the
>> SWF
>>>>> is
>>>>>> stating:
>>>>>>
>>>>>> Error #2032
>>>>>>
>>>>>> right at the bottom part.
>>>>>>
>>>>>> Any idea or reference on this?
>>>>>>
>>>>> I would guess that the RSL configuration is incorrect.  Note that
>> Apache
>>>>> Flex does not have signed RSLs (.swz files) and RSLs are not centrally
>>>>> hosted.  I would recommend not using RSL configurations unless you are
>>>>> serving multiple SWFs from a single domain.
>>>>>
>>>>> --
>>>>> Alex Harui
>>>>> Flex SDK Team
>>>>> Adobe Systems, Inc.
>>>>> http://blogs.adobe.com/aharui
>>>>>
>>>>>
>>>>
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>>
>>

--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Angelo Anolin
Alex,

Again, thanks for the insight. Just some few other questions, though.

1. How do I get the Export for Release when I am compiling from the command
line?
2. Is there some kind of a guidance document that would help to understand
how to modularize the application so that the initial loading of the app is
smaller?
3. The mxml file that I compiled simply contained some buttons (which
redirects the users to another web page with the embedded swf) and the
images I have used are fairly small. It has one popup component though that
is embedded to the swf itself. I can attach the mxmls here if warranted,
just so that everyone may have a fair bit of understanding on what's under
the hood.

Thanks.

Angelo



On Fri, Feb 1, 2013 at 1:08 PM, Alex Harui <[hidden email]> wrote:

> For Adobe Flex, the signed RSLs were loaded into a special cache.  If you
> got lucky, your user used some other Flex application that used the same
> version of the RSLs as you did.  In that case, the user download your 122K
> app and the app started.
>
> But if your customer had not run a Flex app using the same versions of the
> RSLs, they had to wait for about 1MB of RSLs to download before they could
> download your 122K app and see it run.
>
> With Apache Flex, RSLs are not signed so they don't go in a special cache.
> You can still use the unsigned RSLs and serve them with your app, but then
> every user downloads the 1MB of RSLs and the 122K app the first time, and
> also on subsequent runs unless those SWFs are still in the browser cache.
>
> So, it is probably better to serve your 774KB app than require 1.122MB each
> time the app runs.
>
> But, I'll bet you can break your 774KB app into smaller chunks using
> modules.  The first hit might then be in the 300Kb to 400Kb range just to
> get a first screen up, then while the user is reading the first screen or
> logging in, you load other modules.
>
> But first, make sure you are looking at SWF sizes based on "Export for
> Release" instead of just in the bin-debug folder.  Debug SWFs are
> significantly larger than release mode SWFs.
>
> And FWIW, I'm working on a new framework with a more granular
> implementation
> that should result in much smaller applications because I think download
> size is important.  Flex's main target in the past was apps hosted on
> corporate intranets where download time was less of an issue.
>
>
> On 2/1/13 11:54 AM, "Angelo Anolin" <[hidden email]> wrote:
>
> > Hi Alex,
> >
> > Thanks for the reply.
> >
> > I am just a little concerned, since the SWF will be loaded when the
> > application is started, wouldn't having a big swf file do a big hit
> already
> > on the network resources?
> >
> > So is it fair to say, that since the RSL linkage would be a one time hit,
> > then the succeeding load of the SWF application will be smaller? Or will
> it
> > still be the same size as it is compiled?
> >
> > Appreciate the insights on this.
> >
> > Thanks.
> >
> > Angelo
> >
> >
> >
> > On Fri, Feb 1, 2013 at 11:23 AM, Alex Harui <[hidden email]> wrote:
> >
> >> Is that release build or debug build?
> >>
> >> Flex apps certainly can be a MB or more.  I think a release mode Hello
> >> World
> >> is over 100K. RSLs helped, but if the user didn't have the RSLs already,
> >> the
> >> user ended up downloading all of the RSLs as well, which is a much
> bigger
> >> first-time hit.
> >>
> >> Adobe signed Adobe Flex RSLs to allow for a special RSL cache so RSLs
> could
> >> be used across domain security boundaries.  Adobe does not sign RSLs
> from
> >> third-parties, including Apache, so there is no way to leverage the
> >> cross-domain RSL cache anymore.  That is a bummer, but also note that if
> >> Apache Flex starts releasing every couple of months or so, the
> probability
> >> of a cache-miss goes way up, so more of your users would suffer the
> bigger
> >> first-time hit.  That's why in the new framework, I'm trying to make the
> >> code more granular so small apps are really small and RSLs will not be
> >> important to those apps.
> >>
> >> Without using RSLs, the next step to optimize is to use modules and put
> >> everything not needed in the first screen into a module.
> >>
> >>
> >>
> >> On 2/1/13 9:59 AM, "Angelo Anolin" <[hidden email]> wrote:
> >>
> >>> OK, I tried to set this option to TRUE:
> >>>
> >>> -static-link-runtime-shared-libraries
> >>>
> >>> and I was able to compile the mxml and the swf loads properly, although
> >> my
> >>> concern is that the generated SWF file is quite huge (774KB) as
> compared
> >> to
> >>> the 122KB I originally had when I set the option above to FALSE.
> >>>
> >>> So, how can I optimize the generation of the SWF so that it would
> >> smaller?
> >>>
> >>> Thanks.
> >>>
> >>> On Fri, Feb 1, 2013 at 10:54 AM, Angelo Anolin <
> [hidden email]
> >>> wrote:
> >>>
> >>>> Getting a little confused here.
> >>>>
> >>>> When I run the command line compiler, it says:
> >>>>
> >>>> Required RSLs:
> >>>> framework_4.9.0.1425567.swf
> >>>> textLayout_4.9.0.1425567.swf
> >>>> spark_4.9.0.1425567.swf
> >>>> sparkskins_4.9.0.1425567.swf
> >>>> rpc_4.9.0.1425567.swf
> >>>> mx_4.9.0.1425567.swf
> >>>>
> >>>> and the last line would be:
> >>>>
> >>>> c:\FlexSDK\bin\MyMXML.swf (108020 bytes)
> >>>>
> >>>> c:\FlexSDK\bin>
> >>>>
> >>>> So, how do I not use the RSLs from the command line?
> >>>>
> >>>> Thanks
> >>>>
> >>>> Angelo
> >>>>
> >>>>
> >>>>
> >>>> On Fri, Feb 1, 2013 at 10:07 AM, Alex Harui <[hidden email]> wrote:
> >>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On 2/1/13 8:16 AM, "Angelo Anolin" <[hidden email]> wrote:
> >>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> I've just tested compiling my old MXMLs using the installer and it
> did
> >>>>>> compiled into an SWF properly.
> >>>>>>
> >>>>>> The error I have right now is that when I run the SWF embedded, the
> >> SWF
> >>>>> is
> >>>>>> stating:
> >>>>>>
> >>>>>> Error #2032
> >>>>>>
> >>>>>> right at the bottom part.
> >>>>>>
> >>>>>> Any idea or reference on this?
> >>>>>>
> >>>>> I would guess that the RSL configuration is incorrect.  Note that
> >> Apache
> >>>>> Flex does not have signed RSLs (.swz files) and RSLs are not
> centrally
> >>>>> hosted.  I would recommend not using RSL configurations unless you
> are
> >>>>> serving multiple SWFs from a single domain.
> >>>>>
> >>>>> --
> >>>>> Alex Harui
> >>>>> Flex SDK Team
> >>>>> Adobe Systems, Inc.
> >>>>> http://blogs.adobe.com/aharui
> >>>>>
> >>>>>
> >>>>
> >>
> >> --
> >> Alex Harui
> >> Flex SDK Team
> >> Adobe Systems, Inc.
> >> http://blogs.adobe.com/aharui
> >>
> >>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>
Reply | Threaded
Open this post in threaded view
|

RE: Compiling MXMLs Through Windows Command Line

Kessler CTR Mark J

   Even though I use modules for my applications, I require the use of RSLs since I have 12 applications on one domain.  I use scripts to run command line compiling using custom config files and generating link reports.

   The command line option for debug is "debug=true", so do the opposite for release "debug=false".  There is a dirty method of checking if debugging at runtime by forcefully throwing a new Error() and immediately catching it to see if the square brackets are present. (note: I do not mean checking for a debugging player, but compiled with debug)

-Mark

-----Original Message-----
From: Angelo Anolin [mailto:[hidden email]]
Sent: Friday, February 01, 2013 3:22 PM
To: [hidden email]
Subject: Re: Compiling MXMLs Through Windows Command Line

Alex,

Again, thanks for the insight. Just some few other questions, though.

1. How do I get the Export for Release when I am compiling from the command
line?
2. Is there some kind of a guidance document that would help to understand
how to modularize the application so that the initial loading of the app is
smaller?
3. The mxml file that I compiled simply contained some buttons (which
redirects the users to another web page with the embedded swf) and the
images I have used are fairly small. It has one popup component though that
is embedded to the swf itself. I can attach the mxmls here if warranted,
just so that everyone may have a fair bit of understanding on what's under
the hood.

Thanks.

Angelo



On Fri, Feb 1, 2013 at 1:08 PM, Alex Harui <[hidden email]> wrote:

> For Adobe Flex, the signed RSLs were loaded into a special cache.  If you
> got lucky, your user used some other Flex application that used the same
> version of the RSLs as you did.  In that case, the user download your 122K
> app and the app started.
>
> But if your customer had not run a Flex app using the same versions of the
> RSLs, they had to wait for about 1MB of RSLs to download before they could
> download your 122K app and see it run.
>
> With Apache Flex, RSLs are not signed so they don't go in a special cache.
> You can still use the unsigned RSLs and serve them with your app, but then
> every user downloads the 1MB of RSLs and the 122K app the first time, and
> also on subsequent runs unless those SWFs are still in the browser cache.
>
> So, it is probably better to serve your 774KB app than require 1.122MB each
> time the app runs.
>
> But, I'll bet you can break your 774KB app into smaller chunks using
> modules.  The first hit might then be in the 300Kb to 400Kb range just to
> get a first screen up, then while the user is reading the first screen or
> logging in, you load other modules.
>
> But first, make sure you are looking at SWF sizes based on "Export for
> Release" instead of just in the bin-debug folder.  Debug SWFs are
> significantly larger than release mode SWFs.
>
> And FWIW, I'm working on a new framework with a more granular
> implementation
> that should result in much smaller applications because I think download
> size is important.  Flex's main target in the past was apps hosted on
> corporate intranets where download time was less of an issue.
>
>
> On 2/1/13 11:54 AM, "Angelo Anolin" <[hidden email]> wrote:
>
> > Hi Alex,
> >
> > Thanks for the reply.
> >
> > I am just a little concerned, since the SWF will be loaded when the
> > application is started, wouldn't having a big swf file do a big hit
> already
> > on the network resources?
> >
> > So is it fair to say, that since the RSL linkage would be a one time hit,
> > then the succeeding load of the SWF application will be smaller? Or will
> it
> > still be the same size as it is compiled?
> >
> > Appreciate the insights on this.
> >
> > Thanks.
> >
> > Angelo
> >
> >
> >
> > On Fri, Feb 1, 2013 at 11:23 AM, Alex Harui <[hidden email]> wrote:
> >
> >> Is that release build or debug build?
> >>
> >> Flex apps certainly can be a MB or more.  I think a release mode Hello
> >> World
> >> is over 100K. RSLs helped, but if the user didn't have the RSLs already,
> >> the
> >> user ended up downloading all of the RSLs as well, which is a much
> bigger
> >> first-time hit.
> >>
> >> Adobe signed Adobe Flex RSLs to allow for a special RSL cache so RSLs
> could
> >> be used across domain security boundaries.  Adobe does not sign RSLs
> from
> >> third-parties, including Apache, so there is no way to leverage the
> >> cross-domain RSL cache anymore.  That is a bummer, but also note that if
> >> Apache Flex starts releasing every couple of months or so, the
> probability
> >> of a cache-miss goes way up, so more of your users would suffer the
> bigger
> >> first-time hit.  That's why in the new framework, I'm trying to make the
> >> code more granular so small apps are really small and RSLs will not be
> >> important to those apps.
> >>
> >> Without using RSLs, the next step to optimize is to use modules and put
> >> everything not needed in the first screen into a module.
> >>
> >>
> >>
> >> On 2/1/13 9:59 AM, "Angelo Anolin" <[hidden email]> wrote:
> >>
> >>> OK, I tried to set this option to TRUE:
> >>>
> >>> -static-link-runtime-shared-libraries
> >>>
> >>> and I was able to compile the mxml and the swf loads properly, although
> >> my
> >>> concern is that the generated SWF file is quite huge (774KB) as
> compared
> >> to
> >>> the 122KB I originally had when I set the option above to FALSE.
> >>>
> >>> So, how can I optimize the generation of the SWF so that it would
> >> smaller?
> >>>
> >>> Thanks.
> >>>
> >>> On Fri, Feb 1, 2013 at 10:54 AM, Angelo Anolin <
> [hidden email]
> >>> wrote:
> >>>
> >>>> Getting a little confused here.
> >>>>
> >>>> When I run the command line compiler, it says:
> >>>>
> >>>> Required RSLs:
> >>>> framework_4.9.0.1425567.swf
> >>>> textLayout_4.9.0.1425567.swf
> >>>> spark_4.9.0.1425567.swf
> >>>> sparkskins_4.9.0.1425567.swf
> >>>> rpc_4.9.0.1425567.swf
> >>>> mx_4.9.0.1425567.swf
> >>>>
> >>>> and the last line would be:
> >>>>
> >>>> c:\FlexSDK\bin\MyMXML.swf (108020 bytes)
> >>>>
> >>>> c:\FlexSDK\bin>
> >>>>
> >>>> So, how do I not use the RSLs from the command line?
> >>>>
> >>>> Thanks
> >>>>
> >>>> Angelo
> >>>>
> >>>>
> >>>>
> >>>> On Fri, Feb 1, 2013 at 10:07 AM, Alex Harui <[hidden email]> wrote:
> >>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On 2/1/13 8:16 AM, "Angelo Anolin" <[hidden email]> wrote:
> >>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> I've just tested compiling my old MXMLs using the installer and it
> did
> >>>>>> compiled into an SWF properly.
> >>>>>>
> >>>>>> The error I have right now is that when I run the SWF embedded, the
> >> SWF
> >>>>> is
> >>>>>> stating:
> >>>>>>
> >>>>>> Error #2032
> >>>>>>
> >>>>>> right at the bottom part.
> >>>>>>
> >>>>>> Any idea or reference on this?
> >>>>>>
> >>>>> I would guess that the RSL configuration is incorrect.  Note that
> >> Apache
> >>>>> Flex does not have signed RSLs (.swz files) and RSLs are not
> centrally
> >>>>> hosted.  I would recommend not using RSL configurations unless you
> are
> >>>>> serving multiple SWFs from a single domain.
> >>>>>
> >>>>> --
> >>>>> Alex Harui
> >>>>> Flex SDK Team
> >>>>> Adobe Systems, Inc.
> >>>>> http://blogs.adobe.com/aharui
> >>>>>
> >>>>>
> >>>>
> >>
> >> --
> >> Alex Harui
> >> Flex SDK Team
> >> Adobe Systems, Inc.
> >> http://blogs.adobe.com/aharui
> >>
> >>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Alex Harui
In reply to this post by Angelo Anolin

Sorry for the delay, I missed this one.  Answers in line.

On 2/1/13 12:22 PM, "Angelo Anolin" <[hidden email]> wrote:

> Alex,
>
> Again, thanks for the insight. Just some few other questions, though.
>
> 1. How do I get the Export for Release when I am compiling from the command
> line?
By not adding the -debug flag (and making sure it isn't set in a config file
somewhere.
> 2. Is there some kind of a guidance document that would help to understand
> how to modularize the application so that the initial loading of the app is
> smaller?
I don't know of any documents.  A simple exercise is to comment out
everything that doesn't break the first screen and see if the SWF is
smaller. If it is, then put everything you commented into a module or
modules.
> 3. The mxml file that I compiled simply contained some buttons (which
> redirects the users to another web page with the embedded swf) and the
> images I have used are fairly small. It has one popup component though that
> is embedded to the swf itself. I can attach the mxmls here if warranted,
> just so that everyone may have a fair bit of understanding on what's under
> the hood.
>
If you want to post your code, I will take a look.

--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Angelo Anolin
I will write a simple app and post the codes here. Hopefully I get some
guidance on how to modularize and compact it.
On Feb 4, 2013 9:10 AM, "Alex Harui" <[hidden email]> wrote:

>
> Sorry for the delay, I missed this one.  Answers in line.
>
> On 2/1/13 12:22 PM, "Angelo Anolin" <[hidden email]> wrote:
>
> > Alex,
> >
> > Again, thanks for the insight. Just some few other questions, though.
> >
> > 1. How do I get the Export for Release when I am compiling from the
> command
> > line?
> By not adding the -debug flag (and making sure it isn't set in a config
> file
> somewhere.
> > 2. Is there some kind of a guidance document that would help to
> understand
> > how to modularize the application so that the initial loading of the app
> is
> > smaller?
> I don't know of any documents.  A simple exercise is to comment out
> everything that doesn't break the first screen and see if the SWF is
> smaller. If it is, then put everything you commented into a module or
> modules.
> > 3. The mxml file that I compiled simply contained some buttons (which
> > redirects the users to another web page with the embedded swf) and the
> > images I have used are fairly small. It has one popup component though
> that
> > is embedded to the swf itself. I can attach the mxmls here if warranted,
> > just so that everyone may have a fair bit of understanding on what's
> under
> > the hood.
> >
> If you want to post your code, I will take a look.
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Compiling MXMLs Through Windows Command Line

Jack Ring
In reply to this post by Frédéric THOMAS
Hello,

My Flex application is using ColdFusion Flash Remoting for remote object
access service. In each of my services I have my endpoints defined on
preInitializeService(); - Is there any way I can change the endpoint if a
call fails or times out?


Code from the service...

protected override function preInitializeService():void

{

    super.preInitializeService();

    // Initialization customization goes here

    super._serviceControl.source = "services.accountsService";

    super._serviceControl.endpoint = "
https://www.somewhere.com/flex2gateway/";

}


I am running ColdFusion 10,0,7,283649 on IIs 7.5 Win 2008 R2 64 bit and I
have many websites. Somehow only my somewhere.com domain keeps going down.


Thanks,

Jack Ring