You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Tintin <19...@googlemail.com> on 2014/12/16 10:05:07 UTC

Strategy to Externalise FXG Components

Hello

I completed the development of an application which displayed some complex
FXG graphics last year. I have now been asked to create the same application
but with a different set of graphics. We have created the new artwork (CAD
to Illustrator to FXG) and rather than perform a 'save as' and start again I
want to refactor my original application such that I keep the core
application code and split out into external files the 2 sets of FXG files
and their associated data. Possibly like a game with different levels.

I currently intend to provide the user with an initial, quick to load,
options window where they will choose which of the 2 environments to load.
At this point I hope to load the associated FXG graphics and display them.

I would welcome suggestions as to a good approach to do this please. I'm a
little confused by RSLs, Modules and compiling my components into a separate
SWF file and loading this to access its assets.

Thanks

Chris



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Strategy to Externalise FXG Components

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Dec 17, 2014 3:24 AM, "Tintin" <19...@googlemail.com> wrote:
>
> Thanks
>
> I will read the Adobe documentation you suggest. This seems to be what I
> want to do.
>
> Can I bundle a collection of FXG files into a single Module if I know I
will
> want to use them all. This way I can simply load/unload a single Module
and
> then have access to all the FXG files I need?

Yes, you can bundle them, but you will need a ViewStack (or something
similar) in the middle to view just the one that was selected.

Thanks,
Om

>
> Chris
>
>
>
> --
> View this message in context:
http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193p9226.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Strategy to Externalise FXG Components

Posted by Kessler CTR Mark J <ma...@usmc.mil>.
Modules build similar to an application.  So I'm guessing it would work fine to try that in IDEA.  But I'm sure they have a readymade way of doing it in there somewhere too.

-Mark

-----Original Message-----
From: Tintin [mailto:1955.mille.miglia@googlemail.com]
Sent: Monday, December 22, 2014 8:10 AM
To: users@flex.apache.org
Subject: RE: Strategy to Externalise FXG Components

Thanks everyone for your suggestions.

So now I am trying to create my first Module in IntelliJ IDEA 13 and it's
not obvious how to go about it! I want to create a Module which contains
several FXG files. I want to compile this into a small, independent Module
which my main application can load when ready and display all of the FXG
files within the Module.

Can I simply create a new Project (Web Application) and replace the MXML tag
'Application' with 'Module', reference the FXG Files and compile?

Thanks



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193p9288.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Strategy to Externalise FXG Components

Posted by Tintin <19...@googlemail.com>.
Thanks everyone for your suggestions.

So now I am trying to create my first Module in IntelliJ IDEA 13 and it's
not obvious how to go about it! I want to create a Module which contains
several FXG files. I want to compile this into a small, independent Module
which my main application can load when ready and display all of the FXG
files within the Module.

Can I simply create a new Project (Web Application) and replace the MXML tag
'Application' with 'Module', reference the FXG Files and compile?

Thanks



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193p9288.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Strategy to Externalise FXG Components

Posted by Kessler CTR Mark J <ma...@usmc.mil>.
Yes, you can bundle whatever you like really into a module.  You could even have the module reach into the parentApplication and have it run methods or set itself up.


-Mark

-----Original Message-----
From: Tintin [mailto:1955.mille.miglia@googlemail.com] 
Sent: Wednesday, December 17, 2014 6:14 AM
To: users@flex.apache.org
Subject: Re: Strategy to Externalise FXG Components

Thanks

I will read the Adobe documentation you suggest. This seems to be what I
want to do.

Can I bundle a collection of FXG files into a single Module if I know I will
want to use them all. This way I can simply load/unload a single Module and
then have access to all the FXG files I need?

Chris



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193p9226.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Strategy to Externalise FXG Components

Posted by Tintin <19...@googlemail.com>.
Thanks

I will read the Adobe documentation you suggest. This seems to be what I
want to do.

Can I bundle a collection of FXG files into a single Module if I know I will
want to use them all. This way I can simply load/unload a single Module and
then have access to all the FXG files I need?

Chris



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193p9226.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Strategy to Externalise FXG Components

Posted by OmPrakash Muppirala <bi...@gmail.com>.
You need to:

1. Create a module for each fxg asset.  Follow the steps here to create and
load a module [1]
2. Each Module simply contains an instance of the FXG asset.
3. In the main application, when the user selects a view, load the
corresponding module.

Hope this helps.

Thanks,
Om

[1]
http://help.adobe.com/en_US/flex/using/WS19f279b149e7481c-3e29f2ba12dbeecdd8a-8000.html
On Dec 17, 2014 2:00 AM, "Tintin" <19...@googlemail.com> wrote:

> Thanks Jeffry
>
> I can see where you are going, and perhaps I wasn't very clear, but I want
> the User to load the core application, choose what they want to view and
> then the application load in the appropriate fxg artwork minimising the
> initial load time.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193p9221.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Strategy to Externalise FXG Components

Posted by Tintin <19...@googlemail.com>.
Thanks Jeffry

I can see where you are going, and perhaps I wasn't very clear, but I want
the User to load the core application, choose what they want to view and
then the application load in the appropriate fxg artwork minimising the
initial load time.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193p9221.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Strategy to Externalise FXG Components

Posted by Tintin <19...@googlemail.com>.
Thanks Alex

Your suggestion looks interesting. I don't want to compile 2 different
versions of the application sharing a common core set of code. I want to
load and run the core software and then depending on the Users decision as
to what they want to view load in 1 of 2 (soon to be 1 of 4) visual
elements.

If I could externalise the fxg artwork into Modules and load them as needed
this would appear to be in the right direction.

Has anyone any experience of doing this?

Regards

Chris



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193p9220.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Strategy to Externalise FXG Components

Posted by Alex Harui <ah...@adobe.com>.

On 12/16/14, 4:40 AM, "Jeffry Houser" <je...@dot-com-it.com> wrote:

>
>  I was under the impression that FXG assets had to be available at
>compile time and could not be loaded at runtime.

Yes, you can’t load FXG at runtime, but you should be able to compile it
into a module and load that at runtime.

-Alex


Re: Strategy to Externalise FXG Components

Posted by Jeffry Houser <je...@dot-com-it.com>.
  I was under the impression that FXG assets had to be available at 
compile time and could not be loaded at runtime.
  You should be able to isolate them into a SWC and create different 
versions of your app that way.
  In my mobile game that used FXG assets; I just compiled all assets 
into the final SWC and determined which ones to load at runtime.

  If you wanted to optimize unused assets out of your app; you may be 
able to use the conditional compilation flags.

On 12/16/2014 4:05 AM, Tintin wrote:
> Hello
>
> I completed the development of an application which displayed some complex
> FXG graphics last year. I have now been asked to create the same application
> but with a different set of graphics. We have created the new artwork (CAD
> to Illustrator to FXG) and rather than perform a 'save as' and start again I
> want to refactor my original application such that I keep the core
> application code and split out into external files the 2 sets of FXG files
> and their associated data. Possibly like a game with different levels.
>
> I currently intend to provide the user with an initial, quick to load,
> options window where they will choose which of the 2 environments to load.
> At this point I hope to load the associated FXG graphics and display them.
>
> I would welcome suggestions as to a good approach to do this please. I'm a
> little confused by RSLs, Modules and compiling my components into a separate
> SWF file and loading this to access its assets.
>
> Thanks
>
> Chris
>
>
>
> --
> View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.


-- 
Jeffry Houser
Technical Entrepreneur
http://www.jeffryhouser.com
203-379-0773


Re: Strategy to Externalise FXG Components

Posted by Yishay Weiss <yi...@hotmail.com>.
Have you seen this?

https://forums.adobe.com/thread/729827



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Strategy-to-Externalise-FXG-Components-tp9193p9196.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.